From: Pedro Alves <pedro@codesourcery.com>
To: gdb-patches@sourceware.org
Subject: [v4 0/2] multi-executable support
Date: Thu, 03 Sep 2009 02:49:00 -0000 [thread overview]
Message-ID: <200909030349.38319.pedro@codesourcery.com> (raw)
[Apologies if you receive this twice. It appears the
patch still overflows the email size limits at sourceware.org, so
I'm re-splitting it in two, and posting the pieces as replies
to this email.]
Here's an updated patch to add multi-executable support to GDB.
Let me re-introduce this: Currently, GDB's multi-inferior support
can only debug multiple processes that run the same
program (e.g., several forks of the same program). With this patch,
GDB gains the ability to debug multiple different programs within
the same session. For example, when staying attached to both
child and parent of a fork, and the child then does an exec, GDB
gets very confused with the parent, since the symbols it has loaded
only make sense for the child --- the parent is still running
the same pre-child-exec image. Similar confusion happens currently
if one of the forks loads a shared library while the other doesn't,
as GDB maintains a single shared library list for all the forks.
This patch addresses these issues.
Many pieces and dependencies of this work have gone in since I
started posting this months ago, so this is now reduced to a
single patch (but split in two due to email size restrictions).
Compared to the previous patch set
http://sourceware.org/ml/gdb-patches/2009-07/msg00134.html
http://sourceware.org/ml/gdb-patches/2009-07/msg00135.html
http://sourceware.org/ml/gdb-patches/2009-07/msg00136.html
and previous-previously at (with more description and examples):
http://sourceware.org/ml/gdb-patches/2009-06/msg00388.html
this fixes the crashes Tom reported (follow-fork+non-stop related), and
adjusts both new Paul's objfiles sections map and Ulrich's executing_startup
to be per-symbol space. While doing so, I found out that creating
the initial symbol-space (there's always one) needs to be done in a
special place to avoid _initialize_foo ordering issues (due to per-sspace
data, we have to give a chance of all modules installing their own sspace
key before creating any symbol space).
I've also extended the docs with a number of
examples and cross links, and added NEWS entries for the new commands,
and mentioning multi-program debugging support.
Tested on native and gdbserver x86_64-unknown-linux-gnu without
regressions, built with --enable-targets=all.
The usual "bootstrap gdb" example is:
cd build/gdb/
./gdb -ex "set non-stop 1" -ex "set target-async 1" -ex "set pagination off" -ex "set detach off" /usr/bin/make
(gdb) r&
Comments most welcome. Eli, could you please take a look at
the manual, help and NEWS changes?
--
Pedro Alves
next reply other threads:[~2009-09-03 2:49 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-09-03 2:49 Pedro Alves [this message]
2009-09-03 2:51 ` [v4 1/2] " Pedro Alves
2009-09-03 2:53 ` [v4 2/2] " Pedro Alves
2009-09-03 18:31 ` Eli Zaretskii
2009-09-03 18:40 ` Pedro Alves
2009-09-03 20:37 ` Eli Zaretskii
2009-09-05 18:41 ` Pedro Alves
2009-09-05 20:16 ` Eli Zaretskii
2009-09-05 21:15 ` Pedro Alves
2009-09-06 3:16 ` Eli Zaretskii
2009-09-08 15:16 ` [v4 2/2] multi-executable support (new v5 patch included) Pedro Alves
2009-09-08 19:16 ` Eli Zaretskii
2009-10-05 15:22 ` Pedro Alves
2009-09-09 6:40 ` Vladimir Prus
2009-09-09 10:28 ` Pedro Alves
2009-09-03 2:56 ` [v4 0/2] multi-executable support (.gz) Pedro Alves
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=200909030349.38319.pedro@codesourcery.com \
--to=pedro@codesourcery.com \
--cc=gdb-patches@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