gdb/2237: "set" command refuses to set a register

Stephen Ma
Thu Mar 8 18:28:00 GMT 2007

The following reply was made to PR gdb/2237; it has been noted by GNATS.

From: Stephen Ma <>
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!  :)

More information about the Gdb-prs mailing list