We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
I use SEGGER J-Link GDB session to debug assembly code for NXP LPC2148 device. I set a hwbreak at some address in flash. I receive 'SIGTRAP, Trace/breakpoint trap. PC in ?? ()' If I want to step through the code I get 'Cannot find bounds of current function'. Why PC is ??
Debugging without Flash Breakpoints is possible, but you are limited to the hardware breakpoint units available on the device.
Nevertheless everything, at least on the J-Link and GDB Server side, is looking good. The application stops at the breakpoint like expected.
As indicated before, it looks like GDB is not able to find any source location which belongs to the address you set the breakpoint on.
It might be possible that your application is not compiled with debug symbols (GCC option -g) or there is really no source for this location.
You could test this by setting a break on a function of which you know it is in your application, for example "break main".
If GDB sets the breakpoint without an error, let the application continue. It should break and report to be at main().
If GDB is not able to set the breakpoint, there is a problem with your elf-file.
- SEGGER Support
I have my doubts.here. Main is residing in Flash at 0x8008. Breakpoint is set by server. But at breakpoint trap the server reads PC at 0x014800c0. Far off the main function address.
Tnx for reply!