This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [patch] validate binary before use
- From: Jan Kratochvil <jan dot kratochvil at redhat dot com>
- To: Aleksandar Ristovski <aristovski at qnx dot com>
- Cc: gdb-patches at sourceware dot org, Gary Benson <gbenson at redhat dot com>
- Date: Sat, 6 Apr 2013 17:49:00 +0200
- Subject: Re: [patch] validate binary before use
- References: <20130328183727 dot GA14798 at host2 dot jankratochvil dot net> <515B0632 dot 1040502 at qnx dot com> <20130402165306 dot GA9479 at host2 dot jankratochvil dot net> <515B12D1 dot 7050505 at qnx dot com> <20130403180917 dot GA6102 at host2 dot jankratochvil dot net> <515CDF7F dot 5020403 at qnx dot com> <20130404081302 dot GA4099 at host2 dot jankratochvil dot net> <515D7A09 dot 5010305 at qnx dot com> <20130405114732 dot GA11684 at host2 dot jankratochvil dot net> <515ECC5C dot 7040609 at qnx dot com>
On Fri, 05 Apr 2013 15:06:36 +0200, Aleksandar Ristovski wrote:
> On 13-04-05 07:47 AM, Jan Kratochvil wrote:
> > I was talking about linux-nat to differentiate it from gdbserver. But in fact
> > the non-gdbserver (local) patchset part is in solib-svr4.c, not linux-nat.c.
> > Only that commonly when one uses the local part of solib-svr4.c one is using
> > linux-nat.c that time - but one could be using for example sparc-sol2-nat.c
> > instead.
>
> What I am suggesting is that linux-nat (and any other *-nat) should
> implement TARGET_OBJECT_LIBRARIES_SVR4.
That seems as a great idea, I somehow completely missed that. It should be
enough to implement it to linux-nat (by moving the gdbserver/linux-low.c
implementation to gdb/common/ ), other *-nat targets can implement later if
they want to.
Would you like to check in your patch as is or to rebase it on top of the
TARGET_OBJECT_LIBRARIES_SVR4-only implementation? I do not think too big part
of your patch is affected by it, though. The linux-nat
TARGET_OBJECT_LIBRARIES_SVR4 part should be done quickly I hope.
This may even unify more the Gary's patch, although he has already the
solib-svr4.c part complete.
Jan