diff options
author | John Baldwin <jhb@FreeBSD.org> | 2015-02-27 13:17:43 -0500 |
---|---|---|
committer | John Baldwin <jhb@FreeBSD.org> | 2015-03-13 14:01:38 -0400 |
commit | 773eacf5b0362c755ac47cb66d15d07558d9ce20 (patch) | |
tree | b7a25bd632875a446e200f6d82372c140278d891 /gdb/i386fbsd-tdep.c | |
parent | 4bf8c6e8986890caa482c845d2c4a0ff238c1e28 (diff) | |
download | gdb-773eacf5b0362c755ac47cb66d15d07558d9ce20.zip gdb-773eacf5b0362c755ac47cb66d15d07558d9ce20.tar.gz gdb-773eacf5b0362c755ac47cb66d15d07558d9ce20.tar.bz2 |
Style fixes.
- Do not leave operators at end-of-line.
- Fix block indentation in if-else chain.
gdb/ChangeLog:
* amd64fbsd-tdep.c (amd64fbsd_sigtramp_p): Style fixes.
* i386fbsd-tdep.c: Fix style in various gdb_static_assert
expressions.
(i386fbsd_sigtramp_p): Likewise.
Diffstat (limited to 'gdb/i386fbsd-tdep.c')
-rw-r--r-- | gdb/i386fbsd-tdep.c | 64 |
1 files changed, 35 insertions, 29 deletions
diff --git a/gdb/i386fbsd-tdep.c b/gdb/i386fbsd-tdep.c index d4516ee..ed41706 100644 --- a/gdb/i386fbsd-tdep.c +++ b/gdb/i386fbsd-tdep.c @@ -105,24 +105,24 @@ static const gdb_byte i386fbsd_osigtramp_end[] = }; /* The three different trampolines are all the same size. */ -gdb_static_assert (sizeof i386fbsd_sigtramp_start == - sizeof i386fbsd_freebsd4_sigtramp_start); -gdb_static_assert (sizeof i386fbsd_sigtramp_start == - sizeof i386fbsd_osigtramp_start); -gdb_static_assert (sizeof i386fbsd_sigtramp_middle == - sizeof i386fbsd_freebsd4_sigtramp_middle); -gdb_static_assert (sizeof i386fbsd_sigtramp_middle == - sizeof i386fbsd_osigtramp_middle); -gdb_static_assert (sizeof i386fbsd_sigtramp_end == - sizeof i386fbsd_freebsd4_sigtramp_end); -gdb_static_assert (sizeof i386fbsd_sigtramp_end == - sizeof i386fbsd_osigtramp_end); +gdb_static_assert (sizeof i386fbsd_sigtramp_start + == sizeof i386fbsd_freebsd4_sigtramp_start); +gdb_static_assert (sizeof i386fbsd_sigtramp_start + == sizeof i386fbsd_osigtramp_start); +gdb_static_assert (sizeof i386fbsd_sigtramp_middle + == sizeof i386fbsd_freebsd4_sigtramp_middle); +gdb_static_assert (sizeof i386fbsd_sigtramp_middle + == sizeof i386fbsd_osigtramp_middle); +gdb_static_assert (sizeof i386fbsd_sigtramp_end + == sizeof i386fbsd_freebsd4_sigtramp_end); +gdb_static_assert (sizeof i386fbsd_sigtramp_end + == sizeof i386fbsd_osigtramp_end); /* We assume that the middle is the largest chunk below. */ -gdb_static_assert (sizeof i386fbsd_sigtramp_middle > - sizeof i386fbsd_sigtramp_start); -gdb_static_assert (sizeof i386fbsd_sigtramp_middle > - sizeof i386fbsd_sigtramp_end); +gdb_static_assert (sizeof i386fbsd_sigtramp_middle + > sizeof i386fbsd_sigtramp_start); +gdb_static_assert (sizeof i386fbsd_sigtramp_middle + > sizeof i386fbsd_sigtramp_end); static int i386fbsd_sigtramp_p (struct frame_info *this_frame) @@ -135,19 +135,25 @@ i386fbsd_sigtramp_p (struct frame_info *this_frame) if (!safe_frame_unwind_memory (this_frame, pc, buf, sizeof i386fbsd_sigtramp_start)) return 0; - if (memcmp (buf, i386fbsd_sigtramp_start, sizeof i386fbsd_sigtramp_start) == - 0) { - middle = i386fbsd_sigtramp_middle; - end = i386fbsd_sigtramp_end; - } else if (memcmp (buf, i386fbsd_freebsd4_sigtramp_start, - sizeof i386fbsd_freebsd4_sigtramp_start) == 0) { - middle = i386fbsd_freebsd4_sigtramp_middle; - end = i386fbsd_freebsd4_sigtramp_end; - } else if (memcmp (buf, i386fbsd_osigtramp_start, - sizeof i386fbsd_osigtramp_start) == 0) { - middle = i386fbsd_osigtramp_middle; - end = i386fbsd_osigtramp_end; - } else + if (memcmp (buf, i386fbsd_sigtramp_start, sizeof i386fbsd_sigtramp_start) + == 0) + { + middle = i386fbsd_sigtramp_middle; + end = i386fbsd_sigtramp_end; + } + else if (memcmp (buf, i386fbsd_freebsd4_sigtramp_start, + sizeof i386fbsd_freebsd4_sigtramp_start) == 0) + { + middle = i386fbsd_freebsd4_sigtramp_middle; + end = i386fbsd_freebsd4_sigtramp_end; + } + else if (memcmp (buf, i386fbsd_osigtramp_start, + sizeof i386fbsd_osigtramp_start) == 0) + { + middle = i386fbsd_osigtramp_middle; + end = i386fbsd_osigtramp_end; + } + else return 0; /* Since the end is shorter than the middle, check for a matching end |