This is the mail archive of the gdb@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

gdb function address


I am currently using gdb/insight to debug a arm7tdmi via OCDRemote
GDBServer/TCP.
The hardware breakpoints can be set as follows:
monitor set hbreak 0x20000000 - which sets a hardware breakpoint @
address 0x20000000.

This method only gives access to a single breakpoint, the other used by
ocdremote for stepping etc.

The user command below is another method and gives access to both
hardware breakpoints

define ibreak
monitor reg w$arg0av = $arg1
monitor reg w$arg0am = 1
monitor reg w$arg0dv = 0
monitor reg w$arg0dm = 0xFFFFFFFF
monitor reg w$arg0cv = 0x100
monitor reg w$arg0cm = 0xFFFFFEF7
end

ibreak 0 0x20000000 - set breakpoint zero @ 0x20000000

The drawback is that the breakpoint address needs to be known, is there
any way to get behaiour similar to the standard break/hbreak commands,
ie. break main. And resolve the function name into an address ?

Many Thanks
Spencer Oliver


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]