* Hardware Breakpoints
@ 2002-03-17 16:58 Peter Jansen
2002-03-17 17:09 ` Andrew Cagney
0 siblings, 1 reply; 4+ messages in thread
From: Peter Jansen @ 2002-03-17 16:58 UTC (permalink / raw)
To: gdb
Hi,
I'm trying to use hardware breakpoints in gdb (in the new
gdbarchitecture stuff) and cannot figure out how it all works. Are their
any gdbarch things for hardware breakpoints and watchpoints?
Are there any targets that use hardware breakpoints and watchpoints in
the new gdbarch stuff?
Im working on a AVR target.
Thanks,
--
Peter Jansen
Smart Container
Level 1, NIC Building
Eveleigh
NSW 1430
AUSTRALIA
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Hardware Breakpoints
2002-03-17 16:58 Hardware Breakpoints Peter Jansen
@ 2002-03-17 17:09 ` Andrew Cagney
2002-03-17 17:30 ` Peter Jansen
0 siblings, 1 reply; 4+ messages in thread
From: Andrew Cagney @ 2002-03-17 17:09 UTC (permalink / raw)
To: Peter Jansen; +Cc: gdb
> Hi,
>
> I'm trying to use hardware breakpoints in gdb (in the new
> gdbarchitecture stuff) and cannot figure out how it all works. Are their
> any gdbarch things for hardware breakpoints and watchpoints?
>
> Are there any targets that use hardware breakpoints and watchpoints in
> the new gdbarch stuff?
No. But there is a reason.
The existing h/w breakpoint macros should be moved to the target vector
and not the architecture vector. This is because the target, and not
the architecture, determines the presence of a breakpoint mechanism.
Unfortunatly, so far, no one has made this change, sigh!
Interested?
Andrew
--
e.g., a sim target might support h/w breakpoints when the architecture
doesn't have the, a native target may not support h/w breakpoints even
when the architecture does have them.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Hardware Breakpoints
2002-03-17 17:09 ` Andrew Cagney
@ 2002-03-17 17:30 ` Peter Jansen
2002-03-19 6:59 ` Andrew Cagney
0 siblings, 1 reply; 4+ messages in thread
From: Peter Jansen @ 2002-03-17 17:30 UTC (permalink / raw)
To: Andrew Cagney; +Cc: gdb
Hi,
> > I'm trying to use hardware breakpoints in gdb (in the new
> > gdbarchitecture stuff) and cannot figure out how it all works. Are their
> > any gdbarch things for hardware breakpoints and watchpoints?
> >
> > Are there any targets that use hardware breakpoints and watchpoints in
> > the new gdbarch stuff?
>
> No. But there is a reason.
>
> The existing h/w breakpoint macros should be moved to the target vector
> and not the architecture vector. This is because the target, and not
> the architecture, determines the presence of a breakpoint mechanism.
>
> Unfortunatly, so far, no one has made this change, sigh!
>
> Interested?
hmm, I have an embedded target and I connect to it via a JTAG box, so
the target has hardware breakpoints, I assume we need to define them in
avr-tdep.c and put the hooks in the correct place to tie it together?
What I see at the moment is the breakpoint.c stuff has no connection to
the avr-tdep.c file and I cannot see how to define something in avr-tdep
and let breakpoint.c use it.
Do you have some ideas about how this is supposed to work?
--
Peter Jansen
Smart Container
Level 1, NIC Building
Eveleigh
NSW 1430
AUSTRALIA
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Hardware Breakpoints
2002-03-17 17:30 ` Peter Jansen
@ 2002-03-19 6:59 ` Andrew Cagney
0 siblings, 0 replies; 4+ messages in thread
From: Andrew Cagney @ 2002-03-19 6:59 UTC (permalink / raw)
To: Peter Jansen; +Cc: gdb
> Hi,
>
>
>> > I'm trying to use hardware breakpoints in gdb (in the new
>> > gdbarchitecture stuff) and cannot figure out how it all works. Are their
>> > any gdbarch things for hardware breakpoints and watchpoints?
>> >
>> > Are there any targets that use hardware breakpoints and watchpoints in
>> > the new gdbarch stuff?
>
>>
>> No. But there is a reason.
>>
>> The existing h/w breakpoint macros should be moved to the target vector
>> and not the architecture vector. This is because the target, and not
>> the architecture, determines the presence of a breakpoint mechanism.
>>
>> Unfortunatly, so far, no one has made this change, sigh!
>>
>> Interested?
>
>
> hmm, I have an embedded target and I connect to it via a JTAG box, so
> the target has hardware breakpoints, I assume we need to define them in
> avr-tdep.c and put the hooks in the correct place to tie it together?
>
> What I see at the moment is the breakpoint.c stuff has no connection to
> the avr-tdep.c file and I cannot see how to define something in avr-tdep
> and let breakpoint.c use it.
>
> Do you have some ideas about how this is supposed to work?
At this point, things get confusing. I'll answer the ``supposed to
work'' question (how it works, is people define those macros).
Two possabilities:
a. You're connecting to a remote target that supports the hardware
breakpoint/watchpoint mechanism.
GDB just sends h/w breakpoint requests through to the target. For this
to work you need to hardwire (:-() up the hw_* functions in remote.c.
(This shouldn't be hardwired. Instead it should be part of the target
vector.)
b. Your target doesn't have a remote h/w breakpoint mechanism but does
have access to the h/w breakpoint registers.
Implements h/w breakpoints locally by directly manipulating the relevant
registers (i386 does this). For this to work you hardwire (:-() code in
your *-tdep.c file to those macros.
(This shouldn't be hardwired either. Instead, the target vector,
realising that it can't implement h/w breakpoints directly should ask
the architecture vector for assistance.)
Andrew
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2002-03-19 14:59 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-03-17 16:58 Hardware Breakpoints Peter Jansen
2002-03-17 17:09 ` Andrew Cagney
2002-03-17 17:30 ` Peter Jansen
2002-03-19 6:59 ` Andrew Cagney
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox