This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [patchv3 0/8] Validate binary before use
- From: Pedro Alves <palves at redhat dot com>
- To: Jan Kratochvil <jan dot kratochvil at redhat dot com>
- Cc: gdb-patches at sourceware dot org, Aleksandar Ristovski <ARistovski at qnx dot com>, Joel Brobecker <brobecker at adacore dot com>
- Date: Mon, 10 Mar 2014 14:26:45 +0000
- Subject: Re: [patchv3 0/8] Validate binary before use
- Authentication-results: sourceware.org; auth=none
- References: <20140227213229 dot GA21121 at host2 dot jankratochvil dot net> <5310933E dot 8000601 at redhat dot com> <20140302183659 dot GA11910 at host2 dot jankratochvil dot net> <53148332 dot 7010600 at redhat dot com> <20140308173316 dot GA18331 at host2 dot jankratochvil dot net>
On 03/08/2014 05:33 PM, Jan Kratochvil wrote:
> 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.
Not at all, IMO. I was just really asking whether that was
already in the works. If not, fine, it's still forward progress
without it.
>> 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
Thanks.
>
>
>> #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.
Yeah. I was more thinking of (persistent) extended-remote, like:
$ gdbserver --multi :1234
$ gdb
(gdb) target extended-remote :1234
(gdb) ???
Just "core COREFILE" at that point currently makes GDB disconnect
from the remote, and load the core itself (on the host). Ideally
we'd have some way to tell GDB we actually want to load the core on
the currently connected remote end. I guess a new knob ('set core
host/target/auto'), plus a new option to the "core" command,
like "core -target" or some such. Seems doable.
--
Pedro Alves