This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] Share code to determine whether target is running on uClinux.
- From: Pedro Alves <palves at redhat dot com>
- To: Yao Qi <yao at codesourcery dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Mon, 02 Sep 2013 14:25:19 +0100
- Subject: Re: [PATCH] Share code to determine whether target is running on uClinux.
- Authentication-results: sourceware.org; auth=none
- References: <1378127861-11427-1-git-send-email-yao at codesourcery dot com>
On 09/02/2013 02:17 PM, Yao Qi wrote:
> Hi,
> I happen to see that the code to determine whether target is running
> on uClinux is duplicated, in both linux-tdep.c and m68klinux-tdep.c.
> This patch is to move the code into a function linux_is_uclinux.
Thanks.
>
> The function is named 'linux_is_uclinux' because I find all the
> external functions in linux-tdep.c have a "linux_" prefix.
>
> gdb:
>
> 2013-09-02 Yao Qi <yao@codesourcery.com>
>
> * linux-tdep.c (linux_is_uclinux): New function. Code moved
> from linux_has_shared_address_space.
> (linux_has_shared_address_space): Call linux_is_uclinux.
> * linux-tdep.h (linux_is_uclinux): Declare.
> * m68klinux-tdep.c (m68k_linux_get_sigtramp_info): Call
> linux_is_uclinux.
OK.
(That target_is_uclinux global is not very multi-inferior/target
friendly...)
--
Pedro Alves