This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
RE: [patch v4 01/24] gdbarch: add instruction predicate methods
- From: "Metzger, Markus T" <markus dot t dot metzger at intel dot com>
- To: Mark Kettenis <mark dot kettenis at xs4all dot nl>
- Cc: "jan dot kratochvil at redhat dot com" <jan dot kratochvil at redhat dot com>, "gdb-patches at sourceware dot org" <gdb-patches at sourceware dot org>
- Date: Wed, 3 Jul 2013 11:09:58 +0000
- Subject: RE: [patch v4 01/24] gdbarch: add instruction predicate methods
- References: <1372842874-28951-1-git-send-email-markus dot t dot metzger at intel dot com> <1372842874-28951-2-git-send-email-markus dot t dot metzger at intel dot com> <201307030948 dot r639muk8027843 at glazunov dot sibelius dot xs4all dot nl>
> -----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