This is the mail archive of the gdb-patches@sourceware.org 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]

RE: [patch v4 01/24] gdbarch: add instruction predicate methods


> -----Original Message-----
> From: gdb-patches-owner@sourceware.org [mailto:gdb-patches-owner@sourceware.org] On Behalf Of Mark Kettenis
> Sent: Wednesday, July 03, 2013 11:49 AM

> > Add new methods to gdbarch for analyzing the instruction at a given address.
> > Implement those methods for i386 and amd64 architectures.
> 
> This is all really amd64/i386-centric.  On a more abstract level, what
> is the difference between "call", "ret" and "jump"?

Call is calling into a function, ret is returning from a function back to its caller,
and jump is an intra-function branch.

Call and return are language concepts so they should be OK.  Jump is already
a generalization (note the extra 'u'), but we may change this to 'goto' or some
other term if you like.

At the moment, I assume that there is a single instruction for each.  If it turns
out that there are architectures that do this in more than one instruction, we
will need to extend the algorithm in record-btrace.c.  At the moment, the only
architecture that supports branch tracing is x86 so this suffices.

Regards,
Markus.
Intel GmbH
Dornacher Strasse 1
85622 Feldkirchen/Muenchen, Deutschland
Sitz der Gesellschaft: Feldkirchen bei Muenchen
Geschaeftsfuehrer: Christian Lamprechter, Hannes Schwaderer, Douglas Lusk
Registergericht: Muenchen HRB 47456
Ust.-IdNr./VAT Registration No.: DE129385895
Citibank Frankfurt a.M. (BLZ 502 109 00) 600119052


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