public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: "Ulrich Weigand" <uweigand@de.ibm.com>
To: matthew.gretton-dann@arm.com (Matthew Gretton-Dann)
Cc: gdb-patches@sourceware.org
Subject: Re: [rfc] Strip Thumb bit from PC returned by arm_get_longjmp_target
Date: Fri, 20 Aug 2010 11:45:00 -0000	[thread overview]
Message-ID: <201008201145.o7KBjCQ0005686@d12av02.megacenter.de.ibm.com> (raw)
In-Reply-To: <1282294368.7290.23.camel@e102319-lin.cambridge.arm.com> from "Matthew Gretton-Dann" at Aug 20, 2010 09:52:48 AM

Matthew Gretton-Dann wrote:

> Using two gdbarch objects seems reasonable, and also extends nicely if
> we decide to support the ThumbEE ISA as well (which is intended for JITs
> so gdb is unlikely to have any debug info to help it along).
> 
> However, I am concerned about a couple of things:
> 
> 1) What changes does this make to the user interface?  Can I user still
> say 'break main' and gdb will determine ARM or Thumb automatically?

That's the one piece I mentioned where common code support will have to
be added.  Basically, we'd need a gdbarch callback that gets the gdbarch
the breakpoint was parsed in, and the breakpoint's PC address (plus
address space, eventually), and would return the gdbarch to be used to
handle that particular breakpoint location.

> Will the user still be able to see a backtrace with some frames in ARM
> state and some in Thumb?

This mechanism already exists and is used for Cell debugging today: we
can install a frame architecture unwinder that, given a frame, returns
the architecture to be used for the next-outer frame.

> 2) This moves the decision what instruction set state a breakpoint is
> targetting from the time we set the breakpoint to the time the
> breakpoint is requested by the user.  Is this a reasonable thing to do?
> I think so - I don't expect code to change under the debugger's feet, so
> making the decision when we have most information available (at
> breakpoint request time) is the correct way to go.

Actually, it would move the decision to the point where the breakpoint
location structure is allocated.  This happens when the breakpoint is
initially requested, yes, but breakpoint locations are also recomputed
every time the available debug information changes (e.g. shared libraries
are loaded/unloaded).

Bye,
Ulrich

-- 
  Dr. Ulrich Weigand
  GNU Toolchain for Linux on System z and Cell BE
  Ulrich.Weigand@de.ibm.com

      reply	other threads:[~2010-08-20 11:45 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-17 19:16 Ulrich Weigand
2010-08-18  9:01 ` Matthew Gretton-Dann
2010-08-18 18:28   ` Ulrich Weigand
2010-08-19  8:49     ` Ulrich Weigand
2010-08-20  8:38       ` Matthew Gretton-Dann
2010-08-20 12:00         ` Ulrich Weigand
2010-08-20  8:53     ` Matthew Gretton-Dann
2010-08-20 11:45       ` Ulrich Weigand [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=201008201145.o7KBjCQ0005686@d12av02.megacenter.de.ibm.com \
    --to=uweigand@de.ibm.com \
    --cc=gdb-patches@sourceware.org \
    --cc=matthew.gretton-dann@arm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).