This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
Re: Problem with unsigned char * data
- From: Andrew Cagney <cagney at gnu dot org>
- To: Emilio Ugo GIUFFRIDA <emilio dot giuffrida at st dot com>
- Cc: gdb at sources dot redhat dot com
- Date: Fri, 21 May 2004 11:24:44 -0400
- Subject: Re: Problem with unsigned char * data
- References: <000001c43e95$75dd67b0$9a8182a4@CTN000514>
Gentlemen,
I have a problem with gdb/Insight :-(
On a board, when a "unsigned char *" pointer is badly initialized to
0xffffffff( that for us is outside the memory ), trying to print the pointer's value in the local variable window or in the watchpoint window makes the GUI crash.
Using the gdb console, the answer is quite verbose, but correct:
(gdb) print pt1
$6 =
Error: Error in st200emu : Cannot read buffer at memory adress 0xffffffff
Adaptor error on: read memory access at address (Exception 5 while executing ROM command)
It seems that gdb tries to read at 0xffffffff and, for pointers to unsigned char, displays by default the string pointed.
Do you know if there is a gdb option disabling this behaviour?
Which target are you using?
The message appears to come from the target and that should recover from
these error conditions reporting them back to GDB.
The other option is to look at the ``mem'' command, it was added to
address this problem of errant targets (I'm not sure of its status
though - doesn't appear to be tested).
Andrew