From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12602 invoked by alias); 10 Jan 2011 21:25:54 -0000 Received: (qmail 12579 invoked by uid 22791); 10 Jan 2011 21:25:53 -0000 X-SWARE-Spam-Status: No, hits=-2.3 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,RFC_ABUSE_POST X-Spam-Check-By: sourceware.org Received: from mail-fx0-f41.google.com (HELO mail-fx0-f41.google.com) (209.85.161.41) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 10 Jan 2011 21:25:47 +0000 Received: by fxm12 with SMTP id 12so12756650fxm.0 for ; Mon, 10 Jan 2011 13:25:44 -0800 (PST) Received: by 10.223.71.197 with SMTP id i5mr4213faj.127.1294694744599; Mon, 10 Jan 2011 13:25:44 -0800 (PST) MIME-Version: 1.0 Received: by 10.223.74.137 with HTTP; Mon, 10 Jan 2011 13:25:23 -0800 (PST) In-Reply-To: References: <1294308908-23356-1-git-send-email-vapier@gentoo.org> From: Mike Frysinger Date: Mon, 10 Jan 2011 21:25:00 -0000 Message-ID: Subject: Re: [PATCH] gdb: add callback defines for new ARGV handling To: Doug Evans Cc: gdb-patches@sourceware.org, toolchain-devel@blackfin.uclinux.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes 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: 2011-01/txt/msg00204.txt.bz2 On Mon, Jan 10, 2011 at 12:57 PM, Doug Evans wrote: > On Thu, Jan 6, 2011 at 2:15 AM, Mike Frysinger wrote: >> The common sim code has slightly unfinished support for these already, >> but even arch ports are unable to handle these if the common header does >> not define them. =A0This is because the generated callback header includ= es >> simple common gdb/sim headers only which causes it to skip the new ARGV >> syscalls. =A0Plus, it isn't like providing these in the common header wi= ll >> break any sim targets which don't want them. >> >> Signed-off-by: Mike Frysinger >> >> 2010-01-06 =A0Mike Frysinger =A0 >> >> =A0 =A0 =A0 =A0* callback.h (CB_SYS_argc, CB_SYS_argnlen, CB_SYS_argn): = Define. >> --- >> =A0include/gdb/callback.h | =A0 =A05 +++++ >> =A01 files changed, 5 insertions(+), 0 deletions(-) >> >> diff --git a/include/gdb/callback.h b/include/gdb/callback.h >> index a1f79f9..296dfc3 100644 >> --- a/include/gdb/callback.h >> +++ b/include/gdb/callback.h >> @@ -231,6 +231,11 @@ extern host_callback default_callback; >> =A0#define CB_SYS_truncate =A0 =A0 =A0 =A021 >> =A0#define CB_SYS_ftruncate 22 >> =A0#define CB_SYS_pipe =A0 =A023 >> + >> +/* New ARGV support. =A0*/ >> +#define CB_SYS_argc =A0 =A024 >> +#define CB_SYS_argnlen 25 >> +#define CB_SYS_argn =A0 =A026 >> >> =A0/* Struct use to pass and return information necessary to perform a >> =A0 =A0system call. =A0*/ > > The common sim code has CB_SYS_{argv,argvlen}, but I don't see the above. > Where do they come from? pretty much all the callback "syscalls" that the sim handles are because of newlib/libgloss -mike