From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30025 invoked by alias); 1 Jun 2009 15:56:07 -0000 Received: (qmail 30015 invoked by uid 22791); 1 Jun 2009 15:56:06 -0000 X-SWARE-Spam-Status: No, hits=-3.2 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: sourceware.org Received: from main.gmane.org (HELO ciao.gmane.org) (80.91.229.2) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 01 Jun 2009 15:55:59 +0000 Received: from list by ciao.gmane.org with local (Exim 4.43) id 1MB9rf-0000Xn-JE for gdb-patches@sources.redhat.com; Mon, 01 Jun 2009 15:55:55 +0000 Received: from entropy.qnx.com ([209.226.137.107]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 01 Jun 2009 15:55:55 +0000 Received: from aristovski by entropy.qnx.com with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 01 Jun 2009 15:55:55 +0000 To: gdb-patches@sources.redhat.com From: Aleksandar Ristovski Subject: ptid from core section Date: Mon, 01 Jun 2009 15:56:00 -0000 Message-ID: <4A23F9FF.8040708@qnx.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Pedro Alves User-Agent: Thunderbird 2.0.0.21 (Windows/20090302) 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: 2009-06/txt/msg00009.txt.bz2 Hello, In corelow.c we have several architecture specific lines for determining ptid from core section. The same for getting section name given inferior_ptid. This patch moves architecture specific parts into two new functions: gdbarch_ptid_from_core_section and gdbarch_core_section_name_from_ptid. They replace Pedro's gdbarch_core_reg_section_encodes_pid since predicate is now redundant. I haven't added diffs for generated gdbarch.h/c, I would like to get your thoughts about this first. Thanks, Aleksandar Ristovski QNX Software Systems Change log: * corelow.c (add_to_thread_list): Use new gdbarch_ptid_from_core_section. (get_core_register_section): Use new gdbarch_core_section_name_from_ptid. * gdbarch.sh (core_reg_section_encodes_pid): Deleted. (ptid_from_core_section, core_section_name_from_ptid): New functions. (default_ptid_from_core_section, default_core_section_name_from_ptid): New functions. * sol2-tdep.h (sol2_ptid_from_core_section, sol2_core_section_name_from_ptid): New declarations. * sol2-tdep.c (sol2_ptid_from_core_section, sol2_core_section_name_from_ptid): New functions. * amd64-sol2-tdep.c (amd64_sol2_init_abi): Register the two functions. * sparc-sol2-tdep.c (sparc32_sol2_init_abi): Likewise. * sparc64-sol2-tdep.c (sparc64_sol2_init_abi): Likewise. * i386-sol2-tdep.c (i386_sol2_init_abi): Likewise.