* gdb function address
@ 2005-01-25 22:46 Spen
2005-02-08 16:22 ` Andrew Cagney
0 siblings, 1 reply; 2+ messages in thread
From: Spen @ 2005-01-25 22:46 UTC (permalink / raw)
To: gdb
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
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: gdb function address
2005-01-25 22:46 gdb function address Spen
@ 2005-02-08 16:22 ` Andrew Cagney
0 siblings, 0 replies; 2+ messages in thread
From: Andrew Cagney @ 2005-02-08 16:22 UTC (permalink / raw)
To: Spen; +Cc: gdb, orjan.friberg
See: Re: New port: CRISv32
http://sources.redhat.com/ml/gdb-patches/2005-01/msg00243.html
Two things to take on board:
- CRISv32 watchpoints are implemented using register manipulations
- the refactoring (two choices) needed to get this integrated
The ARM highlights the reason why the refactoring is important. The
``old way'' was to hard wire specific watchpoint implementation using
macros (for arm it was wired to the remote.c code) rendering any other
watchpoint mechanism (such as yours for OCDRemote) useless.
Interested,
Andrew
Spen wrote:
> 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
>
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2005-02-08 16:20 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-01-25 22:46 gdb function address Spen
2005-02-08 16:22 ` Andrew Cagney
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox