aboutsummaryrefslogtreecommitdiff
path: root/gdb/amd64-darwin-tdep.c
diff options
context:
space:
mode:
authorSimon Marchi <simon.marchi@polymtl.ca>2023-02-08 15:36:23 -0500
committerSimon Marchi <simon.marchi@polymtl.ca>2023-02-08 15:46:02 -0500
commitc583a2520616c2736cffc389c89a48b159366e6c (patch)
treeb4925f26506fcee96c16119431c01760f05db95d /gdb/amd64-darwin-tdep.c
parentca7f92c2f15b86b09c4a8ad14806bef666308d31 (diff)
downloadbinutils-users/simark/clang-format.zip
binutils-users/simark/clang-format.tar.gz
binutils-users/simark/clang-format.tar.bz2
Run clang-format.shusers/simark/clang-format
Change-Id: Ia948cc26d534b0dd02702244d52434b1a2093968
Diffstat (limited to 'gdb/amd64-darwin-tdep.c')
-rw-r--r--gdb/amd64-darwin-tdep.c54
1 files changed, 24 insertions, 30 deletions
diff --git a/gdb/amd64-darwin-tdep.c b/gdb/amd64-darwin-tdep.c
index a682cf4..56a989d 100644
--- a/gdb/amd64-darwin-tdep.c
+++ b/gdb/amd64-darwin-tdep.c
@@ -40,36 +40,29 @@
/* Offsets into the struct x86_thread_state64 where we'll find the saved regs.
From <mach/i386/thread_status.h> and amd64-tdep.h. */
-int amd64_darwin_thread_state_reg_offset[] =
-{
- 0 * 8, /* %rax */
- 1 * 8, /* %rbx */
- 2 * 8, /* %rcx */
- 3 * 8, /* %rdx */
- 5 * 8, /* %rsi */
- 4 * 8, /* %rdi */
- 6 * 8, /* %rbp */
- 7 * 8, /* %rsp */
- 8 * 8, /* %r8 ... */
- 9 * 8,
- 10 * 8,
- 11 * 8,
- 12 * 8,
- 13 * 8,
- 14 * 8,
- 15 * 8, /* ... %r15 */
- 16 * 8, /* %rip */
- 17 * 8, /* %rflags */
- 18 * 8, /* %cs */
- -1, /* %ss */
- -1, /* %ds */
- -1, /* %es */
- 19 * 8, /* %fs */
- 20 * 8 /* %gs */
+int amd64_darwin_thread_state_reg_offset[] = {
+ 0 * 8, /* %rax */
+ 1 * 8, /* %rbx */
+ 2 * 8, /* %rcx */
+ 3 * 8, /* %rdx */
+ 5 * 8, /* %rsi */
+ 4 * 8, /* %rdi */
+ 6 * 8, /* %rbp */
+ 7 * 8, /* %rsp */
+ 8 * 8, /* %r8 ... */
+ 9 * 8, 10 * 8, 11 * 8, 12 * 8, 13 * 8, 14 * 8, 15 * 8, /* ... %r15 */
+ 16 * 8, /* %rip */
+ 17 * 8, /* %rflags */
+ 18 * 8, /* %cs */
+ -1, /* %ss */
+ -1, /* %ds */
+ -1, /* %es */
+ 19 * 8, /* %fs */
+ 20 * 8 /* %gs */
};
-const int amd64_darwin_thread_state_num_regs =
- ARRAY_SIZE (amd64_darwin_thread_state_reg_offset);
+const int amd64_darwin_thread_state_num_regs
+ = ARRAY_SIZE (amd64_darwin_thread_state_reg_offset);
/* Assuming THIS_FRAME is a Darwin sigtramp routine, return the
address of the associated sigcontext structure. */
@@ -117,9 +110,10 @@ x86_darwin_init_abi_64 (struct gdbarch_info info, struct gdbarch *gdbarch)
}
void _initialize_amd64_darwin_tdep ();
+
void
_initialize_amd64_darwin_tdep ()
{
- gdbarch_register_osabi (bfd_arch_i386, bfd_mach_x86_64,
- GDB_OSABI_DARWIN, x86_darwin_init_abi_64);
+ gdbarch_register_osabi (bfd_arch_i386, bfd_mach_x86_64, GDB_OSABI_DARWIN,
+ x86_darwin_init_abi_64);
}