This is the mail archive of the
gdb-prs@sourceware.org
mailing list for the GDB project.
Re: gdb/2237: "set" command refuses to set a register
- From: Stephen Ma <stephenma at telus dot net>
- To: nobody at sources dot redhat dot com
- Cc: gdb-prs at sources dot redhat dot com,
- Date: 8 Mar 2007 18:28:01 -0000
- Subject: Re: gdb/2237: "set" command refuses to set a register
- Reply-to: Stephen Ma <stephenma at telus dot net>
The following reply was made to PR gdb/2237; it has been noted by GNATS.
From: Stephen Ma <stephenma@telus.net>
To: gdb-gnats@sources.redhat.com
Cc:
Subject: Re: gdb/2237: "set" command refuses to set a register
Date: Thu, 8 Mar 2007 10:16:04 -0800
On Wed, Mar 07, 2007 at 07:32:24AM -0500, Daniel Jacobowitz wrote:
> On Tue, Mar 06, 2007 at 03:14:27PM -0800, Stephen Ma wrote:
> > But before I dive into it, allow me to mention a possible crude fix:
> > forget about stack frames when the current language is assembler,
> > since the assembler programmer is unlikely to stick to any kind of
> > standard frame format anyway.
>
> The problem isn't unique to assembler - and assembly programmers are
> actually very likely to use a recognizable stack layout in our experience.
Not in a program written purely in assembler, in my long experience.
In particular, ad hoc register-based -- not stack-based -- calling
sequences are the norm in such programs, as are random pushes and
pops, thus seriously confusing a stack decoder.
Sometimes gdb is too smart for its own good. If the problem isn't
unique to assembler, how about this:
set dumb_gdb on
This would disable the fancy stack walking. Let me decipher the stack
by myself and give me gdb, the dumb-but-reliable debugger! :)