Re: Changes required for x86 address spaces
Pedro Alves <[email protected]>
| Newsgroups | gmane.comp.gdb.devel |
|---|---|
| Message-ID | <[email protected]> |
On 10/21/2015 06:47 PM, Richard Henderson wrote: > I was thinking the same thing. Presumably all one needs to do is define new > architecture registers and fill in the blanks. But I've lost track of how to > do that these days; it seems to be scattered across 19 different files... Yeah, on x86-64, fs_base and fs_base are available in user_regs_struct nowadays, thus accessible with PTRACE_PEEKUSER and PTRACE_GETREGSET. Basically you need to: - add new gdb register numbers to amd64-tdep.h - add the ptrace/gdb register mapping to amd64-linux-tdep.c:amd64_linux_gregset_reg_offset - add new xml files to gdb/features/i386/ - make gdb/x86-linux-nat.c:x86_linux_read_description return the new description. Thanks, Pedro Alves