public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: Tavis Ormandy <taviso@gmail.com>
To: binutils@sourceware.org
Subject: Re: making stabs visible to gdb
Date: Sat, 20 Aug 2022 01:44:00 -0000 (UTC)	[thread overview]
Message-ID: <tdpe90$u1n$1@ciao.gmane.io> (raw)
In-Reply-To: <87bksyg2x5.fsf@tromey.com>

On 2022-08-05, Tom Tromey wrote:
>>> Also, is there a better way to accomplish what I'm trying to do?
>
> In the gdb test suite, we have some Tcl code that makes it relatively
> simple to create synthetic DWARF.  So, I'd consider extracting that and
> using it to describe your program.
>

Hmm thanks, it kinda works - but it generates tons of warnings like
this:

warning: (Internal error: pc 0x8129250 in read in psymtab, but not in
symtab.)
warning: (Internal error: pc 0x8129250 in read in psymtab, but not in
symtab.)
warning: (Internal error: pc 0x8129250 in read in psymtab, but not in
symtab.)

It's so close to working nicely, but I think these warnings can't be hidden.

What do you think about removing that warning?

> Nick> There may be a gdb command that associates an address
> Nick> with a symbol name, but I do not know what it is.  Sorry.
>
> There isn't one that does exactly this, but you can probably use the
> 'compile' command to achieve it.
>

Do you have an example of what you had in mind?

I thought you might mean something like this, but I couldn't figure out
the details:

compile code -raw void (*example)(unsigned *foo, int bar) = (void*)(0x8005bba); void _gdb_expr(){};

Tavis.

-- 
 _o)            $ lynx lock.cmpxchg8b.com
 /\\  _o)  _o)  $ finger taviso@sdf.org
_\_V _( ) _( )  @taviso


  reply	other threads:[~2022-08-20  1:44 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-03  5:11 Tavis Ormandy
2022-08-05  9:21 ` Nick Clifton
2022-08-05 14:50   ` Tom Tromey
2022-08-20  1:44     ` Tavis Ormandy [this message]
2022-08-20  4:49       ` Tavis Ormandy

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='tdpe90$u1n$1@ciao.gmane.io' \
    --to=taviso@gmail.com \
    --cc=binutils@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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).