From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18654 invoked by alias); 30 May 2008 14:59:32 -0000 Received: (qmail 18643 invoked by uid 22791); 30 May 2008 14:59:31 -0000 X-Spam-Check-By: sourceware.org Received: from sibelius.xs4all.nl (HELO sibelius.xs4all.nl) (82.92.89.47) by sourceware.org (qpsmtpd/0.31) with ESMTP; Fri, 30 May 2008 14:59:13 +0000 Received: from brahms.sibelius.xs4all.nl (kettenis@localhost.sibelius.xs4all.nl [127.0.0.1]) by brahms.sibelius.xs4all.nl (8.14.3/8.14.3) with ESMTP id m4UEvnLq019317; Fri, 30 May 2008 16:57:50 +0200 (CEST) Received: (from kettenis@localhost) by brahms.sibelius.xs4all.nl (8.14.3/8.14.3/Submit) id m4UEvnGD028393; Fri, 30 May 2008 16:57:49 +0200 (CEST) Date: Fri, 30 May 2008 20:23:00 -0000 Message-Id: <200805301457.m4UEvnGD028393@brahms.sibelius.xs4all.nl> From: Mark Kettenis To: muller@ics.u-strasbg.fr CC: pedro@codesourcery.com, drow@false.org, gdb-patches@sourceware.org In-reply-to: <001a01c8c263$f493b1d0$ddbb1570$@u-strasbg.fr> (muller@ics.u-strasbg.fr) Subject: Re: [PING2] : [RFC/RFA] PING: skip __main References: <004f01c8ac58$06a1ddb0$13e59910$@u-strasbg.fr> <000c01c8c246$de300f50$9a902df0$@u-strasbg.fr> <200805301157.m4UBvOL5009408@brahms.sibelius.xs4all.nl> <001901c8c256$06f8be00$14ea3a00$@u-strasbg.fr> <001a01c8c263$f493b1d0$ddbb1570$@u-strasbg.fr> Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2008-05/txt/msg00773.txt.bz2 > From: "Pierre Muller" > Date: Fri, 30 May 2008 16:46:28 +0200 > > + target_read_memory (pc, &op, 1); > + if (op == 0xe8) > + { > + gdb_byte buf[4]; > + > + if (target_read_memory (pc + 1, buf, sizeof buf) == 0) > + { > + CORE_ADDR call_dest = pc + 5 + extract_unsigned_integer (buf, 4); > Just one small question about this line: > I fear that this line is incorrect, > shouldn't we use extract_signed_integer here? > > The address is relative to pc+5 meaning that > if main is at a higher address than __main, > buf will contain a negative 4byte integer. You're absolutely right. Can you make that change and retest?