This is the mail archive of the gdb-patches@sources.redhat.com 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] |
Either way we'll end up with casts:
CORE_ADDR -> (void *)
(void *) -> long
etc, why not have methods that at least avoid the casts (or do it locally to GDB's ptrace code?).
The problem here is that the third argument of ptrace is used for two purposes:
1. For specifying memory addresses of objects in the debugger's address space (PT_GETREGS, PT_SETREGS, PT_IO).
2. For specifying memory addresses in the inferior.
This gets especially complicated with 32x64 "native" cross-debugging and is further complicated by the fact that some systems use an integer type and other systems use a pointer type for this third arguments.
I've tried to come up with a function signature for gdb_ptrace() that would work for all targets, and I failed.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |