This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] Unify implementation of 'info os' commands between gdb and gdbserver
- From: Pedro Alves <pedro at codesourcery dot com>
- To: gdb-patches at sourceware dot org
- Cc: Kwok Cheung Yeung <kcy at codesourcery dot com>
- Date: Wed, 20 Jul 2011 17:15:33 +0100
- Subject: Re: [PATCH] Unify implementation of 'info os' commands between gdb and gdbserver
- References: <4E1C8890.3060304@codesourcery.com>
Looks good to me. A couple minor comments below.
On Tuesday 12 July 2011 18:46:56, Kwok Cheung Yeung wrote:
> 2011-07-12 Kwok Cheung Yeung <kcy@codesourcery.com>
>
> * defs.h: Add guard against inclusion in gdbserver.
> (struct ptid, ptid_t): Move to common/ptid.h.
> (xfree, xzalloc, xasprintf, xvasprintf, xstrprintf, xstrvprintf,
> xsnprintf, internal_error): Move to common/common-utils.h.
> (nomem): Delete.
> * gdb_assert.h: Move into common/ sub-directory.
> * gdb_locale.h: Ditto.
> * gdb_dirent.h: Ditto.
> * inferior.h (minus_one_ptid, null_ptid, ptid_build, pid_to_ptid,
> ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid):
> Move into common/ptid.h.
> * xml-support.c (xml_escape_text): Move into common/xml-utils.c.
> (gdb_xml_create_parser_and_cleanup_1, xml_fetch_context_from_file):
> Change nomem to malloc_failure.
> * xml-support.h (xml_escape_text): Move into common/xml-utils.h.
> * utils.c (nomem) Rename to malloc_failure.
Missing `:'.
> (xmalloc, xzalloc, xrealloc, xcalloc, xfree, xstrprintf, xasprintf,
> xvasprintf, xstrvprintf, xsnprintf) Move to common/common-utils.c.
Missing `:'. Maybe more places.
> Index: gdb/common/buffer.c
> ===================================================================
> RCS file: gdb/common/buffer.c
> diff -N gdb/common/buffer.c
> --- /dev/null 1 Jan 1970 00:00:00 -0000
> +++ gdb/common/buffer.c 12 Jul 2011 15:32:39 -0000
> @@ -0,0 +1,144 @@
> +/* A simple growing buffer for GDB.
> +
> + Copyright (C) 2009, 2010 Free Software Foundation, Inc.
Needs 2011 as well. There are other places with the same problem.
> Index: gdb/common/xml-utils.h
> ===================================================================
> RCS file: gdb/common/xml-utils.h
> diff -N gdb/common/xml-utils.h
> --- /dev/null 1 Jan 1970 00:00:00 -0000
> +++ gdb/common/xml-utils.h 12 Jul 2011 15:32:39 -0000
> @@ -0,0 +1,28 @@
> +/* Shared helper routines for manipulating XML using Expat.
The point of the file is exactly for XML routines independent of
Expat, as gdbserver doesn't like it in. (gdb/xml-support.c is for
parsing, while gdb/common/xml-utils.c for XML output.) Same comment
in xml-utils.c.
--
Pedro Alves