From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8626 invoked by alias); 10 Jan 2006 20:29:55 -0000 Received: (qmail 8617 invoked by uid 22791); 10 Jan 2006 20:29:55 -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; Tue, 10 Jan 2006 20:29:49 +0000 Received: from elgar.sibelius.xs4all.nl (root@elgar.sibelius.xs4all.nl [192.168.0.2]) by sibelius.xs4all.nl (8.13.4/8.13.4) with ESMTP id k0AKTgHq026466; Tue, 10 Jan 2006 21:29:42 +0100 (CET) Received: from elgar.sibelius.xs4all.nl (kettenis@localhost.sibelius.xs4all.nl [127.0.0.1]) by elgar.sibelius.xs4all.nl (8.13.4/8.13.3) with ESMTP id k0AKTgfF010243; Tue, 10 Jan 2006 21:29:42 +0100 (CET) Received: (from kettenis@localhost) by elgar.sibelius.xs4all.nl (8.13.4/8.13.4/Submit) id k0AKTfPh011880; Tue, 10 Jan 2006 21:29:41 +0100 (CET) Date: Tue, 10 Jan 2006 20:29:00 -0000 Message-Id: <200601102029.k0AKTfPh011880@elgar.sibelius.xs4all.nl> From: Mark Kettenis To: brobecker@adacore.com CC: gdb-patches@sources.redhat.com In-reply-to: <20060110171752.GL925@adacore.com> (message from Joel Brobecker on Tue, 10 Jan 2006 21:17:52 +0400) Subject: Re: [RFA] implement gcore on hp/ux References: <20060110171752.GL925@adacore.com> Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2006-01/txt/msg00101.txt.bz2 > Date: Tue, 10 Jan 2006 21:17:52 +0400 > From: Joel Brobecker > 2005-01-10 Joel Brobecker > > * target.h (target_ops): New method to_write_core_file. > (target_write_core_file_p): New macro. > (target_write_core_file): New macro. > * target.c (update_current_target): Add heritance of to_write_core_file. > * exec.c (exec_set_write_core_file): New function. > * defs.h (exec_set_write_core_file): Add declaration. > * gcore.c: Extract out the code writing the core file and move it > to gcore-elf.c. > * gcore-elf.c: New file, mostly extracted from gcore.o. > * Makefile.in (COMMON_OBS): Add gcore.o. > (gcore.o): Update dependencies. > (gcore-elf.o): Add rule. > * inf-ttrace (inf_ttrace_write_core_file): New function. > (inf_ttrace_target): set the to_write_core_file method. > * config/alpha/fbsd.mh (NATDEPFILES): Likewise. > * config/arm/linux.mh (NATDEPFILES): Likewise. > * config/i386/fbsd.mh (NATDEPFILES): Likewise. > * config/i386/fbsd64.mh (NATDEPFILES): Likewise. > * config/i386/i386sol2.mh (NATDEPFILES): Likewise. > * config/i386/i386v42mp.mh (NATDEPFILES): Likewise. > * config/i386/linux.mh (NATDEPFILES): Likewise. > * config/i386/linux64.mh (NATDEPFILES): Likewise. > * config/i386/sol2-64.mh (NATDEPFILES): Likewise. > * config/ia64/linux.mh (NATDEPFILES): Likewise. > * config/m32r/linux.mh (NATDEPFILES): Likewise. > * config/m68k/linux.mh (NATDEPFILES): Likewise. > * config/mips/linux.mh (NATDEPFILES): Likewise. > * config/pa/linux.mh (NATDEPFILES): Likewise. > * config/powerpc/linux.mh (NATDEPFILES): Likewise. > * config/powerpc/ppc64-linux.mh (NATDEPFILES): Likewise. > * config/s390/s390.mh (NATDEPFILES): Likewise. > * config/sparc/fbsd.mh (NATDEPFILES): Likewise. > * config/sparc/linux.mh (NATDEPFILES): Likewise. > * config/sparc/linux64.mh (NATDEPFILES): Likewise. > * config/sparc/sol2.mh (NATDEPFILES): Likewise. > > Tested on x86-linux and pa32-hpux. No regression on the linux > side. On the hp/ux side, we get improvments from auxv.exp and > gcore.exp now passes. > > Comments? Ok to apply? I'm not sure I like the exec_set_write_core_file() hack. Targets should really do this the proper way, initializing their target vector properly. Can't you get rid of it by setting to_write_core_file in procfs.c:init_ptoc_ops() and linux-nat.c:linux_target()? The HP-UX code looks good, but could you please use xsnprintf() instead of sprintf()? Mark