tech-toolchain archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Base GDB tracing 32bit applications on amd64 kernel (with 64bit debugger) part 1)



On 24.06.2019 00:54, Christos Zoulas wrote:
> In article <16214014-877d-bd80-654e-814f7780438b%gmx.com@localhost>,
> Kamil Rytarowski  <n54%gmx.com@localhost> wrote:
>>
>> We still want to pass FS/GS to userland through ptrace(2).
> 
> I left the native path alone...
> 

OK. We will reach to this point sooner or later as we need FS/GS in a
debugger.

FreeBSD had to introduce dedicated get/set calls in ptrace(2) to
interact with these registers.

>> For PK_32 we could keep check for VM_MAXUSER_ADDRESS32.
> 
> I fixed that in my own copy.
> 
> christos
> 

Thanks!

Please also include the patch of mine to fix OSABI. This patch has to be
introduced in a claner version with regenerated mknative. I think we
might not need to include dist/gdb/i386-nbsd-nat.c in the build.. as we
need only to call _initialize_i386nbsd_tdep () and register osabi.

https://www.netbsd.org/~kamil/patch-00130-32bit-tracee-64bit-gdb.txt

I'm right now not sure if it is fixing in the current support anything
beyond a warning:

"warning: A handler for the OS ABI "NetBSD" is not built into this
configuration
of GDB.  Attempting to continue with the default i386 settings."

The same approach of building and using i386 + amd64 is in at least FreeBSD.

Attachment: signature.asc
Description: OpenPGP digital signature



Home | Main Index | Thread Index | Old Index