Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Tom Tromey <tom@tromey.com>
To: Edd Barrett <edd@theunixzoo.co.uk>
Cc: gdb@sourceware.org
Subject: Re: Breakpoints on JITted code
Date: Wed, 26 Jun 2024 11:32:01 -0600	[thread overview]
Message-ID: <87o77nsj8u.fsf@tromey.com> (raw)
In-Reply-To: <ZmBi3SdoAsRj-yeu@arrakis.home> (Edd Barrett's message of "Wed, 5 Jun 2024 14:06:37 +0100")

>>>>> "Edd" == Edd Barrett <edd@theunixzoo.co.uk> writes:

Sorry this didn't get a response.

Edd> Lineinfo is working well, but I was expecting to be able to set breakpoints on
Edd> the names of JITted code functions (where the name is the one passed to the
Edd> `name` argument of block_open()), but this doesn't appear to be the case. gdb
Edd> allows me to set a pending breakpoint, but doesn't stop when a JITted function
Edd> of that name is reached.

Edd> Should I be able to set breakpoints by name for JITted code functions?

Based on looking at gdb/jit.c I think I'd expect that to work.
It's creating function domain symbols in finalize_symtab.

Maybe turning on some symbol lookup debug logging would help -- not
sure.  Or just debugging gdb itself, that's what I'd try.

Edd> I'm using gdb-13.1 on Debian/amd64. I tried with gdb-14.2, but something about
Edd> my plugin causes gdb to crash with:
Edd> ```
Edd> internal-error: sect_index_text not initialized".
Edd> ```

Some parts of gdb expect objfiles to have a text section.
This is a longstanding bug but nobody's ever fixed it, presumably
because a data-only shared library is pretty rare.

Tom

      reply	other threads:[~2024-06-26 17:32 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-05 13:06 Edd Barrett
2024-06-26 17:32 ` Tom Tromey [this message]

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=87o77nsj8u.fsf@tromey.com \
    --to=tom@tromey.com \
    --cc=edd@theunixzoo.co.uk \
    --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