- /* If the program was unthreaded, then we'll just create a
- .reg section.
-
- If the program was threaded, then we'll create .reg/XXXXX
- section for each thread, where XXXXX is a printable
- representation of the kernel thread id. We'll also
- create a .reg section for the thread that was running
- and signalled at the time of the core-dump (i.e., this
- is effectively an alias, needed to keep GDB happy.)
-
- Note that we use `.reg/XXXXX' as opposed to '.regXXXXX'
- because GDB expects that .reg2 will be the floating-
- point registers. */
- if (core_kernel_thread_id (abfd) == 0)
- {
- if (!make_bfd_asection (abfd, ".reg",
- SEC_HAS_CONTENTS,
- core_header.len,
- (int) &proc_info - (int) & proc_info.hw_regs,
- 2))
+ /* If the program was unthreaded, then we'll just create a
+ .reg section.
+
+ If the program was threaded, then we'll create .reg/XXXXX
+ section for each thread, where XXXXX is a printable
+ representation of the kernel thread id. We'll also
+ create a .reg section for the thread that was running
+ and signalled at the time of the core-dump (i.e., this
+ is effectively an alias, needed to keep GDB happy.)
+
+ Note that we use `.reg/XXXXX' as opposed to '.regXXXXX'
+ because GDB expects that .reg2 will be the floating-
+ point registers. */
+ if (core_kernel_thread_id (abfd) == 0)
+ {
+ if (!make_bfd_asection (abfd, ".reg",
+ SEC_HAS_CONTENTS,
+ core_header.len,
+ (bfd_vma) offsetof (struct proc_info,
+ hw_regs),
+ 2))