This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Share code to determine whether target is running on uClinux.


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]