projects
/
deliverable
/
binutils-gdb.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
* inferiors.c (struct thread_info): Add gdb_id.
[deliverable/binutils-gdb.git]
/
gdb
/
gdbserver
/
linux-low.c
diff --git
a/gdb/gdbserver/linux-low.c
b/gdb/gdbserver/linux-low.c
index 3795cb6996edb49866811450b819d73b1a83e64e..aefec5e4bfd59353ddc0c90af915fdcb5d3f29a4 100644
(file)
--- a/
gdb/gdbserver/linux-low.c
+++ b/
gdb/gdbserver/linux-low.c
@@
-160,7
+160,7
@@
linux_create_inferior (char *program, char **allargs)
}
new_process = add_process (pid);
}
new_process = add_process (pid);
- add_thread (pid, new_process);
+ add_thread (pid, new_process
, pid
);
return pid;
}
return pid;
}
@@
-185,7
+185,7
@@
linux_attach_lwp (unsigned long pid, unsigned long tid)
}
new_process = (struct process_info *) add_process (pid);
}
new_process = (struct process_info *) add_process (pid);
- add_thread (tid, new_process);
+ add_thread (tid, new_process
, pid
);
/* The next time we wait for this LWP we'll see a SIGSTOP as PTRACE_ATTACH
brings it to a halt. We should ignore that SIGSTOP and resume the process
/* The next time we wait for this LWP we'll see a SIGSTOP as PTRACE_ATTACH
brings it to a halt. We should ignore that SIGSTOP and resume the process
@@
-667,7
+667,7
@@
retry:
then we need to make sure we restart the other threads. We could
pick a thread at random or restart all; restarting all is less
arbitrary. */
then we need to make sure we restart the other threads. We could
pick a thread at random or restart all; restarting all is less
arbitrary. */
- if (cont_thread
> 0
)
+ if (cont_thread
!= 0 && cont_thread != -1
)
{
child = (struct thread_info *) find_inferior_id (&all_threads,
cont_thread);
{
child = (struct thread_info *) find_inferior_id (&all_threads,
cont_thread);
@@
-1126,7
+1126,12
@@
fetch_register (int regno)
goto error_exit;
}
}
goto error_exit;
}
}
- supply_register (regno, buf);
+ if (the_low_target.left_pad_xfer
+ && register_size (regno) < sizeof (PTRACE_XFER_TYPE))
+ supply_register (regno, (buf + sizeof (PTRACE_XFER_TYPE)
+ - register_size (regno)));
+ else
+ supply_register (regno, buf);
error_exit:;
}
error_exit:;
}
@@
-1168,7
+1173,12
@@
usr_store_inferior_registers (int regno)
& - sizeof (PTRACE_XFER_TYPE);
buf = alloca (size);
memset (buf, 0, size);
& - sizeof (PTRACE_XFER_TYPE);
buf = alloca (size);
memset (buf, 0, size);
- collect_register (regno, buf);
+ if (the_low_target.left_pad_xfer
+ && register_size (regno) < sizeof (PTRACE_XFER_TYPE))
+ collect_register (regno, (buf + sizeof (PTRACE_XFER_TYPE)
+ - register_size (regno)));
+ else
+ collect_register (regno, buf);
for (i = 0; i < size; i += sizeof (PTRACE_XFER_TYPE))
{
errno = 0;
for (i = 0; i < size; i += sizeof (PTRACE_XFER_TYPE))
{
errno = 0;
@@
-1337,7
+1347,7
@@
linux_store_registers (int regno)
to debugger memory starting at MYADDR. */
static int
to debugger memory starting at MYADDR. */
static int
-linux_read_memory (CORE_ADDR memaddr, char *myaddr, int len)
+linux_read_memory (CORE_ADDR memaddr,
unsigned
char *myaddr, int len)
{
register int i;
/* Round starting address down to longword boundary. */
{
register int i;
/* Round starting address down to longword boundary. */
@@
-1371,7
+1381,7
@@
linux_read_memory (CORE_ADDR memaddr, char *myaddr, int len)
returns the value of errno. */
static int
returns the value of errno. */
static int
-linux_write_memory (CORE_ADDR memaddr, const char *myaddr, int len)
+linux_write_memory (CORE_ADDR memaddr, const
unsigned
char *myaddr, int len)
{
register int i;
/* Round starting address down to longword boundary. */
{
register int i;
/* Round starting address down to longword boundary. */
@@
-1435,7
+1445,7
@@
linux_send_signal (int signum)
{
extern unsigned long signal_pid;
{
extern unsigned long signal_pid;
- if (cont_thread
> 0
)
+ if (cont_thread
!= 0 && cont_thread != -1
)
{
struct process_info *process;
{
struct process_info *process;
@@
-1450,7
+1460,7
@@
linux_send_signal (int signum)
to debugger memory starting at MYADDR. */
static int
to debugger memory starting at MYADDR. */
static int
-linux_read_auxv (CORE_ADDR offset, char *myaddr, unsigned int len)
+linux_read_auxv (CORE_ADDR offset,
unsigned
char *myaddr, unsigned int len)
{
char filename[PATH_MAX];
int fd, n;
{
char filename[PATH_MAX];
int fd, n;
This page took
0.02667 seconds
and
4
git commands to generate.