ptid from core section

Aleksandar Ristovski aristovski@qnx.com
Mon Jun 1 15:56:00 GMT 2009


Hello,

In corelow.c we have several architecture specific lines for 
determining ptid from core section. The same for getting 
section name given inferior_ptid.

This patch moves architecture specific parts into two new 
functions: gdbarch_ptid_from_core_section and 
gdbarch_core_section_name_from_ptid.

They replace Pedro's gdbarch_core_reg_section_encodes_pid 
since predicate is now redundant.

I haven't added diffs for generated gdbarch.h/c, I would 
like to get your thoughts about this first.

Thanks,

Aleksandar Ristovski
QNX Software Systems

Change log:

* corelow.c (add_to_thread_list): Use new 
gdbarch_ptid_from_core_section.
(get_core_register_section): Use new 
gdbarch_core_section_name_from_ptid.
* gdbarch.sh (core_reg_section_encodes_pid): Deleted.
(ptid_from_core_section, core_section_name_from_ptid): New 
functions.
(default_ptid_from_core_section, 
default_core_section_name_from_ptid): New functions.
* sol2-tdep.h (sol2_ptid_from_core_section,
sol2_core_section_name_from_ptid): New declarations.
* sol2-tdep.c (sol2_ptid_from_core_section,
sol2_core_section_name_from_ptid): New functions.
* amd64-sol2-tdep.c (amd64_sol2_init_abi): Register the two 
functions.
* sparc-sol2-tdep.c (sparc32_sol2_init_abi): Likewise.
* sparc64-sol2-tdep.c (sparc64_sol2_init_abi): Likewise.
* i386-sol2-tdep.c (i386_sol2_init_abi): Likewise.



More information about the Gdb-patches mailing list