This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH, v2] Share ptrace options discovery/linux native code between GDB and gdbserver


On 08/20/2013 12:38 PM, Tom Tromey wrote:
"Luis" == Luis Machado <lgustavo@codesourcery.com> writes:

Luis> This is the second iteration of the patch to do some sharing of ptrace
Luis> and native linux stuff between GDB and gdbserver.

Luis> I've included fixes based on reviews, so hopefully this is in better
Luis> shape now.

Thanks.  I like it.  I have a few nits though.

Luis>           * common/linux-ptrace.c: Include nat/linux-waitpid.h.

I suppose at some point this file ought to be moved.

Right. Should i move it now as part of this cleanup or should i move it in a follow up?


Luis>           * config.in (PTRACE_TYPE_ARG4): Undefine.

Usually for config.in I just write:

	* config.in: Rebuild.

... since presumably you just used autoheader.


Oops. I should probably rebuild it then.

Luis>           * configure.ac (AC_CACHE_CHECK): Add void * to the list of
Luis>           ptrace's 4th argument's types.
Luis>           Check the type of PTRACE_TYPE_ARG4.

AC_CACHE_CHECK isn't the right function name.  Perhaps no name is best
here.

Got it. Let's go with no name.


Also, doesn't this check need to be done in gdbserver as well?

For gdbserver we explicitly define the correct types for each argument.

Since this is a runtime check, we may run into issues if we attempt to run a binary on a build machine if the target machine is from a different architecture. Does it make sense?

Luis


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]