From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20821 invoked by alias); 15 Feb 2011 15:28:28 -0000 Mailing-List: contact archer-commits-help@sourceware.org; run by ezmlm Sender: Precedence: bulk List-Post: List-Help: List-Subscribe: Received: (qmail 20792 invoked by uid 9813); 15 Feb 2011 15:28:27 -0000 Date: Tue, 15 Feb 2011 15:28:00 -0000 Message-ID: <20110215152827.20777.qmail@sourceware.org> From: sergiodj@sourceware.org To: archer-commits@sourceware.org Subject: [SCM] archer-sergiodj-stap: Minor nits with elfread.c. X-Git-Refname: refs/heads/archer-sergiodj-stap X-Git-Reftype: branch X-Git-Oldrev: 23228e3549b15e7484bd64040fbdd5a0389b75ae X-Git-Newrev: 9e4a836b7d6f330781826c6058c874dbee886b4a X-SW-Source: 2011-q1/txt/msg00123.txt.bz2 List-Id: The branch, archer-sergiodj-stap has been updated via 9e4a836b7d6f330781826c6058c874dbee886b4a (commit) from 23228e3549b15e7484bd64040fbdd5a0389b75ae (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email. - Log ----------------------------------------------------------------- commit 9e4a836b7d6f330781826c6058c874dbee886b4a Author: Sergio Durigan Junior Date: Tue Feb 15 13:27:21 2011 -0200 Minor nits with elfread.c. ----------------------------------------------------------------------- Summary of changes: gdb/elfread.c | 25 ++++++++----------------- 1 files changed, 8 insertions(+), 17 deletions(-) First 500 lines of diff: diff --git a/gdb/elfread.c b/gdb/elfread.c index 346e637..c48e9ce 100644 --- a/gdb/elfread.c +++ b/gdb/elfread.c @@ -1060,7 +1060,7 @@ handle_probe (struct objfile *objfile, struct sdt_note *el, bfd *abfd = objfile->obfd; int size = bfd_get_arch_size (abfd) / 8; struct gdbarch *gdbarch = get_current_arch (); - enum bfd_endian byte_order = gdbarch_byte_order (gdbarch); + struct type *ptr_type = builtin_type (gdbarch)->builtin_data_ptr; CORE_ADDR base_ref; /* Provider and the name of the probe. */ @@ -1070,25 +1070,20 @@ handle_probe (struct objfile *objfile, struct sdt_note *el, + el->size - (unsigned long *) ret->provider); /* Making sure there is a name. */ if (!ret->name) - { - CORE_ADDR tmp = (CORE_ADDR) &ret->provider[0]; - - complaint (&symfile_complaints, _("corrupt probe when reading `%s' \ -at `%s'"), - objfile->name, paddress (gdbarch, tmp)); - } + complaint (&symfile_complaints, _("corrupt probe when reading `%s'"), + objfile->name); else ++ret->name; /* Retrieving the probe's address. */ ret->address = extract_typed_address ((const gdb_byte *) &el->data[0], - builtin_type (gdbarch)->builtin_data_ptr); + ptr_type); /* Link-time sh_addr of `.stapsdt.base' section. */ base_ref = extract_typed_address ((const gdb_byte *) &el->data[size], - builtin_type (gdbarch)->builtin_data_ptr); + ptr_type); /* Semaphore address. */ ret->sem_addr = extract_typed_address ((const gdb_byte *) &el->data[2 * size], - builtin_type (gdbarch)->builtin_data_ptr); + ptr_type); ret->address += base - base_ref; if (ret->sem_addr) @@ -1105,12 +1100,8 @@ at `%s'"), || memchr (ret->args, '\0', (unsigned long *) el->data + el->size - (unsigned long *) ret->name) != el->data + el->size - 1) - { - CORE_ADDR tmp = (CORE_ADDR) &ret->name[0]; - - complaint (&symfile_complaints, _("corrupt probe when reading \ -`%s' at `%s'"), objfile->name, paddress (gdbarch, tmp)); - } + complaint (&symfile_complaints, _("corrupt probe when reading `%s'"), + objfile->name); } else ret->args = NULL; hooks/post-receive -- Repository for Project Archer.