public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
From: Florian Weimer <fweimer@redhat.com>
To: Jacob Kroon <jacob.kroon@gmail.com>
Cc: Jacob Kroon via Gdb <gdb@sourceware.org>
Subject: Re: Debugging ld.so in gdb
Date: Fri, 04 Feb 2022 18:04:16 +0100	[thread overview]
Message-ID: <87czk2o967.fsf@oldenburg.str.redhat.com> (raw)
In-Reply-To: <f73d7ef6-7d2b-47c4-db0f-968608abcdd9@gmail.com> (Jacob Kroon's message of "Fri, 4 Feb 2022 17:53:27 +0100")

* Jacob Kroon:

> I couldn't see that address anywhere in the output of "show files".
>
> But I did "full" recording, and found a place where just stepping a
> single instruction broke gdb interpreting the backtrace, if that is of
> any help. This is what I do:
>
> 1. goto instruction 225037
> 2. print backtrace (looks sane)
> 3. do "disas"
> 4. step one instruction with "stepi"
> 5. print backtrace (looks garbled)
> 6. do "disas"

Interesting.  Can you figure out where *rpo points right before things
go wrong?  If the debuginfo doesn't work, this should do it:

  print (void *)$rax - 8

Maybe also look at map->l_name at this point, and further up the stack,
in dl_sort_maps, at maps and nmaps.  It looks like we run off the end of
the array and write garbage to other areas of the process. 8-(

This must be caused by something unusual in the object dependencies.

Thanks,
Florian


  reply	other threads:[~2022-02-04 17:04 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-04 13:45 Jacob Kroon
2022-02-04 13:58 ` Florian Weimer
2022-02-04 14:09   ` Jacob Kroon
2022-02-04 14:22     ` Florian Weimer
2022-02-04 14:27       ` Jacob Kroon
2022-02-04 16:09         ` Florian Weimer
2022-02-04 16:53           ` Jacob Kroon
2022-02-04 17:04             ` Florian Weimer [this message]
2022-02-04 17:11               ` Jacob Kroon
2022-02-04 17:15                 ` Florian Weimer
2022-02-07  8:36                   ` Jacob Kroon
2022-02-07 11:46                     ` Jacob Kroon
2022-02-07 11:55                       ` Florian Weimer
2022-02-07 12:15                         ` Jacob Kroon
2022-02-07 12:27                           ` Florian Weimer
2022-02-07 12:32                             ` Jacob Kroon
2022-02-07 13:39                               ` Jacob Kroon
2022-02-07 13:45                                 ` Jacob Kroon
2022-02-07 13:53                                   ` Adhemerval Zanella
2022-02-07 13:54                                     ` Jacob Kroon
2022-02-07 14:07                                 ` Florian Weimer
2022-02-07 16:28                                   ` Florian Weimer
2022-02-07 17:04                                     ` Jacob Kroon
2022-02-04 14:45       ` Jacob Kroon

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=87czk2o967.fsf@oldenburg.str.redhat.com \
    --to=fweimer@redhat.com \
    --cc=gdb@sourceware.org \
    --cc=jacob.kroon@gmail.com \
    /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).