From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27085 invoked by alias); 15 Mar 2011 20:24:23 -0000 Mailing-List: contact archer-commits-help@sourceware.org; run by ezmlm Sender: Precedence: bulk List-Post: List-Help: List-Subscribe: Received: (qmail 27039 invoked by uid 306); 15 Mar 2011 20:24:21 -0000 Date: Tue, 15 Mar 2011 20:24:00 -0000 Message-ID: <20110315202421.27023.qmail@sourceware.org> From: tromey@sourceware.org To: archer-commits@sourceware.org Subject: [SCM] archer-sergiodj-stap: add text offset to probe address also, make some variables more local X-Git-Refname: refs/heads/archer-sergiodj-stap X-Git-Reftype: branch X-Git-Oldrev: 539bfe42f84f1fc3b568758505b012b3c0956083 X-Git-Newrev: b7a8258a05fc4c3088b9b3f7e668400ca7fbb27a X-SW-Source: 2011-q1/txt/msg00199.txt.bz2 List-Id: The branch, archer-sergiodj-stap has been updated via b7a8258a05fc4c3088b9b3f7e668400ca7fbb27a (commit) from 539bfe42f84f1fc3b568758505b012b3c0956083 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email. - Log ----------------------------------------------------------------- commit b7a8258a05fc4c3088b9b3f7e668400ca7fbb27a Author: Tom Tromey Date: Tue Mar 15 14:23:41 2011 -0600 add text offset to probe address also, make some variables more local ----------------------------------------------------------------------- Summary of changes: gdb/elfread.c | 10 ++++++---- 1 files changed, 6 insertions(+), 4 deletions(-) First 500 lines of diff: diff --git a/gdb/elfread.c b/gdb/elfread.c index ec4ba9f..34b9bf0 100644 --- a/gdb/elfread.c +++ b/gdb/elfread.c @@ -1167,10 +1167,6 @@ elf_get_probes (struct objfile *objfile, int *num_probes) { struct stap_probe *ret = NULL; struct stap_probe_per_objfile *probes_per_objfile; - bfd *obfd = objfile->obfd; - bfd_vma base = get_base_address (obfd); - struct sdt_note *iter; - int i; /* Initially, no probes. */ *num_probes = 0; @@ -1187,6 +1183,12 @@ elf_get_probes (struct objfile *objfile, int *num_probes) the objfile has, and then fill in the necessary information for each one. */ + bfd *obfd = objfile->obfd; + bfd_vma base = (get_base_address (obfd) + + ANOFFSET (objfile->section_offsets, + SECT_OFF_TEXT (objfile))); + struct sdt_note *iter; + int i; int n = 0; if (! elf_tdata (obfd)->sdt_note_head) hooks/post-receive -- Repository for Project Archer.