From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25896 invoked by alias); 18 Jul 2002 15:00:00 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 25864 invoked from network); 18 Jul 2002 14:59:59 -0000 Received: from unknown (HELO kerberos.suse.cz) (195.47.106.10) by sources.redhat.com with SMTP; 18 Jul 2002 14:59:59 -0000 Received: from chimera.suse.cz (chimera.suse.cz [10.20.0.2]) by kerberos.suse.cz (SuSE SMTP server) with ESMTP id DEA1259D34C; Thu, 18 Jul 2002 16:59:58 +0200 (CEST) Received: from suse.cz (naga.suse.cz [10.20.1.16]) by chimera.suse.cz (8.11.0/8.11.0/SuSE Linux 8.11.0-0.4) with ESMTP id g6IExug07511; Thu, 18 Jul 2002 16:59:56 +0200 X-Authentication-Warning: chimera.suse.cz: Host naga.suse.cz [10.20.1.16] claimed to be suse.cz Message-ID: <3D36D7E7.5080607@suse.cz> Date: Thu, 18 Jul 2002 08:08:00 -0000 From: Michal Ludvig Organization: SuSE CR User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.0) Gecko/20020529 X-Accept-Language: cs, cz, en MIME-Version: 1.0 To: Daniel Jacobowitz Cc: GDB Patches Subject: [RFA] gdbserver bits Content-Type: multipart/mixed; boundary="------------050407060700000603020908" X-SW-Source: 2002-07/txt/msg00387.txt.bz2 This is a multi-part message in MIME format. --------------050407060700000603020908 Content-Type: text/plain; charset=ISO-8859-2; format=flowed Content-Transfer-Encoding: 7bit Content-length: 344 Hi, fifth patch today ;-) This one adds CS and SS registers to regmap on x86-64 so that they are stored and properly restored. Also it adds a forgotten free() to prevent memory leakage in regsets_store_inferior_registers(). Can I commit it? Michal Ludvig -- * SuSE CR, s.r.o * mludvig@suse.cz * +420 2 9654 5373 * http://www.suse.cz --------------050407060700000603020908 Content-Type: text/plain; name="gdbserver-cs-2.diff" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="gdbserver-cs-2.diff" Content-length: 1559 2002-07-18 Michal Ludvig * linux-low.c (regsets_store_inferior_registers): Add free() at the end of a loop to prevent memory leak. * linux-x86-64-low.c (x86_64_regmap): Add CS, SS registers. (X86_64_NUM_GREGS): Count it from the size of x86_64_regmap. Index: linux-low.c =================================================================== RCS file: /cvs/src/src/gdb/gdbserver/linux-low.c,v retrieving revision 1.17 diff -u -p -r1.17 linux-low.c --- linux-low.c 11 Jun 2002 17:32:39 -0000 1.17 +++ linux-low.c 18 Jul 2002 14:46:53 -0000 @@ -1097,6 +1097,7 @@ regsets_store_inferior_registers () } } regset ++; + free (buf); } return 0; } Index: linux-x86-64-low.c =================================================================== RCS file: /cvs/src/src/gdb/gdbserver/linux-x86-64-low.c,v retrieving revision 1.6 diff -u -p -r1.6 linux-x86-64-low.c --- linux-x86-64-low.c 4 Jul 2002 06:00:49 -0000 1.6 +++ linux-x86-64-low.c 18 Jul 2002 14:46:53 -0000 @@ -28,16 +28,16 @@ #include #include -#define X86_64_NUM_GREGS 22 - -static int x86_64_regmap[X86_64_NUM_GREGS] = { +static int x86_64_regmap[] = { RAX * 8, RBX * 8, RCX * 8, RDX * 8, RSI * 8, RDI * 8, RBP * 8, RSP * 8, R8 * 8, R9 * 8, R10 * 8, R11 * 8, R12 * 8, R13 * 8, R14 * 8, R15 * 8, - RIP * 8, EFLAGS * 8, + RIP * 8, EFLAGS * 8, CS * 8, SS * 8, DS * 8, ES * 8, FS * 8, GS * 8 }; + +#define X86_64_NUM_GREGS (sizeof(x86_64_regmap)/sizeof(int)) static void x86_64_fill_gregset (void *buf) --------------050407060700000603020908--