This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: PING: PATCH: PR backtrace/14646: [x32] backtrace doesn't work
- From: Mark Kettenis <mark dot kettenis at xs4all dot nl>
- To: hjl dot tools at gmail dot com
- Cc: gdb-patches at sourceware dot org
- Date: Mon, 8 Oct 2012 21:48:03 +0200 (CEST)
- Subject: Re: PING: PATCH: PR backtrace/14646: [x32] backtrace doesn't work
- References: <CAMe9rOrOnd8mnjrhbKNkkDajQ_CwjOF5kSZnZdDSbf8Gv0aQEA@mail.gmail.com> <20121003154712.GH3028@adacore.com> <CAMe9rOreX6NAf08vD8=k4LBGevvTFUd-tqwwWmbsA3iRxxsE2A@mail.gmail.com> <201210040657.q946vJlc006566@glazunov.sibelius.xs4all.nl> <CAMe9rOounZ9e14QeMLvXR64gG5rJxQ9nNxt64YoLW54bx5VtHw@mail.gmail.com>
> Date: Thu, 4 Oct 2012 06:57:22 -0700
> From: "H.J. Lu" <hjl.tools@gmail.com>
>
> On Wed, Oct 3, 2012 at 11:57 PM, Mark Kettenis <mark.kettenis@xs4all.nl> wrote:
> >
> > Perhaps the user-regs.c mechanism can be used to establish eip -> pc
> > and esp -> sp mappings?
>
> It doesn't help as long as gdbarch_pc_regnum/gdbarch_sp_regnum
> are used for both frame pc/sp value and unwind pc/sp value. For x32,
> we want eip/esp for frame pc/sp value and rip/rsp for unwind pc/sp
> value.
That probably means we need to set gdbarch_pc_regnum (and
gdbarch_sp_regnum) to -1 for x32.