projects
/
deliverable
/
binutils-gdb.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
gdb: Convert language la_value_print_inner field to a method
[deliverable/binutils-gdb.git]
/
gdbserver
/
linux-low.cc
diff --git
a/gdbserver/linux-low.cc
b/gdbserver/linux-low.cc
index 56615430b59e1d8291fe191db5dcd7b478455aae..bde6c767e87e4e8b1d7f4f702a21610429e52df4 100644
(file)
--- a/
gdbserver/linux-low.cc
+++ b/
gdbserver/linux-low.cc
@@
-86,11
+86,6
@@
#define PT_TEXT_ADDR 49*4
#define PT_DATA_ADDR 50*4
#define PT_TEXT_END_ADDR 51*4
#define PT_TEXT_ADDR 49*4
#define PT_DATA_ADDR 50*4
#define PT_TEXT_END_ADDR 51*4
-/* BFIN already defines these since at least 2.6.32 kernels. */
-#elif defined(BFIN)
-#define PT_TEXT_ADDR 220
-#define PT_TEXT_END_ADDR 224
-#define PT_DATA_ADDR 228
/* These are still undefined in 3.10 kernels. */
#elif defined(__TMS320C6X__)
#define PT_TEXT_ADDR (0x10000*4)
/* These are still undefined in 3.10 kernels. */
#elif defined(__TMS320C6X__)
#define PT_TEXT_ADDR (0x10000*4)
@@
-754,28
+749,17
@@
linux_process_target::get_pc (lwp_info *lwp)
return pc;
}
return pc;
}
-/* This function should only be called if LWP got a SYSCALL_SIGTRAP.
- Fill *SYSNO with the syscall nr trapped. */
-
-static void
-get_syscall_trapinfo (struct lwp_info *lwp, int *sysno)
+void
+linux_process_target::get_syscall_trapinfo (lwp_info *lwp, int *sysno)
{
struct thread_info *saved_thread;
struct regcache *regcache;
{
struct thread_info *saved_thread;
struct regcache *regcache;
- if (the_low_target.get_syscall_trapinfo == NULL)
- {
- /* If we cannot get the syscall trapinfo, report an unknown
- system call number. */
- *sysno = UNKNOWN_SYSCALL;
- return;
- }
-
saved_thread = current_thread;
current_thread = get_lwp_thread (lwp);
regcache = get_thread_regcache (current_thread, 1);
saved_thread = current_thread;
current_thread = get_lwp_thread (lwp);
regcache = get_thread_regcache (current_thread, 1);
-
(*the_low_target.get_syscall_trapinfo)
(regcache, sysno);
+
low_get_syscall_trapinfo
(regcache, sysno);
if (debug_threads)
debug_printf ("get_syscall_trapinfo sysno %d\n", *sysno);
if (debug_threads)
debug_printf ("get_syscall_trapinfo sysno %d\n", *sysno);
@@
-783,6
+767,13
@@
get_syscall_trapinfo (struct lwp_info *lwp, int *sysno)
current_thread = saved_thread;
}
current_thread = saved_thread;
}
+void
+linux_process_target::low_get_syscall_trapinfo (regcache *regcache, int *sysno)
+{
+ /* By default, report an unknown system call number. */
+ *sysno = UNKNOWN_SYSCALL;
+}
+
bool
linux_process_target::save_stop_reason (lwp_info *lwp)
{
bool
linux_process_target::save_stop_reason (lwp_info *lwp)
{
@@
-988,7
+979,7
@@
linux_process_target::create_inferior (const char *program,
{
maybe_disable_address_space_randomization restore_personality
(cs.disable_randomization);
{
maybe_disable_address_space_randomization restore_personality
(cs.disable_randomization);
- std::string str_program_args =
stringify_argv
(program_args);
+ std::string str_program_args =
construct_inferior_arguments
(program_args);
pid = fork_inferior (program,
str_program_args.c_str (),
pid = fork_inferior (program,
str_program_args.c_str (),
@@
-2961,29
+2952,26
@@
gdb_catching_syscalls_p (struct lwp_info *event_child)
return !proc->syscalls_to_catch.empty ();
}
return !proc->syscalls_to_catch.empty ();
}
-/* Returns 1 if GDB is interested in the event_child syscall.
- Only to be called when stopped reason is SYSCALL_SIGTRAP. */
-
-static int
-gdb_catch_this_syscall_p (struct lwp_info *event_child)
+bool
+linux_process_target::gdb_catch_this_syscall (lwp_info *event_child)
{
int sysno;
struct thread_info *thread = get_lwp_thread (event_child);
struct process_info *proc = get_thread_process (thread);
if (proc->syscalls_to_catch.empty ())
{
int sysno;
struct thread_info *thread = get_lwp_thread (event_child);
struct process_info *proc = get_thread_process (thread);
if (proc->syscalls_to_catch.empty ())
- return
0
;
+ return
false
;
if (proc->syscalls_to_catch[0] == ANY_SYSCALL)
if (proc->syscalls_to_catch[0] == ANY_SYSCALL)
- return
1
;
+ return
true
;
get_syscall_trapinfo (event_child, &sysno);
for (int iter : proc->syscalls_to_catch)
if (iter == sysno)
get_syscall_trapinfo (event_child, &sysno);
for (int iter : proc->syscalls_to_catch)
if (iter == sysno)
- return
1
;
+ return
true
;
- return
0
;
+ return
false
;
}
ptid_t
}
ptid_t
@@
-3326,7
+3314,7
@@
linux_process_target::wait_1 (ptid_t ptid, target_waitstatus *ourstatus,
/* Check if GDB is interested in this syscall. */
if (WIFSTOPPED (w)
&& WSTOPSIG (w) == SYSCALL_SIGTRAP
/* Check if GDB is interested in this syscall. */
if (WIFSTOPPED (w)
&& WSTOPSIG (w) == SYSCALL_SIGTRAP
- && !gdb_catch_this_syscall
_p
(event_child))
+ && !gdb_catch_this_syscall (event_child))
{
if (debug_threads)
{
{
if (debug_threads)
{
@@
-6404,17
+6392,14
@@
linux_process_target::read_loadmap (const char *annex, CORE_ADDR offset,
bool
linux_process_target::supports_catch_syscall ()
{
bool
linux_process_target::supports_catch_syscall ()
{
- return (
the_low_target.get_syscall_trapinfo != NULL
+ return (
low_supports_catch_syscall ()
&& linux_supports_tracesysgood ());
}
&& linux_supports_tracesysgood ());
}
-int
-linux_process_target::
get_ipa_tdesc_idx
()
+bool
+linux_process_target::
low_supports_catch_syscall
()
{
{
- if (the_low_target.get_ipa_tdesc_idx == NULL)
- return 0;
-
- return (*the_low_target.get_ipa_tdesc_idx) ();
+ return false;
}
CORE_ADDR
}
CORE_ADDR
This page took
0.025797 seconds
and
4
git commands to generate.