Mirror of the gdb mailing list
 help / color / mirror / Atom feed
* Problem with unsigned char * data
@ 2004-05-20 18:09 Emilio Ugo GIUFFRIDA
  2004-05-20 21:14 ` Daniel Jacobowitz
  2004-05-21 15:25 ` Andrew Cagney
  0 siblings, 2 replies; 3+ messages in thread
From: Emilio Ugo GIUFFRIDA @ 2004-05-20 18:09 UTC (permalink / raw)
  To: gdb; +Cc: emilio.giuffrida

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?


Best regards,

Emilio


--------------------------------------------------------------------------

  			     Emilio Ugo Giuffrida

ST200 Tools Team                        Phone   : +39 0957404514
CMG/MCDT Software Design Center         Fax     : +39 0957404013
ST Microelectronics                     TINA    : 052 4514
Stradale Primosole, 50 			    e-mail  : emilio.giuffrida@st.com
95121 Catania ITALY     

--------------------------------------------------------------------------


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

* Re: Problem with unsigned char * data
  2004-05-20 18:09 Problem with unsigned char * data Emilio Ugo GIUFFRIDA
@ 2004-05-20 21:14 ` Daniel Jacobowitz
  2004-05-21 15:25 ` Andrew Cagney
  1 sibling, 0 replies; 3+ messages in thread
From: Daniel Jacobowitz @ 2004-05-20 21:14 UTC (permalink / raw)
  To: Emilio Ugo GIUFFRIDA; +Cc: gdb

On Thu, May 20, 2004 at 08:08:24PM +0200, Emilio Ugo GIUFFRIDA wrote:
> 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:

You probably want to send this to the Insight list then.

> Do you know if there is a gdb option disabling this behaviour?

I don't think so.

-- 
Daniel Jacobowitz


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

* Re: Problem with unsigned char * data
  2004-05-20 18:09 Problem with unsigned char * data Emilio Ugo GIUFFRIDA
  2004-05-20 21:14 ` Daniel Jacobowitz
@ 2004-05-21 15:25 ` Andrew Cagney
  1 sibling, 0 replies; 3+ messages in thread
From: Andrew Cagney @ 2004-05-21 15:25 UTC (permalink / raw)
  To: Emilio Ugo GIUFFRIDA; +Cc: gdb

> 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



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

end of thread, other threads:[~2004-05-21 15:25 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-05-20 18:09 Problem with unsigned char * data Emilio Ugo GIUFFRIDA
2004-05-20 21:14 ` Daniel Jacobowitz
2004-05-21 15:25 ` Andrew Cagney

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