Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Chris Johns <chrisj@rtems.org>
To: Paul Koning <Paul_Koning@dell.com>
Cc: drow@false.org, gdb@sourceware.org
Subject: Re: Can back trace be stopped from always prints "char*" strings  ?
Date: Thu, 13 Mar 2008 18:13:00 -0000	[thread overview]
Message-ID: <47D8A5D7.6020608@rtems.org> (raw)
In-Reply-To: <18391.57812.944766.963990@gargle.gargle.HOWL>

Paul Koning wrote:
>>>>>> "Daniel" == Daniel Jacobowitz <drow@false.org> writes:
> 
>  Daniel> On Wed, Mar 12, 2008 at 08:13:51PM +1100, Chris Johns wrote:
>  >> Is there a way to stop the bt accessing the char* data and just
>  >> printing the pointer value ?
> 
>  Daniel> I don't think there is.  You might want to look at "set mem
>  Daniel> inaccessible-by-default" and the "mem" command; that's good
>  Daniel> for preventing stray memory reads.
> 

This is working so I am able to move forward. Thanks. I wonder if it is such a 
good idea for GDB to display the string a char* points to by default when 
handling a union.

> Another possibility: if the embedded target dies when this happens,
> that may mean it's getting an addressing error and not handling that.
> The target stub should validate addresses it's given and reject any
> that are out of range.  It also would make sense for it to intercept
> any access errors that make it past those range checks and turn them
> into error messages back to gdb instead.

This may work for a stub running on the target. I have a gdbserver talking 
over USB to a BDM pod connected to a Coldfire. The gdbserver knows nothing 
about the target memory map and I am not sure it should need to know. I think 
the mem command is a good idea. Thank for the idea.

Regards
Chris


  reply	other threads:[~2008-03-13  3:56 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-12 11:50 Chris Johns
2008-03-12 14:00 ` Daniel Jacobowitz
2008-03-12 14:23   ` Paul Koning
2008-03-13 18:13     ` Chris Johns [this message]
2008-03-12 15:05   ` Thiago Jung Bauermann
2008-03-12 20:15 ` Michael Snyder

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=47D8A5D7.6020608@rtems.org \
    --to=chrisj@rtems.org \
    --cc=Paul_Koning@dell.com \
    --cc=drow@false.org \
    --cc=gdb@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox