This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
Variables in gdbarch
- From: "D.Venkatasubramanian, Noida" <dvenkat at noida dot hcltech dot com>
- To: gdb at sources dot redhat dot com
- Date: Thu, 21 Aug 2003 19:37:57 +0530
- Subject: Variables in gdbarch
Hi All,
I was trying to port GDB to a new target, and it seems,
almost entirely all the work would be filling up the
gdbarch structure for the new target.
I was trying to understand all the variables and
function pointers in the structure. I started with the
variables, unfortunately, the Internals Document does
not seem to explain all those variables and function
pointers and their significance.
I did figure out significance of many of the variables,
but I am stuck up with some. Probably, some of you could
go through the list and help me understand them. And we
could build this list and add that to the documentation
so that others do not have to duplicate my efforts when
porting for some new targets.
These are some of the ones, I haven't figured out still:
6. nr_data unsigned
26. npc_regnum int
31. deprecated_use_generic_dummy_frames int
33. call_dummy_location int
34. deprecated_call_dummy_start_offset CORE_ADDR
35. deprecated_call_dummy_breakpoint_offset CORE_ADDR
36. deprecated_call_dummy_length int
37. deprecated_call_dummy_words LONGEST *
38. deprecated_sizeof_call_dummy_words int
39. deprecated_call_dummy_stack_adjust int
41. Believe_pcc_promotion int
42. Believe_pcc_promotion_type int
51. Cannot_step_breakpoint int
52. have_nonsteppable_watchpoint int
Also, are the significances of those I gathered correct?
I would move on to the function pointers once this is
finished and wrapped up.
Any help would be highly appreciated. :-)
Thanks and Regards,
Venky
No. Variable Name Type
Description
_________________________________________________________
1. initialized_p int
Has the target been initialized fully.
2. bfd_arch_info const struct bfd_arch_info *
Architecture info from BFD for the target.
3. byte_order int
Byte order of the target.
4. gdb_osabi osabi enum
The OSABI used for the target.
5. tdep struct gdbarch_tdep *
This should be defined if required in the arch-tdep.c/h file.
It should contain any target dependent variables, which are
not covered by the generic variables already defined.
6. nr_data unsigned
7. data void **
Data pointer locations.
8. Swap struct gdbarch_swap *
Swap structure, generally not set by any of the architectures.
9. short_bit int
The number of bits in a 'short' data type on the target.
10. int_bit int
The number of bits in a 'int' data type on the target.
11. long_bit int
The number of bits in a 'long_bit' data type on the target.
12. long_long_bit int
The number of bits in a 'long_long' data type on the target.
13. float_bit int
The number of bits in a 'float' data type on the target.
14. double_bits int
The number of bits in a 'double' data type on the target.
15. long_double_bit int
The number of bits in a 'long_double' data type on the target.
16. ptr_bit int
The number of bits in a 'pointer' data type on the target.
17. addr_bit int
The number of bits in a 'address' on the target.
18. bfd_vma_bit int
Generally not required to be defined for any target.
Default value is 8 * sizeof (void *).
19. char_signed int
Whether the sign bit should be zero/one for a signed character.
20. num_regs int
The number of regs in the target.
21. num_pseudo_regs int
The number of pseudo registers in the target.
22. sp_regnum int
The register number of the 'Stack Pointer' if it is not separate.
23. pc_regnum int
The register number of 'Program Counter'.
24. ps_regnum int
The register number of 'Processor Status Register'.
25. fp0_regnum int
The register number of the first floating point register.
26. npc_regnum int
27. deprecated_register_bytes int
The total size in bytes of all the registers in the target.
28. deprecated_max_register_raw_size int
The maximum raw size in bytes of any register on the target.
29. deprecated_max_register_virtual_size int
The maximum virtual size in bytes of any register on the
target. Generally, this should be equal to
deprecated_max_register_raw_size.
30. deprecated_fp_regnum int
The register number of the 'Frame Pointer'.
31. deprecated_use_generic_dummy_frames int
32. deprecated_register_size int
Default register size on the target architecture in bytes.
33. call_dummy_location int
34. deprecated_call_dummy_start_offset CORE_ADDR
35. deprecated_call_dummy_breakpoint_offset CORE_ADDR
36. deprecated_call_dummy_length int
37. deprecated_call_dummy_words LONGEST *
38. deprecated_sizeof_call_dummy_words int
39. deprecated_call_dummy_stack_adjust int
40. deprecated_extra_stack_alignment_needed int
Whether any kind of stack alignment is needed by the target.
41. believe_pcc_promotion int
42. believe_pcc_promotion_type int
43. decr_pc_after_break CORE_ADDR
Amount PC must be decremented by after a breakpoint.
This is often the number of bytes returned by BREAKPOINT_FROM_PC
but not always.
44. function_start_offset CORE_ADDR
Offset from address of function to start of its code.
Zero on most machines.
45. frame_args_skip CORE_ADDR
This value is almost never non-zero.
46. parm_boundary int
Almost never set for any target except m68k.
47. float_format const struct floatformat *
A floatformat pointer describing attributes of a 'float'
data type on the target.
48. double_format const struct floatformat *
A floatformat pointer describing attributes of a 'double'
data type on the target.
49. long_double_format const struct floatformat *
A floatformat pointer describing attributes of a 'long_double'
data type on the target.
50. name_of_malloc const char *
Whether malloc is called using some other name, such as _malloc.
This variable is used only by i386-interix at present.
51. cannot_step_breakpoint int
52. have_nonsteppable_watchpoint int