This is the mail archive of the 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]

ptid from core section


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.


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.
* (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.

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