Does gdb for RX support setting breakpoints with command line?
Does gdb for RX support setting breakpoints with command line?
I can’t get a breakpoint to work if I define it on the gdb command line (by using “-ex br func_name” or other permutations, such as “-ex b func_name”, “-ex break func_name”, etc. The VS Code output console (I use the Renesas Debug extension) seems to show that gdb accepts the command. So, I’m assuming it correctly parses the launch.json file I’m using (partial listing):
“version”: “0.2.0”,
“configurations”: [
{
“type”: “renesas-hardware”,
“request”: “launch”,
“name”: “Renesas GDB Hardware Debugging”,
“program”: “${workspaceFolder}/build/build_rx66t_Debug/tester.elf”,
“target”: {
“deviceFamily”: “RX”,
“device”: “R5F566TA”,
“debuggerType”: “E2LITE”,
“serverParameters”: [
“-t”, “R5F566TA”, “-uConnectionTimeout=”, “30”, “-uClockSrcHoco=”, “0”, “-uInputClock=”, “13.3000”,
“-uAllowClockSourceInternal=”, ” 1″, “-uFineBaudRate=”, ” 1.50″, “-w”, “0”, “-z”, “0”, “-uRegisterSetting=”, “0”,
“-uModePin=”, “0”, “-uChangeStartupBank=”, “0”, “-uStartupBank=”, “0”, “-uExecuteProgram=”, “0”, “-uIdCode=”, “FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF”,
“-uresetOnReload=”, “1”, “-n”, “0”, “-uWorkRamAddress=”, “1000”, “-uverifyOnWritingMemory=”, “0”, “-uProgReWriteIRom=”, “0”, “-uProgReWriteDFlash=”, “0”, “-uhookWorkRamAddr=”,
“0xfdd0”, “-uhookWorkRamSize=”, “0x230”, “-uOSRestriction=”, “0”, “-uCore=”, “SINGLE_CORE|enabled|1|main”, “-uSyncMode= “, “async”, “-uFirstGDB=”, “main”,
“–english”, “-ex”, “break __assert_func”
]
}
}
See last parameter above (i.e. adding a breakpoint on __assert_func() using the “-ex” command.) If I use the gdb console to manually add the breakpoint (using “>break __assert_func”), it works. So, the function exists, and gdb finds it in the symbol table, and can break on it. However, it doesn’t work via the command line. Is this a known bug, or something I’m doing wrong?
Hello,
Thank you for reaching out to us!
GDB for Renesas RX does support the command line option to create breakpoints. Consider the following test case, which uses the GDB that comes with the Renesas Debug VS Code extension:
test.c:
#include<stdio.h>
int main () {
printf(“Hello world!”);
return 0;
}
Build and debug from the command line:
rx-elf-gcc -msim test.c -o test.elf
%USERPROFILE%\AppData\Roaming\Code\User\globalStorage\renesaselectronicscorporation.renesas-debug\DebugComp\RX\rx-elf-gdb test.elf -ex “target sim” -ex “load” -ex “b main” -ex “run” -ex “bt” -ex=”set confirm off” -ex “q”
Since the presented issue seems to be more related to the Renesas Debug extension, we cannot offer support for it.
Please seek help at:
https://www.renesas.com/us/en/support
However, based on our limited understanding of the extension, the “ServerParameters” options are sent to the gdbserver executable, not to gdb, which ignores unsupported options. This may be the reason that the breakpoints are not getting inserted.
__
Best regards,
The Open Source Tools Team