diff options
author | Yao Qi <yao@codesourcery.com> | 2013-09-02 23:09:57 +0000 |
---|---|---|
committer | Yao Qi <yao@codesourcery.com> | 2013-09-02 23:09:57 +0000 |
commit | c01cbb3d52217d404e500d11a7a4b87e87a0cd0d (patch) | |
tree | 5f2374ed68aa700b9c647b443394fd045ead9e90 /gdb/linux-tdep.c | |
parent | 7b00db47cefd914e1ba6682a986a10693aa1aa22 (diff) | |
download | gdb-c01cbb3d52217d404e500d11a7a4b87e87a0cd0d.zip gdb-c01cbb3d52217d404e500d11a7a4b87e87a0cd0d.tar.gz gdb-c01cbb3d52217d404e500d11a7a4b87e87a0cd0d.tar.bz2 |
gdb/
* 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.
Diffstat (limited to 'gdb/linux-tdep.c')
-rw-r--r-- | gdb/linux-tdep.c | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/gdb/linux-tdep.c b/gdb/linux-tdep.c index fbdca46..eb8ea2b 100644 --- a/gdb/linux-tdep.c +++ b/gdb/linux-tdep.c @@ -241,19 +241,22 @@ linux_get_siginfo_type (struct gdbarch *gdbarch) return siginfo_type; } -static int -linux_has_shared_address_space (struct gdbarch *gdbarch) +/* Return true if the target is running on uClinux instead of normal + Linux kernel. */ + +int +linux_is_uclinux (void) { - /* Determine whether we are running on uClinux or normal Linux - kernel. */ CORE_ADDR dummy; - int target_is_uclinux; - target_is_uclinux - = (target_auxv_search (¤t_target, AT_NULL, &dummy) > 0 - && target_auxv_search (¤t_target, AT_PAGESZ, &dummy) == 0); + return (target_auxv_search (¤t_target, AT_NULL, &dummy) > 0 + && target_auxv_search (¤t_target, AT_PAGESZ, &dummy) == 0); +} - return target_is_uclinux; +static int +linux_has_shared_address_space (struct gdbarch *gdbarch) +{ + return linux_is_uclinux (); } /* This is how we want PTIDs from core files to be printed. */ |