From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3857 invoked by alias); 6 Mar 2002 16:46:24 -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 3762 invoked from network); 6 Mar 2002 16:46:16 -0000 Received: from unknown (HELO kerberos.suse.cz) (195.47.106.10) by sources.redhat.com with SMTP; 6 Mar 2002 16:46:16 -0000 Received: from chimera.suse.cz (chimera.suse.cz [10.20.0.2]) by kerberos.suse.cz (SuSE SMTP server) with ESMTP id D4BC759D364; Wed, 6 Mar 2002 17:46:15 +0100 (CET) Received: from suse.cz (leviathan.suse.cz [10.20.1.56]) by chimera.suse.cz (8.11.0/8.11.0/SuSE Linux 8.11.0-0.4) with ESMTP id g26GkFN23776; Wed, 6 Mar 2002 17:46:15 +0100 X-Authentication-Warning: chimera.suse.cz: Host leviathan.suse.cz [10.20.1.56] claimed to be suse.cz Message-ID: <3C8647D7.40302@suse.cz> Date: Wed, 06 Mar 2002 08:46:00 -0000 From: Michal Ludvig Organization: SuSE CR User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.8) Gecko/20020204 X-Accept-Language: cs, cz, en MIME-Version: 1.0 To: Andreas Schwab Cc: gdb-patches@sources.redhat.com Subject: [RFA] Re: x86-64-tdep.h cleanup References: <3C84EAA8.2000900@suse.cz> Content-Type: multipart/mixed; boundary="------------030403090700090901030703" X-SW-Source: 2002-03/txt/msg00071.txt.bz2 This is a multi-part message in MIME format. --------------030403090700090901030703 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Content-length: 296 Andreas Schwab wrote: > I think the registration of the Linux specific gdbarch functions should be > moved to x86-64-linux-tdep.c. It seems reasonable. Perhaps I can do it like in the attachment? Michal Ludvig -- * SuSE CR, s.r.o * mludvig@suse.cz * +420 2 9654 5373 * http://www.suse.cz --------------030403090700090901030703 Content-Type: text/plain; name="x8664-02.diff" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="x8664-02.diff" Content-length: 2461 Index: x86-64-linux-tdep.c =================================================================== RCS file: /cvs/src/src/gdb/x86-64-linux-tdep.c,v retrieving revision 1.4 diff -c -3 -p -r1.4 x86-64-linux-tdep.c *** x86-64-linux-tdep.c 2002/02/24 22:14:33 1.4 --- x86-64-linux-tdep.c 2002/03/06 16:34:55 *************** x86_64_linux_frame_saved_pc (struct fram *** 134,136 **** --- 134,144 ---- return x86_64_linux_sigtramp_saved_pc (frame); return cfi_get_ra (frame); } + + /* Set Linux specific functions into gdbarch vector. */ + void + linux_gdbarch_init (struct gdbarch *gdbarch) + { + set_gdbarch_saved_pc_after_call (gdbarch, x86_64_linux_saved_pc_after_call); + set_gdbarch_frame_saved_pc (gdbarch, x86_64_linux_frame_saved_pc); + } Index: x86-64-tdep.c =================================================================== RCS file: /cvs/src/src/gdb/x86-64-tdep.c,v retrieving revision 1.10 diff -c -3 -p -r1.10 x86-64-tdep.c *** x86-64-tdep.c 2002/03/04 11:08:28 1.10 --- x86-64-tdep.c 2002/03/06 16:34:55 *************** int x86_64_register_raw_size_table[X86_6 *** 59,64 **** --- 59,67 ---- 4 }; + /* Prototype of function from x86-64-linux-tdep.c. */ + void linux_gdbarch_init (struct gdbarch *gdbarch); + /* Number of bytes of storage in the actual machine representation for register REGNO. */ int *************** i386_gdbarch_init (struct gdbarch_info i *** 892,898 **** set_gdbarch_frameless_function_invocation (gdbarch, x86_64_frameless_function_invocation); - set_gdbarch_frame_saved_pc (gdbarch, x86_64_linux_frame_saved_pc); set_gdbarch_frame_args_address (gdbarch, default_frame_address); set_gdbarch_frame_locals_address (gdbarch, default_frame_address); --- 895,900 ---- *************** i386_gdbarch_init (struct gdbarch_info i *** 966,973 **** set_gdbarch_skip_prologue (gdbarch, x86_64_skip_prologue); - set_gdbarch_saved_pc_after_call (gdbarch, x86_64_linux_saved_pc_after_call); - set_gdbarch_inner_than (gdbarch, core_addr_lessthan); set_gdbarch_breakpoint_from_pc (gdbarch, x86_64_breakpoint_from_pc); --- 968,973 ---- *************** i386_gdbarch_init (struct gdbarch_info i *** 979,984 **** --- 979,988 ---- /* Use dwarf2 debug frame informations. */ set_gdbarch_dwarf2_build_frame_info (gdbarch, dwarf2_build_frame_info); + + /* Set Linux specific functions. */ + linux_gdbarch_init (gdbarch); + return gdbarch; } --------------030403090700090901030703--