On Wed, May 25, 2011 at 5:23 AM, Øyvind Harboe <[email protected]> wrote:
>> My question is the following, while debugging an ARM target supported by
>> OpenOCD, Is it possible to set breakpoints at high level language? I mean by
>> pointing the breakpoint by file name and code line number?
>
> Yes, but only via GDB.
>
> (gdb) break foo.c:123

This is possible because the GDB client, the one running on the host
machine, loads the debugging symbols of your application. The simplest
way to do that is to compile the application with -g flag and pass the
.elf file as a parameter to the GDB client. This will link the source
code (function names, file names and line numbers, etc.) to addresses
in your application. You can even set breakpoints on calling a
function:

(gdb) break myFunction(int, int)

Edgar

> --
> Øyvind Harboe
>
> Can Zylin Consulting help on your project?
>
> US toll free 1-866-980-3434 / International +47 51 87 40 27
>
> http://www.zylin.com/zy1000.html
> ARM7 ARM9 ARM11 XScale Cortex
> JTAG debugger and flash programmer
> _______________________________________________
> Openocd-development mailing list
> [email protected]
> https://lists.berlios.de/mailman/listinfo/openocd-development
>
_______________________________________________
Openocd-development mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/openocd-development

Reply via email to