RE: Why enforcing sw_breakpoint_from_kind() implementation in GDBserver targets

"Metzger, Markus T via Gdb" <[email protected]>
Newsgroups gmane.comp.gdb.devel
Message-ID <DM5PR11MB1690C0123E387EE96BBD4FC1DE9B0@DM5PR11MB1690.namprd11.prod.outlook.com>
Hello Maciej,

> > That's the only kind of breakpoint this architecture supports.  As far as I
> understand,
> > the kind is per-target and used to distinguish different kinds of breakpoints
> supported
> > by this target.
> 
>  From your description I infer you do have different kinds of breakpoints,
> one (or more?) for each instruction.

OK, one could view it that way that we have a separate breakpoint instruction
for each instruction/operand combination.

I rather view it as a bit inside every instruction.


> > The points I was trying to make is that we're also using gdbarch breakpoints
> and that
> > in order to use z packets, we'd need insert_point() to be able to store shadow
> copies.
> > I have not looked into that since gdbarch breakpoints worked for me and would
> also
> > allow sharing the code between a native target and gdbserver.
> 
>  Why do you need to store any copy in `gdbserver'?  GDB keeps a record of
> replaced instructions, so you can use it instead.  Just send the original
> instruction as the breakpoint kind.

The breakpoint kind would depend on the ISA.  And we'd have a real lot of them.

I don't think that we'd want to encode the original instruction in the breakpoint
kind.  That's what the shadow copy inside the breakpoint object is for.

Markus.

Intel Deutschland GmbH
Registered Address: Am Campeon 10-12, 85579 Neubiberg, Germany
Tel: +49 89 99 8853-0, www.intel.de
Managing Directors: Christin Eisenschmid, Gary Kershaw
Chairperson of the Supervisory Board: Nicole Lau
Registered Office: Munich
Commercial Register: Amtsgericht Muenchen HRB 186928
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.