Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Simon Marchi via Gdb-patches <gdb-patches@sourceware.org>
To: Tom de Vries <tdevries@suse.de>, gdb-patches@sourceware.org
Subject: Re: [PATCH][gdb/breakpoint] Fix assert in jit_event_handler
Date: Fri, 21 May 2021 10:07:17 -0400	[thread overview]
Message-ID: <93d1a6e5-583d-a862-e83d-aea2c2be2bd6@polymtl.ca> (raw)
In-Reply-To: <df106571-69d5-3d3a-8559-3b823ad9cd31@suse.de>

On 2021-05-21 7:27 a.m., Tom de Vries wrote:
> On 5/20/21 6:22 PM, Simon Marchi wrote:
>> It's quite annoying that separate debug info files are represented by
>> "objfile"s...
>>
> 
> Yeah, indeed.
> 
> And you could even say that that's fine, but question whether they
> should be in the objfiles list, that is, have the default behaviour of:
> ...
>    for (objfile *the_objfile : pspace->objfiles ())
>      {
> +      /* Skip separate debug objects.  */
> +      if (the_objfile->separate_debug_objfile_backlink != nullptr)
> +       continue;
> ...
> without having to specify this, and if you need to access the separate
> debuginfo files, use the specific iterator for this.

I think that would be a good idea to explore.

In my opinion, the fact that an objfile has separate debug info should
be pretty much transparent to the rest of GDB.  So I think it would make
sense for these special objfiles to be hidden, unless you explicitly ask
for them.

>>> ...
>>> but consequently we'll have two jit breakpoints, so we also make sure we don't
>>> set a jit breakpoint on separate debug objects like libLLVM.so.10.debug.
>>>
>>> Tested on x86_64-linux.
>>
>> Does that fix some test when running the testsuite with the fission
>> board or something like that?
> 
> No, though I ran into another problem :) while playing around with the
> jit test-cases and target boards  (
> https://sourceware.org/bugzilla/show_bug.cgi?id=27893 ).

Well, good news that you caught it!

> [ And yet
> another problem while looking into the missing DIE problem (
> https://sourceware.org/bugzilla/show_bug.cgi?id=27894 ).

I do stumble on that sometimes.

> 
>>  I think it would be important for this to
>> be tested.
>>
> 
> I wrote this target board file, which does trigger this assert in the
> jit test-cases, and verified that the patch fixes all of them.

I thought that fission meant "separate debug info", but I think I was
wrong... I always confuse fission and separate debug info.

We don't already have a board file that generates separate debug info,
in that sense:

  https://sourceware.org/gdb/current/onlinedocs/gdb/Separate-Debug-Files.html

?  Looks like we don't, so it would be useful to add one.  Since there
are two ways of specifying separate debug info (by debuglink and by
build-id, I think it would be nice to have a board for each.  But just
adding the debuglink one would already be an improvement.  And once the
separate debug info file is found, I guess the code paths don't differ
much based on through which method the file was found.

> During testing of the target board, I ran into another assert in
> gdb.python/py-objfile.exp, will file that as well.  WDYT?

I think that board file should be added.

Simon

  reply	other threads:[~2021-05-21 14:07 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-20 15:29 Tom de Vries
2021-05-20 16:22 ` Simon Marchi via Gdb-patches
2021-05-20 22:04   ` Tom de Vries
2021-05-21 19:12     ` Tom de Vries
2021-05-21 11:27   ` Tom de Vries
2021-05-21 14:07     ` Simon Marchi via Gdb-patches [this message]
2021-05-24 15:20     ` Tom Tromey

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=93d1a6e5-583d-a862-e83d-aea2c2be2bd6@polymtl.ca \
    --to=gdb-patches@sourceware.org \
    --cc=simon.marchi@polymtl.ca \
    --cc=tdevries@suse.de \
    /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