From: Tom Tromey <tromey@redhat.com>
To: gdb-patches@sourceware.org
Subject: Re: [RFC] [1/2] First cut at multi-executable support.
Date: Wed, 17 Jun 2009 18:19:00 -0000 [thread overview]
Message-ID: <m3r5xiwwno.fsf@fleche.redhat.com> (raw)
In-Reply-To: <200906151621.57104.pedro@codesourcery.com> (Pedro Alves's message of "Mon\, 15 Jun 2009 16\:21\:55 +0100")
>>>>> "Pedro" == Pedro Alves <pedro@codesourcery.com> writes:
Pedro> All-in-all, what do you think of this, and the patch below?
I think it is unbelievably awesome.
Pedro> There's certainly scope of a lot of goodies to be added on top
Pedro> of this, like extending thread control support (threads groups, itsets
Pedro> or whatever); better support for symbol scoping a-la HPD's ## syntax
Pedro> would be great too; Making the breakpoints module smarter about
Pedro> that also would be nice.
... sharing objfiles across inferiors would be nice. It seems to me
that this would be important for capping memory use when there are
many inferiors. I wonder if this makes sense with the aspace/sspace
stuff, given that an objfile now has a symbol space.
When gdb sees a new inferior, does it immediately read its debuginfo?
This seems like another possible performance problem; lazily reading
it would be friendlier. In a scenario like the "make" case, I would
assume that most inferiors will not actually require any user
attention, and time and memory spent on their debuginfo is just
wasted.
I saw this in the output:
[Thread debugging using libthread_db enabled]
process 16875 is executing new program: /bin/true
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
Program exited normally.
make[2]: Leaving directory `/home/pedro/gdb/sspaces/build/gdb/gdbserver'
Program exited normally.
Program exited normally.
Program exited normally.
make[1]: Leaving directory `/home/pedro/gdb/sspaces/build/gdb'
Program exited normally.
I think the "(no debugging symbols found)" thing has been addressed.
At least, there was a patch.
"Program exited normally." could also use some love... at least some
info about the program, and maybe removing the excess newlines?
I see in many places that we pass an address_space and a CORE_ADDR
together, e.g.:
+insert_single_step_breakpoint (struct address_space *aspace, CORE_ADDR next_pc)
Does a CORE_ADDR make sense without an address_space?
I'm curious whether you considered putting the address_space into
CORE_ADDR, or making a new type holding both.
+#define exec_bfd current_symbol_space->ebfd
+#define exec_bfd_mtime current_symbol_space->ebfd_mtime
+#define so_list_head current_symbol_space->so_list
+#define symfile_objfile current_symbol_space->symfile_objfile_1
+#define object_files current_symbol_space->objfiles
+#define current_target_sections (¤t_symbol_space->target_sections)
I don't mind this kind of thing as a transitional change, to make it
so a patch doesn't completely explode. But I think I'd prefer, in the
long run, to replace these macros with their expansions (or maybe
accessor macros taking current_symbol_space as an argument)
everywhere. What do you think?
Also, I am curious about the relationship between the current inferior
and the current symbol space. I guess whenever the current inferior
changes, the current inferior space must as well?
+ ui_out_table_header (uiout, 1, ui_left, "current", "");
For some reason I did not think of leaving the header empty when I did
this for "info inferiors". I like this better... since you're also
touching print_inferior, how about just making that change?
I can't really comment on the rest of the patch.
I skimmed it but I don't know the original code well enough.
Nothing stood out as bad.
Tom
next prev parent reply other threads:[~2009-06-17 18:19 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-06-15 15:22 Pedro Alves
2009-06-15 15:51 ` Pedro Alves
2009-06-17 18:19 ` Tom Tromey [this message]
2009-06-25 14:40 ` Pedro Alves
2009-06-26 19:11 ` 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=m3r5xiwwno.fsf@fleche.redhat.com \
--to=tromey@redhat.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