From: Jan Kratochvil <jan.kratochvil@redhat.com>
To: Pedro Alves <palves@redhat.com>
Cc: gdb-patches@sourceware.org,
Aleksandar Ristovski <ARistovski@qnx.com>,
Joel Brobecker <brobecker@adacore.com>
Subject: Re: [patchv3 0/8] Validate binary before use
Date: Sat, 08 Mar 2014 17:33:00 -0000 [thread overview]
Message-ID: <20140308173316.GA18331@host2.jankratochvil.net> (raw)
In-Reply-To: <53148332.7010600@redhat.com>
On Mon, 03 Mar 2014 14:27:14 +0100, Pedro Alves wrote:
> On 03/02/2014 06:36 PM, Jan Kratochvil wrote:
> > > BTW, do you plan on contributing support for validation with cores too?
> >
> > No.
>
> OK. I think it'd be useful, so that GDB can warn/reject in the
> common scenario of the user not pointing at a sysroot with the
> correct DSOs.
Yes, may extensions would be useful. The question is if it should be
a blocker for this patch series.
> Thanks. I think that feature may be a little beyond borderline
> for that project page though, as core loading is not really part
> of the native target. IMO it'd good if this had its own project
> page, where it'd give answer to questions like the below.
Created:
https://sourceware.org/gdb/wiki/GDBserverCoreFiles
And removed it from:
https://sourceware.org/gdb/wiki/LocalRemoteFeatureParity?action=diff&rev2=57&rev1=56
> #0 - If implemented by gdbserver, it seems like it'd involve further user
> action to trigger the feature? How does one tell GDB/gdbserver to load the
> ore on the remote side rather than locally?
I did not think more about it as I have never started that project.
The basic functionality would be:
$ gdbserver -c :1234 corefile
$ gdb executable
(gdb) target remote :1234
And if I did not forget anything it could work.
For more comfortable use it overlaps more with my non-upstreamed patches:
http://pkgs.fedoraproject.org/cgit/gdb.git/tree/gdb-6.6-buildid-locate.patch
http://pkgs.fedoraproject.org/cgit/gdb.git/tree/gdb-6.6-buildid-locate-core-as-arg.patch
So that one could possibly load executable+libraries by:
$ gdbserver :1234 corefile
$ gdb
(gdb) target (extended-?)remote :1234
The same way one can load executable+libraries in linux-nat and the patches
above using:
$ gdb corefile
> #1 - couldn't this be addressed by just using fuse/ssh/somesuch to
> access the core? (that is, transparently from GDB).
It could but in many cases would be slower than uploading the whole corefile.
It all depends on upload bandwidth vs. RTT. Depending on these two link
parameters currently for some people is faster to do core file upload, for
other people to do NFS-like corefile access.
The best choice would be the gdbserver-for-corefile as in such case the major
RTT hit is the link_map traversal while gdbserver can send
qXfer:libraries-svr4:read.
OTOH nowadays there is also NT_FILE but so far GDB does not use it for the
shared library list, it may also contain ELF files mmap()ed and not
dlopen()ed.
> #2 - if not, could we perhaps tweak the target stratum bits a little to
> allow sitting core_ops on top of extended-remote, and have it read the
> necessary bits off the remote core with target_fileio_xxx. So we'd
> still have host-side core_ops / bfd. You'd load the core with e.g.,
> "core remote:/.../core.pid").
The same performance problem as #1 above.
> >>> --- a/gdb/testsuite/gdb.base/solib-mismatch.exp
> >>> +++ b/gdb/testsuite/gdb.base/solib-mismatch.exp
> >>> @@ -1,4 +1,4 @@
> >>> -# Copyright 2013 Free Software Foundation, Inc.
> >>> +# Copyright 2014 Free Software Foundation, Inc.
> >>
> >> These need to be 2013-2014.
> >
> > Why? It counts since the first post to gdb-patches?
>
> https://sourceware.org/ml/gdb-patches/2014-02/msg00859.html
Do you mean this part?
# 1. We start claiming copyright the year the file as committed
# to a medium (hard drive), not the year it was published.
Does "medium" mean any disk even unrelated to the GDB project?
Or does "medium" mean "any medium used for GDB development"?
It is not discussed more above, I guess you mean the former but was it really
meant that way? (Cced Joel)
Thanks,
Jan
next prev parent reply other threads:[~2014-03-08 17:33 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-27 21:33 Jan Kratochvil
2014-02-28 13:47 ` Pedro Alves
2014-02-28 14:17 ` Aleksandar Ristovski
2014-03-02 18:37 ` Jan Kratochvil
2014-03-03 13:27 ` Pedro Alves
2014-03-08 17:33 ` Jan Kratochvil [this message]
2014-03-10 9:57 ` Joel Brobecker
2014-03-10 10:12 ` Jan Kratochvil
2014-03-10 14:27 ` 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=20140308173316.GA18331@host2.jankratochvil.net \
--to=jan.kratochvil@redhat.com \
--cc=ARistovski@qnx.com \
--cc=brobecker@adacore.com \
--cc=gdb-patches@sourceware.org \
--cc=palves@redhat.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