breakpoint on non-function symbol

Daniel Jacobowitz drow@false.org
Thu Feb 1 12:20:00 GMT 2007


On Thu, Feb 01, 2007 at 11:26:34AM +0000, Bahadir Balban wrote:
> The problem is the address is not known in advance, so I had to rely
> on the symbol. Anyway, I fixed it in assembler by:
> 
> .global symname;
> .type symname, function;
> .equ symname, addr
> 
> rather than including it in the linker script.

That works, or you can take advantage of what Andreas suggested:

set $var = &symbol
break *$var

-- 
Daniel Jacobowitz
CodeSourcery



More information about the Gdb mailing list