Mirror of the gdb mailing list
 help / color / mirror / Atom feed
* x/i 0x204c5ac. seg fault
@ 2006-04-28 13:12 Shaun Jackman
       [not found] ` <007101c66aae$0d32bac0$a501a8c0@CAM.ARTIMI.COM>
  0 siblings, 1 reply; 4+ messages in thread
From: Shaun Jackman @ 2006-04-28 13:12 UTC (permalink / raw)
  To: gdb

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset=UTF-8, Size: 225 bytes --]

The following typo caused a seg fault:

GNU gdb 6.4.50.20060206-cvs
...
(gdb) x/i 0x204c5ac.
Segmentation fault

Sorry that I haven't tested a more recent version than 6.4.50.20060206-cvs.

Cheers,
Shaun
\x16º&ÖëzÛ«ŸntßÉb²Ö«r\x18\x1d

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: x/i 0x204c5ac. seg fault
       [not found] ` <007101c66aae$0d32bac0$a501a8c0@CAM.ARTIMI.COM>
@ 2006-04-28 14:39   ` Daniel Jacobowitz
  2006-04-28 14:42     ` Dave Korn
  2006-04-28 15:44     ` Andreas Schwab
  0 siblings, 2 replies; 4+ messages in thread
From: Daniel Jacobowitz @ 2006-04-28 14:39 UTC (permalink / raw)
  To: Dave Korn; +Cc: 'Shaun Jackman', gdb

On Fri, Apr 28, 2006 at 11:25:20AM +0100, Dave Korn wrote:
> (gdb) x/i 0x204c5ac
> 0x204c5ac:      Cannot access memory at address 0x204c5ac

You missed the trailing ".".

The problem arises for two reasons.

1.  c-exp.y:parse_number fails to handle sscanf errors; it doesn't
    issue an error, but leaves the type unset.

2.  The system sscanf in glibc apparently rejects hex float.

-- 
Daniel Jacobowitz
CodeSourcery


^ permalink raw reply	[flat|nested] 4+ messages in thread

* RE: x/i 0x204c5ac. seg fault
  2006-04-28 14:39   ` Daniel Jacobowitz
@ 2006-04-28 14:42     ` Dave Korn
  2006-04-28 15:44     ` Andreas Schwab
  1 sibling, 0 replies; 4+ messages in thread
From: Dave Korn @ 2006-04-28 14:42 UTC (permalink / raw)
  To: 'Daniel Jacobowitz'; +Cc: 'Shaun Jackman', gdb

On 28 April 2006 14:13, Daniel Jacobowitz wrote:

> On Fri, Apr 28, 2006 at 11:25:20AM +0100, Dave Korn wrote:
>> (gdb) x/i 0x204c5ac
>> 0x204c5ac:      Cannot access memory at address 0x204c5ac
> 
> You missed the trailing ".".

  Oooops!  Copy'n'paste error -vs- word-selection.  Nonetheless:

dk@rainbow /usr/build/obj-gdb/gdb> ./gdb
GNU gdb 6.4.50.20060329-cvs
Copyright (C) 2006 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i686-pc-cygwin".
Setting up the environment for debugging gdb.
No symbol table is loaded.  Use the "file" command.
No symbol table is loaded.  Use the "file" command.
/usr/build/obj-gdb/gdb/.gdbinit:8: Error in sourced command file:
No breakpoint number 0.
(gdb) x/i 0x204c5ac.
Invalid number "0x204c5ac.".
(gdb)

  :-)

> The problem arises for two reasons.
> 
> 1.  c-exp.y:parse_number fails to handle sscanf errors; it doesn't
>     issue an error, but leaves the type unset.
> 
> 2.  The system sscanf in glibc apparently rejects hex float.

  That'll be the reason I can't reproduce it.  I'm on cygwin, hence newlib
rather than glibc.


    cheers,
      DaveK
-- 
Can't think of a witty .sigline today....


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: x/i 0x204c5ac. seg fault
  2006-04-28 14:39   ` Daniel Jacobowitz
  2006-04-28 14:42     ` Dave Korn
@ 2006-04-28 15:44     ` Andreas Schwab
  1 sibling, 0 replies; 4+ messages in thread
From: Andreas Schwab @ 2006-04-28 15:44 UTC (permalink / raw)
  To: Dave Korn; +Cc: 'Shaun Jackman', gdb

Daniel Jacobowitz <drow@false.org> writes:

> 2.  The system sscanf in glibc apparently rejects hex float.

A valid hex float constant always contains a 'p' or 'P'.

Andreas.

-- 
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
PGP key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2006-04-28 15:11 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-04-28 13:12 x/i 0x204c5ac. seg fault Shaun Jackman
     [not found] ` <007101c66aae$0d32bac0$a501a8c0@CAM.ARTIMI.COM>
2006-04-28 14:39   ` Daniel Jacobowitz
2006-04-28 14:42     ` Dave Korn
2006-04-28 15:44     ` Andreas Schwab

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox