From 3e43a32aaa2d78fca10dea6746b820176f39bcc8 Mon Sep 17 00:00:00 2001 From: Michael Snyder Date: Wed, 5 Jan 2011 22:22:53 +0000 Subject: 2011-01-05 Michael Snyder * addrmap.c: Shorten lines of >= 80 columns. * arch-utils.c: Ditto. * arch-utils.h: Ditto. * ax-gdb.c: Ditto. * ax-general.c: Ditto. * bcache.c: Ditto. * blockframe.c: Ditto. * breakpoint.c: Ditto. * buildsym.c: Ditto. * c-lang.c: Ditto. * c-typeprint.c: Ditto. * charset.c: Ditto. * coffread.c: Ditto. * command.h: Ditto. * corelow.c: Ditto. * cp-abi.c: Ditto. * cp-namespace.c: Ditto. * cp-support.c: Ditto. * dbug-rom.c: Ditto. * dbxread.c: Ditto. * defs.h: Ditto. * dfp.c: Ditto. * dfp.h: Ditto. * dictionary.c: Ditto. * disasm.c: Ditto. * doublest.c: Ditto. * dwarf2-frame.c: Ditto. * dwarf2expr.c: Ditto. * dwarf2loc.c: Ditto. * dwarf2read.c: Ditto. * elfread.c: Ditto. * eval.c: Ditto. * event-loop.c: Ditto. * event-loop.h: Ditto. * exceptions.h: Ditto. * exec.c: Ditto. * expprint.c: Ditto. * expression.h: Ditto. * f-lang.c: Ditto. * f-valprint.c: Ditto. * findcmd.c: Ditto. * frame-base.c: Ditto. * frame-unwind.c: Ditto. * frame-unwind.h: Ditto. * frame.c: Ditto. * frame.h: Ditto. * gcore.c: Ditto. * gdb-stabs.h: Ditto. * gdb_assert.h: Ditto. * gdb_dirent.h: Ditto. * gdb_obstack.h: Ditto. * gdbcore.h: Ditto. * gdbtypes.c: Ditto. * gdbtypes.h: Ditto. * inf-ttrace.c: Ditto. * infcall.c: Ditto. * infcmd.c: Ditto. * inflow.c: Ditto. * infrun.c: Ditto. * inline-frame.h: Ditto. * language.c: Ditto. * language.h: Ditto. * libunwind-frame.c: Ditto. * libunwind-frame.h: Ditto. * linespec.c: Ditto. * linux-nat.c: Ditto. * linux-nat.h: Ditto. * linux-thread-db.c: Ditto. * machoread.c: Ditto. * macroexp.c: Ditto. * macrotab.c: Ditto. * main.c: Ditto. * maint.c: Ditto. * mdebugread.c: Ditto. * memattr.c: Ditto. * minsyms.c: Ditto. * monitor.c: Ditto. * monitor.h: Ditto. * objfiles.c: Ditto. * objfiles.h: Ditto. * osabi.c: Ditto. * p-typeprint.c: Ditto. * p-valprint.c: Ditto. * parse.c: Ditto. * printcmd.c: Ditto. * proc-events.c: Ditto. * procfs.c: Ditto. * progspace.c: Ditto. * progspace.h: Ditto. * psympriv.h: Ditto. * psymtab.c: Ditto. * record.c: Ditto. * regcache.c: Ditto. * regcache.h: Ditto. * remote-fileio.c: Ditto. * remote.c: Ditto. * ser-mingw.c: Ditto. * ser-tcp.c: Ditto. * ser-unix.c: Ditto. * serial.c: Ditto. * serial.h: Ditto. * solib-frv.c: Ditto. * solib-irix.c: Ditto. * solib-osf.c: Ditto. * solib-pa64.c: Ditto. * solib-som.c: Ditto. * solib-sunos.c: Ditto. * solib-svr4.c: Ditto. * solib-target.c: Ditto. * solib.c: Ditto. * somread.c: Ditto. * source.c: Ditto. * stabsread.c: Ditto. * stabsread.c: Ditto. * stack.c: Ditto. * stack.h: Ditto. * symfile-mem.c: Ditto. * symfile.c: Ditto. * symfile.h: Ditto. * symmisc.c: Ditto. * symtab.c: Ditto. * symtab.h: Ditto. * target-descriptions.c: Ditto. * target-memory.c: Ditto. * target.c: Ditto. * target.h: Ditto. * terminal.h: Ditto. * thread.c: Ditto. * top.c: Ditto. * tracepoint.c: Ditto. * tracepoint.h: Ditto. * ui-file.c: Ditto. * ui-file.h: Ditto. * ui-out.h: Ditto. * user-regs.c: Ditto. * user-regs.h: Ditto. * utils.c: Ditto. * valarith.c: Ditto. * valops.c: Ditto. * valprint.c: Ditto. * valprint.h: Ditto. * value.c: Ditto. * varobj.c: Ditto. * varobj.h: Ditto. * vec.h: Ditto. * xcoffread.c: Ditto. * xcoffsolib.c: Ditto. * xcoffsolib.h: Ditto. * xml-syscall.c: Ditto. * xml-tdesc.c: Ditto. --- gdb/solib-svr4.c | 26 ++++++++++++++++---------- 1 file changed, 16 insertions(+), 10 deletions(-) (limited to 'gdb/solib-svr4.c') diff --git a/gdb/solib-svr4.c b/gdb/solib-svr4.c index ef04dd7..d45cd92 100644 --- a/gdb/solib-svr4.c +++ b/gdb/solib-svr4.c @@ -1369,8 +1369,8 @@ enable_break (struct svr4_info *info, int from_tty) sym_addr = gdbarch_addr_bits_remove (target_gdbarch, gdbarch_convert_from_func_ptr_addr (target_gdbarch, - sym_addr, - ¤t_target)); + sym_addr, + ¤t_target)); /* On at least some versions of Solaris there's a dynamic relocation on _r_debug.r_brk and SYM_ADDR may not be relocated yet, e.g., if @@ -1788,8 +1788,8 @@ svr4_exec_displacement (CORE_ADDR *displacementp) may be different from EXEC_BFD as the file may have been prelinked to a different address after the executable has been loaded. Moreover the address of placement in target memory can be - different from what the program headers in target memory say - this - is the goal of PIE. + different from what the program headers in target memory say - + this is the goal of PIE. Detected DISPLACEMENT covers both the offsets of PIE placement and possible new prelink performed after start of the program. Here @@ -1799,7 +1799,8 @@ svr4_exec_displacement (CORE_ADDR *displacementp) if (phdrs_size != phdrs2_size || bfd_get_arch_size (exec_bfd) != arch_size) ok = 0; - else if (arch_size == 32 && phdrs_size >= sizeof (Elf32_External_Phdr) + else if (arch_size == 32 + && phdrs_size >= sizeof (Elf32_External_Phdr) && phdrs_size % sizeof (Elf32_External_Phdr) == 0) { Elf_Internal_Ehdr *ehdr2 = elf_tdata (exec_bfd)->elf_header; @@ -1862,11 +1863,13 @@ svr4_exec_displacement (CORE_ADDR *displacementp) /* Check also other adjustment combinations - PR 11786. */ - vaddr = extract_unsigned_integer (buf_vaddr_p, 4, byte_order); + vaddr = extract_unsigned_integer (buf_vaddr_p, 4, + byte_order); vaddr -= displacement; store_unsigned_integer (buf_vaddr_p, 4, byte_order, vaddr); - paddr = extract_unsigned_integer (buf_paddr_p, 4, byte_order); + paddr = extract_unsigned_integer (buf_paddr_p, 4, + byte_order); paddr -= displacement; store_unsigned_integer (buf_paddr_p, 4, byte_order, paddr); @@ -1905,7 +1908,8 @@ svr4_exec_displacement (CORE_ADDR *displacementp) break; } } - else if (arch_size == 64 && phdrs_size >= sizeof (Elf64_External_Phdr) + else if (arch_size == 64 + && phdrs_size >= sizeof (Elf64_External_Phdr) && phdrs_size % sizeof (Elf64_External_Phdr) == 0) { Elf_Internal_Ehdr *ehdr2 = elf_tdata (exec_bfd)->elf_header; @@ -1968,11 +1972,13 @@ svr4_exec_displacement (CORE_ADDR *displacementp) /* Check also other adjustment combinations - PR 11786. */ - vaddr = extract_unsigned_integer (buf_vaddr_p, 8, byte_order); + vaddr = extract_unsigned_integer (buf_vaddr_p, 8, + byte_order); vaddr -= displacement; store_unsigned_integer (buf_vaddr_p, 8, byte_order, vaddr); - paddr = extract_unsigned_integer (buf_paddr_p, 8, byte_order); + paddr = extract_unsigned_integer (buf_paddr_p, 8, + byte_order); paddr -= displacement; store_unsigned_integer (buf_paddr_p, 8, byte_order, paddr); -- cgit v1.1