]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - gdb/gdbserver/ChangeLog
gdb/
[thirdparty/binutils-gdb.git] / gdb / gdbserver / ChangeLog
CommitLineData
d5c93e41
PA
12013-04-16 Pedro Alves <palves@redhat.com>
2
3 * linux-low.h (struct lwp_info) <thread_known>: Move under
4 the USE_THREAD_DB #ifdef.
5
04f5fe89
PA
62013-04-16 Pedro Alves <palves@redhat.com>
7
8 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
9 (linux-low.o): Delete rule.
10 * linux-low.h: Always include "gdb_thread_db.h" instead of
11 conditionally including thread_db.h.
12 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
13 HAVE_THREAD_DB_H.
14
480b27bf
JK
152013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
16
17 * Makefile.in (install-only): Fix make install regression.
18
43662968
JK
192013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
20
21 Convert man pages to texinfo, new gdbinit.5 texinfo page.
22 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
23 installation.
24 * gdbserver.1: Remove.
25
3e74e146
PA
262013-03-22 Pedro Alves <palves@redhat.com>
27
28 * linux-low.c (handle_extended_wait): Don't call
29 linux_enable_event_reporting.
30
a8347a2a
TT
312013-03-15 Tony Theodore <tonyt@logyst.com>
32
33 PR build/9098:
34 * Makefile.in (SHELL): Use @SHELL@.
35
eeb56fa7
SDJ
362013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
37
38 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
39 compiler warning.
40
4fa7e2ff
JB
412013-03-13 Joel Brobecker <brobecker@adacore.com>
42
43 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
44 Remove extraneous NULL element.
45
8ddb1965
YQ
462013-03-13 Yao Qi <yao@codesourcery.com>
47
48 * tracepoint.c (traceframe_read_tsv): Look for the last matched
49 'V' block in trace frame.
50
9accd112
MM
512013-03-11 Markus Metzger <markus.t.metzger@intel.com>
52
53 * target.h (struct target_ops): Add btrace ops.
54 (target_supports_btrace): New macro.
55 (target_enable_btrace): New macro.
56 (target_disable_btrace): New macro.
57 (target_read_btrace): New macro.
58 * gdbthread.h (struct thread_info): Add btrace field.
59 * server.c: Include btrace-common.h.
60 (handle_btrace_general_set): New function.
61 (handle_btrace_enable): New function.
62 (handle_btrace_disable): New function.
63 (handle_general_set): Call handle_btrace_general_set.
64 (handle_qxfer_btrace): New function.
65 (struct qxfer qxfer_packets[]): Add btrace entry.
66 * inferiors.c (remove_thread): Disable btrace.
67 * linux-low: Include linux-btrace.h.
68 (linux_low_enable_btrace): New function.
69 (linux_low_read_btrace): New function.
70 (linux_target_ops): Add btrace ops.
71 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
72 Add srv_linux_btrace=yes.
73 (x86_64-*-linux*): Add linux-btrace.o.
74 Add srv_linux_btrace=yes.
75 * configure.ac: Define HAVE_LINUX_BTRACE.
76 * config.in: Regenerated.
77 * configure: Regenerated.
78
5cc22e4c
MM
792013-03-11 Markus Metzger <markus.t.metzger@intel.com>
80
81 * server.c (handle_qxfer): Preserve error message if -3 is
82 returned.
83 (qxfer): Document the -3 return value.
84
7c97f91e
MM
852013-03-11 Markus Metzger <markus.t.metzger@intel.com>
86
87 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
88 (linux_btrace_h): New variable.
89 (linux-btrace.o): New rule.
90
be9a119c 912013-03-08 Stan Shebs <stan@codesourcery.com>
f6f899bf
HAQ
92 Hafiz Abid Qadeer <abidh@codesourcery.com>
93
94 * tracepoint.c (trace_buffer_size): New global.
95 (DEFAULT_TRACE_BUFFER_SIZE): New define.
96 (init_trace_buffer): Change to one-argument function. Allocate
97 trace buffer memory.
98 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
99 handle QTBuffer:size packet.
100 (cmd_bigqtbuffer_size): New function.
101 (initialize_tracepoint): Call init_trace_buffer with
102 DEFAULT_TRACE_BUFFER_SIZE.
103 * server.c (handle_query): Add QTBuffer:size in the
104 supported packets.
105
e64f7499
YQ
1062013-03-07 Yao Qi <yao@codesourcery.com>
107
108 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
109 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
110 of -1.
111 (cmd_qtsp): Adjust condition. Do post increment.
112 Set cur_action and cur_step_action back to 0.
113
f0ae6fc3
PA
1142013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
115
116 PR server/15236
117 * linux-low.c (linux_write_memory): Return early success if LEN is
118 zero.
119
b5b0b0af
CV
1202013-03-05 Corinna Vinschen <vinschen@redhat.de>
121
334ad4a8 122 * configure.srv: Add x86_64-*-cygwin* as target.
b5b0b0af 123
589bc927
TT
1242013-02-28 Tom Tromey <tromey@redhat.com>
125
126 * configure.ac: Invoke AC_SYS_LARGEFILE.
127 * configure, config.in: Rebuild.
128
dfe07582
CV
1292013-02-28 Corinna Vinschen <vinschen@redhat.com>
130
131 * win32-low.c: Throughout, fix format strings and casts of
132 printf-like functions to avoid type related warnings on all
133 platforms.
134 (get_child_debug_event): Print dwDebugEventCode as hex since
135 that's how it's usually documented.
136
736cd585
YQ
1372013-02-28 Yao Qi <yao@codesourcery.com>
138
139 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
140 pulongest.
141
e1f58301
JW
1422013-02-27 Jiong Wang <jiwang@tilera.com>
143
144 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
145 (reg-tilegx32.c): New rule.
146 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
147 * linux-tile-low.c (tile_arch_setup): New function. Invoke
148 different register info initializer according to elf class.
149 (init_registers_tilgx32): New function. The tilegx32 register info
150 initializer.
151 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
152 (tile_store_gregset): Likewise.
153
d171ca78
YQ
1542013-02-27 Yao Qi <yao@codesourcery.com>
155
156 * server.c (process_point_options): Print debug message when
157 debug_threads is true.
158
282bbdf3
YQ
1592013-02-26 Yao Qi <yao@codesourcery.com>
160
161 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
162
aca22551
PA
1632013-02-19 Pedro Alves <palves@redhat.com>
164 Kai Tietz <ktietz@redhat.com>
165
166 PR gdb/15161
167
168 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
169 instead of strtoul to extract address from packet.
170 (process_serial_event) <'z'>: Likewise.
171
4f3cee1c
YQ
1722013-02-18 Yao Qi <yao@codesourcery.com>
173
174 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
175
8e1d55a3
PA
1762013-02-14 Pedro Alves <palves@redhat.com>
177
178 Plug memory leak.
179
180 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
181 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
182
458820da
PA
1832013-02-14 Pedro Alves <palves@redhat.com>
184
185 * tracepoint.c (cmd_qtdpsrc): Use savestring.
186
baea0dae
PA
1872013-02-14 Pedro Alves <palves@redhat.com>
188
189 * tracepoint.c (save_string): Delete.
190 (add_tracepoint_action): Use savestring instead of save_string.
191
0b1afbb3
PA
1922013-02-12 Pedro Alves <palves@redhat.com>
193
194 * linux-xtensa-low.c: Ditto.
195 * xtensa-xtregs.c: Ditto.
196
8a4ac37e
PA
1972013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
198
199 * thread-db.c (thread_db_get_tls_address): NULL pointer check
200 thread_db.
201
148de6bb
MS
2022013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
203
204 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
205 aarch64_num_wp_regs and aarch64_num_bp_regs to
206 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
207
55fac6e0
MS
2082013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
209
210 * linux-aarch64-low.c (ps_get_thread_area): Replace
211 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
212
176eb98c
MS
2132013-02-04 Jim MacArthur <jim.macarthur@arm.com>
214 Marcus Shawcroft <marcus.shawcroft@arm.com>
215 Nigel Stephens <nigel.stephens@arm.com>
216 Yufeng Zhang <yufeng.zhang@arm.com>
217
218 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
219 (aarch64.c, aarch64-without-fpu.c): New targets.
220 * configure.srv (aarch64*-*-linux*): New.
221 * linux-aarch64-low.c: New file.
222
56f7af9c
MS
2232013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
224
43aaf8b6 225 * linux-low.c (handle_extended_wait, linux_create_inferior)
56f7af9c
MS
226 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
227 (dequeue_one_deferred_signal, linux_resume_one_thread)
228 (fetch_register, linux_write_memory, linux_enable_event_reporting)
229 (linux_tracefork_grandchild, linux_test_for_tracefork)
230 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
231 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
232 where the argument is 0.
233
60f662b0
YQ
2342013-01-25 Yao Qi <yao@codesourcery.com>
235
236 * event-loop.c: Include "queue.h".
237 (gdb_event_p): New typedef.
238 (struct gdb_event) <next_event>: Remove.
239 (event_queue): Change to QUEUE(gdb_event_p).
240 (async_queue_event): Remove.
241 (gdb_event_xfree): New.
242 (initialize_event_loop): New.
243 (process_event): Use API from QUEUE.
244 (wait_for_event): Likewise.
245 * server.c (main): Call initialize_event_loop.
246 * server.h (initialize_event_loop): Declare.
247
5ae4861a
YQ
2482013-01-18 Yao Qi <yao@codesourcery.com>
249
250 * ax.h (struct eval_agent_expr_context): New.
251 (gdb_eval_agent_expr): Update declaration.
252 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
253 TFRAME. Add new argument CTX.
254 * server.h (struct eval_agent_expr_context): Declare.
255 (agent_mem_read, agent_tsv_read): Update declaration.
256 (agent_mem_read_string): Likewise.
257 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
258 (add_traceframe_block): Add new argument TPOINT.
259 Increase TPOINT->traceframe_usage.
260 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
261 eval_tracepoint_agent_expr.
262 (condition_true_at_tracepoint): Likewise.
263 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
264 (agent_mem_read_string, agent_tsv_read): Likewise.
265
85e00e85
YQ
2662013-01-16 Yao Qi <yao@codesourcery.com>
267
268 * linux-low.c (linux_resume_one_lwp): Don't check
269 'lwp->bp_reinsert != 0'.
270
4039cf45
JB
2712013-01-07 Joel Brobecker <brobecker@adacore.com>
272 Pedro Alves <palves@redhat.com>
273
274 * lynx-low.c (ptrace_request_to_str): Define a temporary
275 macro and use it to simplify this function's implementation.
276
9044dee2
JB
2772013-01-07 Joel Brobecker <brobecker@adacore.com>
278
279 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
280 sets errno.
281
e6352c8f
JB
2822013-01-07 Joel Brobecker <brobecker@adacore.com>
283
284 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
285
50681a27
JB
2862013-01-07 Joel Brobecker <brobecker@adacore.com>
287
288 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
289
3f6e77ef
JB
2902013-01-07 Joel Brobecker <brobecker@adacore.com>
291
292 * lynx-low.c (lynx_resume): Use the resume_info parameter
293 to determine the ptid for the lynx_ptrace call, unless
294 it is equal to minus_one_ptid, in which case we use the
295 ptid of the current_inferior.
296 (lynx_wait_1): After having received a thread create/exit
297 event, resume the inferior's execution using the signaling
298 thread's ptid, rather than the old ptid.
299
7fda33ae
JB
3002013-01-07 Joel Brobecker <brobecker@adacore.com>
301
302 * lynx-low.c (lynx_resume): Delete variable ret.
303
b9786c74
JB
3042013-01-01 Joel Brobecker <brobecker@adacore.com>
305
306 * gdbreplay.c (gdbreplay_version): Update copyright year.
307 * server.c (gdbserver_version): Likewise.
308
8b93d60f
JB
3092012-12-17 Joel Brobecker <brobecker@adacore.com>
310
311 * lynx-low.c (lynx_wait_1): Add debug trace before adding
312 new thread.
313
037335a7
JB
3142012-12-17 Joel Brobecker <brobecker@adacore.com>
315
316 * lynx-low.c (ptrace_request_to_str): Add handling for
317 PTRACE_GETTRACESIG.
318
52d4cbd8
JB
3192012-12-17 Joel Brobecker <brobecker@adacore.com>
320
321 * lynx-low.c (lynx_attach): Delete variable new_process.
322
ab8f6ca9
JB
3232012-12-17 Joel Brobecker <brobecker@adacore.com>
324
325 * lynx-low.c (lynx_create_inferior): Delete variable
326 new_process.
327
78cbc024
JB
3282012-12-17 Joel Brobecker <brobecker@adacore.com>
329
330 * lynx-low.c (ptrace_request_to_str): Do not handle
331 PTRACE_GETTHREADLIST if this macro does not exist.
332
14a00470
YQ
3332012-12-15 Yao Qi <yao@codesourcery.com>
334
335 * Makefile.in (OBS): Add notif.o.
336 * notif.c, notif.h: New.
337 * server.c: Include "notif.h".
338 (struct vstop_notif) <next>: Remove.
339 <base>: New field.
340 (queue_stop_reply): Update.
341 (push_event, send_next_stop_reply): Remove.
342 (discard_queued_stop_replies): Update.
343 (notif_stop): New variable.
344 (handle_v_stopped): Remove.
345 (handle_v_requests): Don't call handle_v_stopped. Call
346 handle_ack_notif instead.
347 (queue_stop_reply_callback): Call notif_event_enque instead
348 of queue_stop_reply.
349 (handle_status): Don't call send_next_stop_reply, call
350 notif_write_event instead.
351 (kill_inferior_callback): Likewise.
352 (detach_or_kill_inferior_callback): Likewise.
353 (main): Call initialize_notif.
354 (process_serial_event): Call QUEUE_is_empty.
355 (handle_target_event): Call notif_push instead of push event.
356 * server.h (push_event): Remove declaration.
357
61c125b9
TT
3582012-12-10 Tom Tromey <tromey@redhat.com>
359
360 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
361 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
362 macros.
363 (.c.o): Rewrite.
364 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
365 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
366 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
367 (amd64-linux-ipa.o, ax.o): Rewrite.
368 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
369 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
370 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
371 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
372 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
373 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
374 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
375 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
376 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
377 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
378 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
379 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
380 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
381 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
382 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
383 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
384 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
385 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
386 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
387 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
388 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
389 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
390 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
391 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
392 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
393 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
394 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
395 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
396 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
397 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
398 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
399 (reg-tilegx.o): Remove.
400 (all_object_files): New macro.
401 Include .deps files.
402 * aclocal.m4, configure: Rebuild.
403 * acinclude.m4: Include depstand.m4, lead-dot.m4.
404 * configure.ac: Invoke ZW_CREATE_DEPDIR,
405 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
406
e90e9ad9
TT
4072012-12-05 Tom Tromey <tromey@redhat.com>
408
409 PR gdb/14917:
410 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
411
02d403bf 4122012-11-28 Markus Metzger <markus.t.metzger@intel.com>
945bf713
MM
413
414 * configure.ac: Check for linux/perf_event.h.
415 * config.in: Regenerated.
416 * configure: Regenerated.
417
0270a750
PA
4182012-11-26 Maxime Villard <rustyBSD@gmx.fr>
419
420 * hostio.c (handle_readlink): Decrease buffer size
421 parameter passed to readlink by one byte.
422
8c29b58e
YQ
4232012-11-26 Yao Qi <yao@codesourcery.com>
424
425 * configure.ac (build_warnings): Append '-Wempty-body'.
426 * configure: Regenerated.
427 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
428 body.
429
8bdce1ff
PM
4302012-11-15 Pierre Muller <muller@sourceware.org>
431
432 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
433 * config.in: Regenerate.
434 * configure: Regenerate.
435 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
436 Use "gdb_wait.h" header instead of <sys/wait.h> header.
437 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
438 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
439 header.
440 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
441 instead of <sys/wait.h> header.
442 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
443
02d403bf 4442012-11-13 Markus Metzger <markus.t.metzger@intel.com>
3ba6ad0f
MM
445
446 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
447 (various make rules): Remove -DGDBSERVER
448
fbd5db48
YQ
4492012-11-09 Yao Qi <yao@codesourcery.com>
450
451 * spu-low.c (current_ptid): Move it to ..
452 * gdbthread.h: ... here. New.
453 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
454 * server.c (myresume, process_serial_event): Likewise.
455 * thread-db.c (thread_db_find_new_threads): Likewise.
456 * tracepoint.c (run_inferior_command): Likewise.
457
b3dc46ff
AB
4582012-10-01 Andrew Burgess <aburgess@broadcom.com>
459
460 * server.c (handle_search_memory_1): Include access length in
461 warning message.
462
07c04788
HPN
4632012-09-05 Michael Brandt <michael.brandt@axis.com>
464
465 * linux-crisv32-low.c: Fix compile errors.
466
918d227b
YQ
4672012-09-04 Yao Qi <yao@codesourcery.com>
468
469 * tracepoint.c (cmd_qtsv): Adjust debug message.
470 Don't check CUR_TPOINT.
471
18c1b81a
YQ
4722012-08-28 Yao Qi <yao@codesourcery.com>
473
474 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
475 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
476 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
477 Remove declarations of xmalloc, xreallloc, xstrdup and
478 freeargv.
479 * Makefile.in (libiberty_h): New.
480 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
481 (linux-bfin-low.o): Append dependency 'libiberty.h'.
482
dc82f37b
YQ
4832012-08-23 Yao Qi <yao@codesourcery.com>
484
485 * server.h: Remove declaration of 'xsnprintf'.
486
406b1477
KS
4872012-08-22 Keith Seitz <keiths@redhat.com>
488
489 * server.h: Include build-gnulib-gbserver/config.h.
490 * gdbreplay.c: Likewise.
491
e6712ff1
DE
4922012-08-08 Doug Evans <dje@google.com>
493
494 * Makefile.in (SFILES): Add gdb_vecs.c.
495 (OBS): Add gdb_vecs.o.
496 (gdb_vecs_h, host_defs_h): New variables.
497 (thread-db.o): Add $(gdb_vecs_h) dependency.
498 (gdb_vecs.o): New rule.
499 * thread-db.c: #include "gdb_vecs.h".
500 (thread_db_load_search): Use a vector to iterate over path elements.
501 Handle text appearing after "$pdir".
502
503 * configure.ac: Add check for strstr.
504 * config.in: Regenerate.
505 * configure: Regenerate.
506
7c3270ae
UW
5072012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
508
509 * hostio.c (handle_pread): If pread fails, fall back to attempting
510 lseek/read.
511 (handle_pwrite): Likewise for pwrite.
512
b62e2b27
UW
5132012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
514
515 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
516 between unsupported TYPE and unimplementable ADDR/LEN combination.
517 (arm_insert_point): Act on new return value.
518
78a99e91
PA
5192012-07-31 Pedro Alves <palves@redhat.com>
520
521 * server.c (process_point_options): Only skip tokens if we find
522 one that is unrecognized. Don't treat 'X' specially while
523 skipping unrecognized tokens.
524
fcf303ab
UW
5252012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
526
527 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
528 to 4-byte-align HW breakpoint addresses for Thumb.
529
7255706c
YQ
5302012-07-27 Yao Qi <yao@codesourcery.com>
531
532 PR remote/14161.
533
534 * server.h: Declare gdb_agent_about_to_close.
535 * target.c (kill_inferior): Include "agent.h".
536 New. Send command 'kill'.
537 * target.h (kill_inferior): Removed macro.
538 * tracepoint.c (gdb_agent_about_to_close): New.
539 (gdb_agent_helper_thread): Handle command 'close'.
540 Wait endlessly until the inferior stops.
541 Install gdb_agent_remove_socket to atexit hook.
542 (agent_socket_name): New static variable.
543 (gdb_agent_socket_init): Replace local variable 'name' with
544 'agent_socket_name'.
545 (gdb_agent_remove_socket): New.
546
5a3f286f
YQ
5472012-07-27 Yao Qi <yao@codesourcery.com>
548
549 * server.c (process_point_options): Stop at 'X' when parsing.
550
961bd387
ME
5512012-07-19 Michael Eager <eager@eagercon.com>
552
553 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
554 to hw_execute.
555 * linux-x86-low.c (x86_insert_point, x86_remove_point):
556 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
557 hardware breakpoint.
558
aa7c7447
JK
5592012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
560
561 * gdbserver/linux-low.c (initialize_low): Call
562 linux_ptrace_init_warnings.
563
7f216e7c
DE
5642012-07-02 Doug Evans <dje@google.com>
565
566 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
567 pointer to int.
568
d3ce09f5
SS
5692012-07-02 Stan Shebs <stan@codesourcery.com>
570
571 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
572 (ax.o): Add it to build rule.
573 (ax-ipa.o): Ditto.
574 (OBS): Add format.o.
575 (IPA_OBS): Add format.o.
576 * server.c (handle_query): Claim support for breakpoint commands.
577 (process_point_options): Add command case.
578 (process_serial_event): Leave running if there are printfs in
579 effect.
580 * mem-break.h (any_persistent_commands): Declare.
581 (add_breakpoint_commands): Declare.
582 (gdb_no_commands_at_breakpoint): Declare.
583 (run_breakpoint_commands): Declare.
584 * mem-break.c (struct point_command_list): New struct.
585 (struct breakpoint): New field command_list.
586 (any_persistent_commands): New function.
587 (add_commands_to_breakpoint): New function.
588 (add_breakpoint_commands): New function.
589 (gdb_no_commands_at_breakpoint): New function.
590 (run_breakpoint_commands): New function.
591 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
592 locally.
593 * ax.c: Include format.h.
594 (ax_printf): New function.
595 (gdb_eval_agent_expr): Add printf opcode.
596
2f8f6aed
YQ
5972012-06-13 Yao Qi <yao@codesourcery.com>
598
599 * server.c (start_inferior): Remove duplicated writes to fields
600 'last_resume_kind' and 'last_status' of 'current_inferior'.
601
0c9070b3
YQ
6022012-06-12 Yao Qi <yao@codesourcery.com>
603 Pedro Alves <palves@redhat.com>
604
605 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
606 comment.
607 * server.c (handle_v_cont): Extend comment.
608
c52daf70
YQ
6092012-06-11 Yao Qi <yao@codesourcery.com>
610
611 * linux-low.c (linux_attach): Add 'static'.
612
d38bbb0a
YQ
6132012-06-06 Yao Qi <yao@codesourcery.com>
614
615 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
616
89dc0afd
JK
6172012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
618
619 Fix gcc -flto compilation warning.
620 * server.c (main): Make variable multi_mode and attach volatile.
621
75f62ce7
TJB
6222012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
623
624 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
625 if the platform doesn't know about it.
626
65f479b6
PA
6272012-05-30 Jeff Kenton <jkenton@tilera.com>
628
629 * Makefile.in (SFILES): Add linux-tile-low.c.
630 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
631 * configure.srv: Handle tilegx-*-linux*.
632 * linux-tile-low.c: New file.
633
0c5bf5a9
JK
6342012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
635
636 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
637
a493e3e2
PA
6382012-05-24 Pedro Alves <palves@redhat.com>
639
640 PR gdb/7205
641
43aaf8b6 642 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
a493e3e2 643
2ea28649
PA
6442012-05-24 Pedro Alves <palves@redhat.com>
645
646 PR gdb/7205
647
648 Replace target_signal with gdb_signal throughout.
649
8d409d16
MR
6502012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
651
652 * linux-low.c (linux_store_registers): Avoid the copying sequence
653 when no data has been retrieved by ptrace.
654
23512c01
MGD
6552012-05-22 Will Deacon <will.deacon@arm.com>
656
657 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
658 Include asm/ptrace.h.
659 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
660 already defined.
661
4934b29e
MR
6622012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
663
664 * linux-low.c (linux_store_registers): Don't re-retrieve data
665 with ptrace that has already been obtained from /proc. Always
666 copy any data retrieved with ptrace to the buffer supplied.
667
bde24c0a
PA
6682012-05-11 Yao Qi <yao@codesourcery.com>
669 Pedro Alves <palves@redhat.com>
670
671 * linux-low.c (enum stopping_threads_kind): New.
672 (stopping_threads): Change type to `enum stopping_threads_kind'.
673 (handle_extended_wait): If stopping and suspending threads, leave
674 the new_lwp suspended too.
675 (linux_wait_for_event): Adjust.
676 (stop_all_lwps): Set `stopping_threads' to
677 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
678 whether we're suspending threads or just stopping them. Assert no
679 recursion happens.
680
623b6bdf
YQ
6812012-04-29 Yao Qi <yao@codesourcery.com>
682
683 * server.h: Move some code to ...
684 * gdbthread.h: ... here. New.
685 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
686 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
687 (nto-low.o, win32-low.o): Likewise.
688 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
689 * regcache.c, remote-utils.c, server.c: Likewise.
690 * target.c, tracepoint.c, win32-low.c: Likewise.
691
f15f9948
TJB
6922012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
693
694 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
695 (PTRACE_ARG4_TYPE): Likewise.
696 (PTRACE_XFER_TYPE): Likewise.
697 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
698 ptrace to PTRACE_ARG3_TYPE.
699 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
700 (PTRACE_ARG4_TYPE): Likewise.
701 (PTRACE_XFER_TYPE): Likewise.
702 (linux_detach_one_lwp): Cast fourth argument of
703 ptrace to long then PTRACE_ARG4_TYPE.
704 (regsets_fetch_inferior_registers): Cast third argument of
705 ptrace to long then PTRACE_ARG3_TYPE.
706 (regsets_store_inferior_registers): Likewise.
707
38ea300a
PA
7082012-04-20 Pedro Alves <palves@redhat.com>
709
710 * configure: Regenerate.
711
c971b7fa
PA
7122012-04-19 Pedro Alves <palves@redhat.com>
713
43aaf8b6 714 * Makefile.in (GNULIB_BUILDDIR): New.
c971b7fa 715 (LIBGNU, INCGNU, GNULIB_H): Adjust.
43aaf8b6
PA
716 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
717 (all, install-only, uninstall, clean-info, all-lib, clean): No
718 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
719 (maintainer-clean realclean distclean): Use subdir_do.
720 (subdir_do): New.
721 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
c971b7fa 722 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
43aaf8b6
PA
723 * acinclude.m4: Include acx_configure_dir.m4.
724 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
725 calls. Call AC_PROG_RANLIB. Configure gnulib using
726 ACX_CONFIGURE_DIR.
727 (GNULIB): New.
728 (GNULIB_STDINT_H): Adjust.
729 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
730 * gdbreplay.c: Include build-gnulib/config.h.
731 * server.h: Likewise.
732 * aclocal.m4: Regenerate.
733 * config.in: Regenerate.
734 * configure: Regenerate.
c971b7fa 735
809277f8
PA
7362012-04-19 Pedro Alves <palves@redhat.com>
737
738 * Makefile.in (LIBGNU, INCGNU): Adjust.
739 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
740 (all, install-only, uninstall, clean-info, all-lib, clean)
741 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
742 * configure.ac: Adjust AC_OUTPUT output.
743 * aclocal.m4: Regenerate.
744 * configure: Regenerate.
745
fd9bb8b8
PA
7462012-04-19 Pedro Alves <palves@redhat.com>
747
748 * Makefile.in (generated_files): New.
749 (server_h): Remove the explicit dependency on config.h, and depend
750 on $generated_files.
751
1c298c66
PA
7522012-04-19 Pedro Alves <palves@redhat.com>
753
754 * Makefile.in (INCGNU): Add -Ignulib.
755
57c4b50b
PA
7562012-04-19 Pedro Alves <palves@redhat.com>
757
758 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
759 (INCGNU): ... this, and spell out -I here.
760 (GNULIB_LIB): Rename to ...
761 (LIBGNU): ... this.
762 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
763
1030e047
PA
7642012-04-19 Pedro Alves <palves@redhat.com>
765
766 * config.in: Regenerate.
767
447d4319
PA
7682012-04-19 Pedro Alves <palves@redhat.com>
769
770 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
771 * server.h (memmem): Remove declaration.
772 * config.in: Regenerate.
773 * configure: Regenerate.
774
aad9eab9
YQ
7752012-04-19 Yao Qi <yao@codesourcery.com>
776
777 * Makefile.in (SFILES): Add common/vec.c.
778 (OBS): Add vec.o.
779 (vec.o): New rule.
780
3e10640f
YQ
7812012-04-19 Yao Qi <yao@codesourcery.com>
782
783 * remote-utils.c (prepare_resume_reply): Replace with macro
784 target_core_of_thread.
785 * server.c (handle_qxfer_threads_proper): Likewise.
786 * target.h (traget_core_of_thread): New macro.
787
71622373
PA
7882012-04-18 Pedro Alves <palves@redhat.com>
789
790 * aclocal.m4: Regenerate.
791 * configure: Regenerate.
792
80d26939
YQ
7932012-04-16 Yao Qi <yao@codesourcery.com>
794
795 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
796 duplicated on address.
797
42476b70
YQ
7982012-04-16 Yao Qi <yao@codesourcery.com>
799
800 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
801 (struct tracepoint_action_ops) <send>: New field.
802 (m_tracepoint_action_send, r_tracepoint_action_send): New.
803 (agent_expr_send, x_tracepoint_action_send): New.
804 (l_tracepoint_action_send): New.
805 (cmd_qtdp): Download and install tracepoint
806 according to `use_agent'.
807 (run_inferior_command): Add one more parameter `len'.
808 Update callers.
809 (tracepoint_send_agent): New.
810 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
811
7bc83639
YQ
8122012-04-16 Yao Qi <yao@codesourcery.com>
813
814 * tracepoint.c (download_tracepoints): Moved to ...
815 (cmd_qtstart): ... here.
816
5f18041e
YQ
8172012-04-14 Yao Qi <yao@codesourcery.com>
818
819 * tracepoint.c: Include inttypes.h.
820 (struct collect_memory_action): Use sized types.
821 (struct tracepoint): Likewise.
822 (cmd_qtdp, stop_tracing): Update print specifiers.
823 (cmd_qtp, response_tracepoint): Likewise.
824 (collect_data_at_tracepoint): Likewise.
825 (collect_data_at_step): Likewise.
826
55a8c076
YQ
8272012-04-14 Yao Qi <yao@codesourcery.com>
828
829 Import gnulib module inttypes.
830 * aclocal.m4, config.in, configure: Regenerated.
831
dc750257
YQ
8322012-04-14 Yao Qi <yao@codesourcery.com>
833
834 * Makefile.in (maintainer-clean, realclean, distclean): Remove
835 Makefile and config.status at last.
836
0ab5faf9
YQ
8372012-04-13 Yao Qi <yao@codesourcery.com>
838
839 * tracepoint.c: Include stdint.h unconditionally.
840
18f5fd81
TJB
8412012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
842
843 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
844 on BFD_HAVE_SYS_PROCFS_TYPE.
845 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
846 * configure: Regenerate.
847 * config.in: Likewise.
848
4d47af5c
L
8492012-04-13 H.J. Lu <hongjiu.lu@intel.com>
850
851 * Makefile.in (clean): Also remove x32.c x32-linux.c
852 x32-avx.c x32-avx-linux.c.
853 (x32.o): New target.
854 (x32.c): Likewise.
855 (x32-linux.o): Likewise.
856 (x32-linux.c): Likewise.
857 (x32-avx.o): Likewise.
858 (x32-avx.c): Likewise.
859 (x32-avx-linux.o): Likewise.
860 (x32-avx-linux.c): Likewise.
861
862 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
863 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
864 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
865 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
866 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
867 i386/x32-avx-linux.xml.
868
869 * linux-x86-low.c (init_registers_x32_linux): New prototype.
870 (init_registers_x32_avx_linux): Likwise.
871 (x86_linux_update_xmltarget): Call init_registers_x32_linux
872 or init_registers_x32_avx_linux if linux_is_elf64 is false.
873
ecedbe58
PA
8742012-04-13 Pedro Alves <palves@redhat.com>
875
876 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
877 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
878 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
879 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
880 the sub-make.
881
c92b5177
L
8822012-04-12 H.J. Lu <hongjiu.lu@intel.com>
883
884 * linux-x86-low.c (compat_x32_clock_t): New.
885 (compat_x32_siginfo_t): Likewise.
886 (compat_x32_siginfo_from_siginfo): Likewise.
887 (siginfo_from_compat_x32_siginfo): Likewise.
888 (linux_is_elf64): Likewise.
889 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
890 and siginfo_from_compat_x32_siginfo for x32.
891 (x86_arch_setup): Set linux_is_elf64.
892
214d508e
L
8932012-04-12 H.J. Lu <hongjiu.lu@intel.com>
894
895 PR gdb/13969
896 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
897 e_machine field.
898 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
899 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
900 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
901 compatible with process.
902
c9a1864a
YQ
9032012-04-12 Yao Qi <yao@codesourcery.com>
904
905 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
906 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
907 (install-only, install-info, clean): Handle sub dir gnulib.
908 (all-lib, am--refresh): New targets.
909 (memmem.o): Remove target.
910 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
911 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
912 (AC_REPLACE_FUNCS): Remove memmem.
913 Invoke gl_INIT and AM_INIT_AUTOMAKE.
914 (AC_OUTPUT): Generate Makefile in gnulib/.
915 * aclocal.m4, config.in, configure: Regenerated.
916
367ba2c2
MR
9172012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
918
919 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
920
9d236627
PA
9212012-04-05 Pedro Alves <palves@redhat.com>
922
923 -Werror=strict-aliasing
924
925 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
926 pointer.
927
111217b3
PA
9282012-04-04 Pedro Alves <palves@redhat.com>
929
930 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
931 (sparc_store_gregset_from_stack, sparc_store_gregset)
932 (sparc_breakpoint_at): Fix formatting.
933
8365dcf5
TJB
9342012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
935
936 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
937 are available.
938 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
939 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
940 * config.in: Regenerate.
941 * configure: Likewise.
942
689cc2ae
PA
9432012-03-29 Pedro Alves <palves@redhat.com>
944
945 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
946 Correct ptrace arguments.
947
c14dfd32
PA
9482012-03-28 Pedro Alves <palves@redhat.com>
949
950 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
951 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
952 (IA64_FR1_REGNUM): New defines.
953 (ia64_fetch_register): New.
954 (the_low_target): Install it.
955 * linux-low.h (struct linux_target_ops) <fetch_register>: New
956 field.
957 * linux-low.c (linux_fetch_registers): Try the
958 the_low_target.fetch_register hook first.
959
960 * linux-arm-low.c (the_low_target): Adjust.
961 * linux-bfin-low.c (the_low_target): Adjust.
962 * linux-cris-low.c (the_low_target): Adjust.
963 * linux-crisv32-low.c (the_low_target): Adjust.
964 * linux-m32r-low.c (the_low_target): Adjust.
965 * linux-m68k-low.c (the_low_target): Adjust.
966 * linux-mips-low.c (the_low_target): Adjust.
967 * linux-ppc-low.c (the_low_target): Adjust.
968 * linux-s390-low.c (the_low_target): Adjust.
969 * linux-sh-low.c (the_low_target): Adjust.
970 * linux-sparc-low.c (the_low_target): Adjust.
971 * linux-tic6x-low.c (the_low_target): Adjust.
972 * linux-x86-low.c (the_low_target): Adjust.
973 * linux-xtensa-low.c (the_low_target): Adjust.
974
63c88e13
PA
9752012-03-26 Pedro Alves <palves@redhat.com>
976
977 * server.c (handle_qxfer_libraries): Don't bail early if
978 the_target->qxfer_libraries_svr4 is not NULL.
979
fb723180
PA
9802012-03-26 Pedro Alves <palves@redhat.com>
981
982 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
983
0afae3cf
PA
9842012-03-23 Pedro Alves <palves@redhat.com>
985
986 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
987 "library-list-svr4" element's start tag when the the DSO list is
988 empty.
989
485f1ee4
PA
9902012-03-23 Pedro Alves <palves@redhat.com>
991
992 * linux-low.c (read_one_ptr): Read the inferior's pointer through
993 a variable whose type size is the same as the inferior's pointer
994 size.
995
a5362b9a
TS
9962012-03-21 Thomas Schwinge <thomas@codesourcery.com>
997
998 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
999 struct siginfo.
1000 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
1001 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
1002 * linux-low.h: Include <signal.h>.
1003 (struct siginfo): Remove forward declaration.
1004 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
1005 struct siginfo.
1006
d226c142
MF
10072012-03-21 Mike Frysinger <vapier@gentoo.org>
1008
1009 * .gitignore: Ignore more files.
1010
122f36ef
PA
10112012-03-19 Pedro Alves <palves@redhat.com>
1012 Jan Kratochvil <jan.kratochvil@redhat.com>
1013
1014 * server.c (cont_thread, general_thread): Add describing comments.
1015 (start_inferior): Clear `cont_thread'.
1016 (handle_v_cont): Don't set `cont_thread' if resuming all threads
1017 of a process.
1018
fc3e5175
YQ
10192012-03-15 Yao Qi <yao@codesourcery.com>
1020
1021 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
1022 handling to ...
1023 (cmd_qtdp): ... here.
1024
8d0d92cd
YQ
10252012-03-15 Yao Qi <yao@codesourcery.com>
1026
1027 * tracepoint.c (struct tracepoint_action_ops): New.
1028 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
1029 (m_tracepoint_action_download): New.
1030 (r_tracepoint_action_download): New.
1031 (x_tracepoint_action_download): New.
1032 (l_tracepoint_action_download): New.
1033 (add_tracepoint_action): Install `action->ops' according type.
1034 (download_tracepoint_1): Move code `download' function pointer
1035 of various tracepoint_action_ops.
1036
87b0bb13
JK
10372012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
1038
1039 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
1040 linux_ptrace_attach_warnings.
1041
5f572dec
JK
10422012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
1043
1044 * Makefile.in (linux-ptrace.o): New.
1045 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
1046 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
1047 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
1048 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
1049 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
1050 of these targets.
1051 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
1052
f4647387
YQ
10532012-03-08 Yao Qi <yao@codesourcery.com>
1054 Pedro Alves <palves@redhat.com>
1055
1056 Fix PR server/13392.
1057 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
1058 offset of JMP insn.
1059 * tracepoint.c (remove_tracepoint): New.
1060 (cmd_qtdp): Call remove_tracepoint when failed to install.
1061
9b224c5e
PA
10622012-03-07 Pedro Alves <palves@redhat.com>
1063
1064 * linux-low.c (get_detach_signal): New.
1065 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
1066 Pass on pending signals to PTRACE_DETACH. Check the result of the
1067 ptrace call.
1068 * server.c (program_signals, program_signals_p): New.
1069 (handle_general_set): Handle QProgramSignals.
1070 * server.h (program_signals, program_signals_p): Declare.
1071
e237a7e2
JK
10722012-03-05 Pedro Alves <palves@redhat.com>
1073 Jan Kratochvil <jan.kratochvil@redhat.com>
1074
1075 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
1076 New comment why.
1077
5808517f
YQ
10782012-03-03 Yao Qi <yao@codesourcery.com>
1079
1080 * tracepoint.c (tracepoint_look_up_symbols): Update call to
1081 agent_look_up_symbols.
1082
58b4daa5
YQ
10832012-03-03 Yao Qi <yao@codesourcery.com>
1084
1085 * Makefile.in (linux-low.o): Keep dependence on agent.h.
1086 (linux-x86-low.o): Likewise.
1087 * server.h: Remove in_process_agent_loaded.
1088 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
1089 common/agent.c.
1090 Update callers.
1091
8ffcbaaf
YQ
10922012-03-03 Yao Qi <yao@codesourcery.com>
1093
1094 * tracepoint.c (gdb_agent_capability): New global.
1095 (in_process_agent_loaded_ust): Renamed to
1096 `in_process_agent_supports_ust'.
1097 Update callers.
1098 (in_process_agent_supports_ust): Call agent_capability_check.
1099 (clear_installed_tracepoints): Assert that agent supports
1100 agent.
1101
d1feda86
YQ
11022012-03-03 Yao Qi <yao@codesourcery.com>
1103
1104 * linux-low.c (linux_supports_agent): New.
1105 (linux_target_ops): Initialize field `supports_agent' with
1106 linux_supports_agent.
1107 * target.h (struct target_ops) <supports_agent>: New.
1108 (target_supports_agent): New macro.
1109 * server.c (handle_general_set): Handle packet 'QAgent'.
1110 (handle_query): Send `QAgent+'.
1111 * Makefile.in (server.o): Depends on agent.h.
1112
2fa291ac
YQ
11132012-03-03 Yao Qi <yao@codesourcery.com>
1114
1115 * Makefile.in (OBS): Add agent.o.
1116 Add new rule for agent.o.
1117 Track dependence of tracepoint.c on agent.h.
1118 * tracepoint.c (run_inferior_command_1):
1119 (run_inferior_command): Call agent_run_command.
1120 (gdb_ust_connect_sync_socket): Deleted. Move it to
1121 common/agent.c.
1122 (resume_thread, stop_thread): Likewise.
1123 (gdb_ust_socket_init): Renamed to ...
1124 (gdb_agent_socket_init): ... New.
1125 (gdb_ust_thread): Renamed to ...
1126 (gdb_agent_helper_thread): ... New.
1127 (gdb_ust_init): Move some code to ...
1128 (gdb_agent_init): ... here. New.
1129 [HAVE_UST]: Call gdb_ust_init.
1130 (initialize_tracepoint_ftlib): Call gdb_agent_init.
1131 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
1132 * config.in, configure: Regenerated.
1133
05044653
PA
11342012-03-02 Pedro Alves <palves@redhat.com>
1135
1136 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
1137 * linux-low.c (struct simple_pid_list): New.
1138 (stopped_pids): New a struct simple_pid_list pointer.
1139 (add_to_pid_list, pull_pid_from_list): New.
1140 (handle_extended_wait): Don't assume the first signal new children
1141 report is SIGSTOP. Adjust call to pull_pid_from_list.
1142 (linux_wait_for_lwp): Adjust.
1143
8d00225b
YQ
11442012-03-02 Yao Qi <yao@codesourcery.com>
1145
1146 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
1147 debug log.
1148
19560ba5
YQ
11492012-03-02 Yao Qi <yao@codesourcery.com>
1150
1151 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
1152 `stop_pc' and `tpoint'. Update caller.
1153
1faeff08
MR
11542012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
1155
1156 * linux-low.h (linux_target_ops): Add regset_bitmap member.
1157 * linux-low.c (use_linux_regsets): New macro.
1158 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
1159 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
1160 (linux_register_in_regsets): New function.
1161 (usr_fetch_inferior_registers): Skip registers covered by
1162 regsets.
1163 (usr_store_inferior_registers): Likewise.
1164 (usr_fetch_inferior_registers): New macro.
1165 (usr_store_inferior_registers): Likewise.
1166 (linux_fetch_registers): Handle mixed regset/non-regset targets.
1167 (linux_store_registers): Likewise.
1168 * linux-mips-low.c (init_registers_mips_dsp_linux): New
1169 prototype.
1170 (init_registers_mips64_dsp_linux): Likewise.
1171 (init_registers_mips_linux): New macro.
1172 (init_registers_mips_dsp_linux): Likewise.
1173 (mips_dsp_num_regs): Likewise.
1174 (DSP_BASE, DSP_CONTROL): New fallback macros.
1175 (mips_base_regs): New macro.
1176 (mips_regmap): Use it. Fix the size.
1177 (mips_dsp_regmap): New variable.
1178 (mips_dsp_regset_bitmap): Likewise.
1179 (mips_arch_setup): New function.
1180 (mips_cannot_fetch_register): Use the_low_target.regmap rather
1181 than mips_regmap.
1182 (mips_cannot_store_register): Likewise.
1183 (the_low_target): Update .arch_setup, .num_regs and .regmap
1184 initializers. Add .regset_bitmap initializer.
1185 * linux-arm-low.c (the_low_target): Add .regset_bitmap
1186 initializer.
1187 * linux-bfin-low.c (the_low_target): Likewise.
1188 * linux-cris-low.c (the_low_target): Likewise.
1189 * linux-crisv32-low.c (the_low_target): Likewise.
1190 * linux-ia64-low.c (the_low_target): Likewise.
1191 * linux-m32r-low.c (the_low_target): Likewise.
1192 * linux-m68k-low.c (the_low_target): Likewise.
1193 * linux-ppc-low.c (the_low_target): Likewise.
1194 * linux-s390-low.c (the_low_target): Likewise.
1195 * linux-sh-low.c (the_low_target): Likewise.
1196 * linux-sparc-low.c (the_low_target): Likewise.
1197 * linux-tic6x-low.c (the_low_target): Likewise.
1198 * linux-x86-low.c (the_low_target): Likewise.
1199 * linux-xtensa-low.c (the_low_target): Likewise.
1200 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
1201 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
1202 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
1203 srv_xmlfiles.
1204 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
1205 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
1206
c03e6ccc
YQ
12072012-02-29 Yao Qi <yao@codesourcery.com>
1208 Pedro Alves <palves@redhat.com>
1209
1210 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
1211 `step_over_finished' is true.
1212
644cebc9
PA
12132012-02-27 Pedro Alves <palves@redhat.com>
1214
1215 * linux-low.c (pid_is_stopped): Delete, moved to common/.
1216 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
1217
c14d7ab2
PA
12182012-02-27 Pedro Alves <palves@redhat.com>
1219
1220 PR server/9684
1221 * linux-low.c (pid_is_stopped): New.
1222 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
1223
412c89dd
LM
12242012-02-25 Luis Machado <lgustavo@codesourcery.com>
1225
1226 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
1227 of conditions.
1228
b745defe
MR
12292012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
1230
1231 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
1232
9f3a5c85
LM
12332012-02-24 Luis Machado <lgustavo@codesourcery>
1234
1235 * server.c (handle_query): Advertise support for target-side
1236 breakpoint condition evaluation.
1237 (process_point_options): New function.
1238 (process_serial_event): When inserting a breakpoint, check for
1239 a target-side condition that should be evaluated.
1240
1241 * mem-break.c: Include regcache.h and ax.h.
1242 (point_cond_list_t): New data structure.
1243 (breakpoint) <cond_list>: New field.
1244 (find_gdb_breakpoint_at): Make non-static.
1245 (delete_gdb_breakpoint_at): Clear any target-side
1246 conditions.
1247 (clear_gdb_breakpoint_conditions): New function.
1248 (add_condition_to_breakpoint): Likewise.
1249 (add_breakpoint_condition): Likewise.
1250 (gdb_condition_true_at_breakpoint): Likewise.
1251 (gdb_breakpoint_here): Return result directly instead
1252 of going through a local variable.
1253
1254 * mem-break.h (find_gdb_breakpoint_at): New prototype.
1255 (clear_gdb_breakpoint_conditions): Likewise.
1256 (add_breakpoint_condition): Likewise.
1257 (gdb_condition_true_at_breakpoint): Likewise.
1258
1259 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
1260 (need_step_over_p): Take target-side breakpoint condition into
1261 consideration.
1262
5e1dc496
LM
12632012-02-24 Luis Machado <lgustavo@codesourcery>
1264
1265 * server.h: Include tracepoint.h.
1266 (agent_mem_read, agent_get_trace_state_variable_value,
1267 agent_set_trace_state_variable_value,
1268 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
1269 get_set_tsv_func_addr): New prototypes.
1270
1271 * ax.h: New include file.
1272 * ax.c: New source file.
1273
1274 * tracepoint.c: Include ax.h.
1275 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
1276 agent_expr, eval_result_type): Move to ax.h.
1277 (parse_agent_expr): Rename to ...
1278 (gdb_parse_agent_expr): ... this, make it non-static and move
1279 to ax.h.
1280 (unparse_agent_expr) Rename to ...
1281 (gdb_unparse_agent_expr): ... this, make it non-static and move
1282 to ax.h.
1283 (eval_agent_expr): Rename to ...
1284 (eval_tracepoint_agent_expr): ... this.
1285 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
1286 forward declarations.
1287 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
1288 (agent_get_trace_state_variable_value): New function.
1289 (agent_set_trace_state_variable_value): New function.
1290 (cmd_qtdp): Call gdb_parse_agent_expr (...).
1291 (response_tracepoint): Call gdb_unparse_agent_expr (...).
1292 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
1293 (condition_true_at_tracepoint): Likewise.
1294 (parse_agent_expr): Rename to ...
1295 (gdb_parse_agent_expr): ... this and move to ax.c.
1296 (unparse_agent_expr): Rename to ...
1297 (gdb_unparse_agent_expr): ... this and move to ax.c.
1298 (gdb_agent_op_name): Move to ax.c.
1299 (eval_agent_expr): Rename to ...
1300 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
1301 and move to ax.c.
1302 (eval_tracepoint_agent_expr): New function.
1303 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
43aaf8b6 1304 non-static.
5e1dc496
LM
1305 (current_insn_ptr, emit_error, struct bytecode_address): Move to
1306 ax.c.
1307 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
1308 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
1309 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
1310 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
1311 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
1312 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
1313 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
1314 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
1315 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
1316 (compile_bytecodes): Remove forward declaration.
1317 (is_goto_target): Move to ax.c.
1318 (compile_bytecodes): Move to ax.c and call
1319 agent_get_trace_state_variable_value (...) and
1320 agent_set_trace_state_variable_value (...).
1321
1322 * Makefile.in: Update ax.c and IPA dependencies.
1323
277e4e52
PA
13242012-02-24 Pedro Alves <palves@redhat.com>
1325
1326 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
1327 (cmd_bigqtbuffer_circular): ... this. Only handle
1328 'QTBuffer:circular:'.
1329 (handle_tracepoint_general_set): Adjust.
1330
bf4c19f7
YQ
13312012-02-16 Yao Qi <yao@codesourcery.com>
1332
1333 * inferiors.c: Move code to ...
1334 * dll.c: .... here. New.
1335 * server.h: Declare clear_dlls.
1336 * Makefile.in (SFILES): Add dll.c.
1337 (OBS): Add dll.o
1338 (dll.o): New rule.
1339
d73f2619
YQ
13402012-02-11 Yao Qi <yao@codesourcery.com>
1341
1342 * server.c: (handle_monitor_command): Add a new parameter
1343 `own_buf'.
1344 (handle_query): Update caller.
1345
f8255c2a
JB
13462012-02-09 Joel Brobecker <brobecker@adacore.com>
1347
1348 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
1349 * configure, config.in: Regenerate.
1350 * hostio.c: Provide an alternate implementation if HAVE_READLINK
1351 is not defined.
1352
da84f473
PA
13532012-02-02 Pedro Alves <palves@redhat.com>
1354
1355 Try SIGKILL first, then PTRACE_KILL.
1356 * linux-low.c (linux_kill_one_lwp): New.
1357 (linux_kill_one_lwp): Rename to ...
1358 (kill_one_lwp_callback): ... this. Use the new
1359 linux_kill_one_lwp.
1360
e886a173
PA
13612012-02-02 Pedro Alves <palves@redhat.com>
1362
1363 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
1364 inferior.
1365
be07f1a2
PA
13662012-01-27 Pedro Alves <palves@redhat.com>
1367
1368 * linux-low.c (linux_child_pid_to_exec_file): Delete.
1369 (elf_64_file_p): Make static.
1370 (linux_pid_exe_is_elf_64_file): New.
1371 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
1372 Delete declarations.
1373 (linux_pid_exe_is_elf_64_file): Declare.
1374 * linux-x86-low.c (x86_arch_setup): Use
1375 linux_pid_exe_is_elf_64_file.
1376
d8301ad1
JK
13772012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
1378
1379 * linux-low.c (linux_wait_for_event_1): Rename to ...
1380 (linux_wait_for_event): ... here and merge it with former
1381 linux_wait_for_event - new variable wait_ptid, use it.
1382 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
1383
01b17894
PA
13842012-01-23 Pedro Alves <palves@redhat.com>
1385
1386 * server.c (main): Avoid yet another case of infinite loop while
1387 detaching/killing after a longjmp.
1388
e825046f
JK
13892012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
1390
1391 Code cleanup.
1392 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
1393
b9e7b9c3
UW
13942012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
1395
1396 * hostio.c (handle_readlink): New function.
1397 (handle_vFile): Call it to handle "vFile:readlink" packets.
1398
901f9912
UW
13992012-01-20 Pedro Alves <palves@redhat.com>
1400 Ulrich Weigand <ulrich.weigand@linaro.org>
1401
1402 * server.c (handle_v_requests): Only support vAttach and vRun to
1403 start multiple processes when in extended protocol mode.
1404
fc1ab1a0
PA
14052012-01-17 Pedro Alves <palves@redhat.com>
1406
1407 * tracepoint.c (initialize_tracepoint): Use mmap instead of
1408 memalign plus mprotect to allocate the scratch buffer.
1409
7d5d4e98
PA
14102012-01-13 Pedro Alves <palves@redhat.com>
1411
1412 * server.c (attach_inferior): Clear `cont_thread'.
1413
f128d5e9
PA
14142012-01-13 Pedro Alves <palves@redhat.com>
1415
1416 * server.c (main): Avoid infinite loop while detaching/killing
1417 after a longjmp.
1418
06db92f0
DE
14192012-01-09 Doug Evans <dje@google.com>
1420
1421 * server.c (start_inferior): Set last_ptid in --wrapper case.
1422
32d92999
YQ
14232012-01-06 Yao Qi <yao@codesourcery.com>
1424
1425 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
1426 defined.
1427 [IN_PROCESS_AGENT] (debug_agent): New global variable.
1428
5e0a92a9
YQ
14292012-01-04 Yao Qi <yao@codesourcery.com>
1430
1431 * tracepoint.c (cmd_qtdp): Print debug message
1432 for static tracepoint.
1433
ae639e8c
YQ
14342012-01-04 Yao Qi <yao@codesourcery.com>
1435
1436 * tracepoint.c (trace_vdebug): Differentiate debug message
1437 between gdbserver and IPA.
1438
f72429c5
YQ
14392012-01-03 Yao Qi <yao@codesourcery.com>
1440
1441 * tracepoint.c (tracepoint_was_hit): Don't collect for
1442 static tracepoint.
1443
12c3e59c
JB
14442012-01-02 Joel Brobecker <brobecker@adacore.com>
1445
1446 * terminal.h: Reformat copyright header.
1447
67827812
JB
14482012-01-02 Joel Brobecker <brobecker@adacore.com>
1449
1450 * server.c (gdbserver_version): Update copyright year.
1451 * gdbreplay.c (gdbreplay_version): Likewise.
1452
3e52c33d
JK
14532011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
1454
1455 * linux-low.c (linux_create_inferior): Put empty if clause for write.
1456
1457 Revert:
1458 2011-12-18 Hui Zhu <teawater@gmail.com>
1459 * linux-low.c (linux_create_inferior): Save return value to ret.
1460
66f1260e
HZ
14612011-12-18 Hui Zhu <teawater@gmail.com>
1462
1463 * linux-low.c (linux_create_inferior): Save return value to ret.
1464
e77616d7
DE
14652011-12-16 Doug Evans <dje@google.com>
1466
e7b06c57
DE
1467 * linux-low.c (linux_create_inferior): If stdio connection,
1468 redirect stdin from /dev/null, stdout to stderr.
1469 * remote-utils.c (remote_is_stdio): New static global.
1470 (remote_connection_is_stdio): New function.
1471 (remote_prepare): Handle stdio connection.
1472 (remote_open): Ditto.
1473 (remote_close): Don't close stdin for stdio connections.
1474 (read_prim,write_prim): New functions. Replace all calls to
1475 read/write to these.
1476 * server.c (main): Watch for "-" argument. Move call to
1477 remote_prepare before start_inferior.
1478 * server.h (STDIO_CONNECTION_NAME): New macro.
1479 (remote_connection_is_stdio): Declare.
1480
e77616d7
DE
1481 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
1482 in debugging output.
1483
82067193
YQ
14842011-12-15 Yao Qi <yao@codesourcery.com>
1485
1486 * tracepoint.c: Include sys/syscall.h.
1487 (gdb_ust_thread): Remove preprocessor conditional.
1488
82bfbe7e
PA
14892011-12-14 Pedro Alves <pedro@codesourcery.com>
1490
1491 * linux-low.c (linux_detach_one_lwp): Call
1492 the_low_target.prepare_to_resume before detaching.
1493
712c6575
YQ
14942011-12-14 Yao Qi <yao@codesourcery.com>
1495
1496 * tracepoint.c (gdb_ust_thread): Don't ignore return value
1497 of write.
1498
d54d1edf
YQ
14992011-12-14 Yao Qi <yao@codesourcery.com>
1500
1501 * i386-low.c (i386_low_stopped_data_address): Initialize local
1502 variable `control'.
1503
6210a125
PA
15042011-12-13 Pedro Alves <pedro@codesourcery.com>
1505
1506 PR remote/13492
1507
1508 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
1509 DR_CONTROL unless necessary. Extend comments.
1510 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
1511 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
1512
2ece8244
YQ
15132011-12-13 Yao Qi <yao@codesourcery.com>
1514
1515 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
1516 macros.
1517 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
1518
784867a5
JK
15192011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
1520
1521 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
1522 Print new debug message for such case.
1523
6bf36717
JK
15242011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
1525
1526 Fix overlapping memcpy.
1527 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
1528 the read_inferior_memory transfer.
1529 (delete_fast_tracepoint_jump): New variable buf. Use it for the
1530 write_inferior_memory transfer.
1531 (set_fast_tracepoint_jump): New variable buf. Use it for the
1532 read_inferior_memory and write_inferior_memory transfers.
1533 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
1534 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
1535 Use it for the write_inferior_memory transfer.
1536 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
1537 buffers.
1538
50275556
MR
15392011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
1540
1541 * linux-low.c (fetch_register, store_register): Make code
1542 consistent, fix formatting.
1543
7325beb4
MR
15442011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
1545
1546 * linux-low.c (usr_store_inferior_registers): Factor out code
1547 to handle individual registers into...
1548 (store_register): ... this new function.
1549
c642a434
UW
15502011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
1551
1552 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
1553 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
1554 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
1555 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
1556 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
1557 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
1558 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
1559 (srv_xmlfiles): Add new XML files.
1560
1561 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
1562 and <sys/uio.h>.
1563 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
1564 (init_registers_s390_linux32v1): Add prototype.
1565 (init_registers_s390_linux32v2): Likewise.
1566 (init_registers_s390_linux64v1): Likewise.
1567 (init_registers_s390_linux64v2): Likewise.
1568 (init_registers_s390x_linux64v1): Likewise.
1569 (init_registers_s390x_linux64v2): Likewise.
1570 (s390_num_regs): Increment to 52.
1571 (s390_regmap): Add orig_r2 register.
1572 (s390_num_regs_3264): Increment to 68.
1573 (s390_regmap_3264): Add orig_r2 register.
1574 (s390_collect_ptrace_register): Handle orig_r2 register.
1575 (s390_supply_ptrace_register): Likewise.
1576 (s390_fill_last_break): New function.
1577 (s390_store_last_break): Likewise.
1578 (s390_fill_system_call): New function.
1579 (s390_store_system_call): Likewise.
1580 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
1581 register sets.
1582 (s390_check_regset): New function.
1583 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
1584 NT_S390_SYSTEM_CALL regsets and use appropriate description.
1585 Update target_regsets for available register sets.
1586
2268b414
JK
15872011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
1588 Jan Kratochvil <jan.kratochvil@redhat.com>
1589
1590 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
1591 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
1592 New.
1593 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
1594 * linux-low.h (struct process_info_private): New member r_debug.
1595 * server.c (handle_qxfer_libraries): Call
1596 the_target->qxfer_libraries_svr4.
1597 (handle_qxfer_libraries_svr4): New function.
1598 (qxfer_packets): New entry "libraries-svr4".
1599 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
1600 * target.h (struct target_ops): New member qxfer_libraries_svr4.
1601 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
1602 PACKET_qXfer_libraries_svr4.
1603
d6db1fab
UW
16042011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
1605
1606 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
1607 PSW address/mask between 8-byte and 16-byte formats.
1608 (s390_supply_ptrace_register): Likewise.
1609 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
1610 basic addressing mode bit.
1611
242f5f1c
SS
16122011-11-24 Stan Shebs <stan@codesourcery.com>
1613
1614 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
1615
f196051f
SS
16162011-11-17 Stan Shebs <stan@codesourcery.com>
1617
1618 * tracepoint.c (struct tracepoint): New field traceframe_usage.
1619 (tracing_start_time): New global.
1620 (tracing_stop_time): New global.
1621 (tracing_user_name): New global.
1622 (tracing_notes): New global.
1623 (tracing_stop_note): New global.
1624 (cmd_qtstart): Set traceframe_usage, start_time.
1625 (stop_tracing): Set stop_time.
1626 (cmd_qtstatus): Report additional status.
1627 (cmd_qtp): New function.
1628 (handle_tracepoint_query): Call it.
1629 (cmd_qtnotes): New function.
1630 (handle_tracepoint_general_set): Call it.
1631 (get_timestamp): Rename from tsv_get_timestamp.
1632
405f8e94
SS
16332011-11-14 Stan Shebs <stan@codesourcery.com>
1634 Kwok Cheung Yeung <kcy@codesourcery.com>
1635
1636 * linux-x86-low.c (small_jump_insn): New.
1637 (i386_install_fast_tracepoint_jump_pad): Add arguments for
1638 trampoline and error message, build a trampoline and issue a small
1639 jump instruction to it.
1640 (x86_install_fast_tracepoint_jump_pad): Add arguments for
1641 trampoline and error message.
1642 (x86_get_min_fast_tracepoint_insn_len): New.
1643 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
1644 * linux-low.h (struct linux_target_ops): Add arguments to
1645 install_fast_tracepoint_jump_pad operation, add new operation.
1646 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
1647 arguments.
1648 (linux_get_min_fast_tracepoint_insn_len): New function.
1649 (linux_target_op): Add new operation.
1650 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
1651 (gdb_trampoline_buffer_end): Ditto.
1652 (gdb_trampoline_buffer_error): Ditto.
1653 (struct ipa_sym_addresses): Add fields for new IPA variables.
1654 (symbol_list): Add entries for new IPA variables.
1655 (struct tracepoint): Add fields to hold the address range of the
1656 trampoline used by the tracepoint.
1657 (trampoline_buffer_head): New static variable.
1658 (trampoline_buffer_tail): Ditto.
1659 (claim_trampoline_space): New function.
1660 (have_fast_tracepoint_trampoline_buffer): New function.
1661 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
1662 structure.
1663 (install_fast_tracepoint): Ditto, also add error buffer argument.
1664 (cmd_qtminftpilen): New function.
1665 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
1666 (fast_tracepoint_from_trampoline_address): New function.
1667 (fast_tracepoint_collecting): Handle trampoline as part of jump
1668 pad space.
1669 (set_trampoline_buffer_space): New function.
1670 (initialize_tracepoint): Initialize new IPA variables.
1671 * target.h (struct target_ops): Add arguments to
1672 install_fast_tracepoint_jump_pad operation, add new
1673 get_min_fast_tracepoint_insn_len operation.
1674 (target_get_min_fast_tracepoint_insn_len): New.
1675 (install_fast_tracepoint_jump_pad): Add arguments.
1676 * server.h (IPA_BUFSIZ): Define.
1677 * linux-i386-ipa.c: Include extra header files.
1678 (initialize_fast_tracepoint_trampoline_buffer): New function.
1679 (initialize_low_tracepoint): Call it.
1680 * server.h (set_trampoline_buffer_space): Declare.
1681 (claim_trampoline_space): Ditto.
1682 (have_fast_tracepoint_trampoline_buffer): Ditto.
1683
1e4d1764
YQ
16842011-11-14 Yao Qi <yao@codesourcery.com>
1685
1686 * server.c (handle_query): Handle InstallInTrace for qSupported.
1687 * tracepoint.c (add_tracepoint): Sort list.
1688 (install_tracepoint, download_tracepoint): New.
1689 (cmd_qtdp): Call them to install and download tracepoints.
1690 (sort_tracepoints): Removed.
1691 (cmd_qtstart): Update.
1692
5c73ff4e
YQ
16932011-11-14 Yao Qi <yao@codesourcery.com>
1694
1695 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
1696 * mem-break.h: Declare.
1697 * tracepoint.c (cmd_qtstart): Move some code to ...
1698 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
1699 New.
1700 (download_tracepoints): Move some code to ...
1701 (download_tracepoint_1): ... here. New.
1702
86a30030
YQ
17032011-11-08 Yao Qi <yao@codesourcery.com>
1704
1705 * remote-utils.c (relocate_instruction): A comment fix.
1706
8d26e50c
JB
17072011-11-07 Joel Brobecker <brobecker@adacore.com>
1708
1709 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
1710 (i386_dr_low_get_control, i386_dr_low_get_status): Use
1711 dr_status_mirror and dr_control_mirror from debug_reg_state.
1712 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
1713 (i386_initial_stuff): Remove use of deleted globals.
1714 (i386_get_thread_context, i386_set_thread_context,
1715 i386_thread_added): Use dr_status_mirror and dr_control_mirror
1716 from debug_reg_state.
1717
a59306a3
YQ
17182011-11-05 Yao Qi <yao@codesourcery.com>
1719
1720 * tracepoint.c (gdb_collect): Loop over tracepoints of same
1721 address as TPOINT's.
1722
3065dfb6
SS
17232011-11-02 Stan Shebs <stan@codesourcery.com>
1724
1725 * tracepoint.c (agent_mem_read_string): New function.
1726 (eval_agent_expr): Call it for tracenz.
1727 * server.c (handle_query): Report support for tracenz.
1728
fd0d8c7c
YQ
17292011-11-02 Yao Qi <yao@codesourcery.com>
1730
1731 * tracepoint.c (cmd_qtstart): Remove unused local variables.
1732
609086b1
YQ
17332011-11-02 Yao Qi <yao@codesourcery.com>
1734
1735 * target.h: Fix a typo in comment.
1736
b9fd1791
PA
17372011-10-31 Pedro Alves <pedro@codesourcery.com>
1738
1739 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
1740 clobber the breakpoints' shadows with fast tracepoint jumps.
1741 * mem-break.h (check_mem_write): Add `myaddr' parameter.
1742 * target.c (write_inferior_memory): Also pass MYADDR down to
1743 check_mem_write.
1744
03583c20
UW
17452011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
1746
1747 * configure.ac: Check support for personality routine.
1748 * configure: Regenerate.
1749 * config.in: Likewise.
1750 * linux-low.c: Include <sys/personality.h>.
1751 Define ADDR_NO_RANDOMIZE if necessary.
1752 (linux_create_inferior): Disable address space randomization when
1753 forking inferior, if requested.
1754 (linux_supports_disable_randomization): New function.
1755 (linux_target_ops): Install it.
1756 * server.h (disable_randomization): Declare.
1757 * server.c (disable_randomization): New global variable.
1758 (handle_general_set): Handle QDisableRandomization.
1759 (handle_query): Likewise for qSupported.
1760 (main): Support --disable-randomization and --no-disable-randomization
1761 command line arguments.
1762 * target.h (struct target_ops): Add supports_disable_randomization.
1763 (target_supports_disable_randomization): New macro.
1764
723b724b
MF
17652011-09-29 Mike Frysinger <vapier@gentoo.org>
1766
1767 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
1768 ifdef check.
1769 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
1770 [!PT_GETDSBT] (target_loadmap): New definition.
1771 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
1772 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
1773 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
1774 and PT_GETDSBT to LINUX_LOADMAP.
1775 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
1776 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
1777
55329a5c 17782011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
71487fd7
UW
1779
1780 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
1781 (arm_linux_hwbp_cap): New static variable.
1782 (arm_linux_get_hwbp_cap): Replace by ...
1783 (arm_linux_init_hwbp_cap): ... this new function.
1784 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
1785 (arm_linux_get_hw_watchpoint_count): Likewise.
1786 (arm_linux_get_hw_watchpoint_max_length): Likewise.
1787 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
1788 (arm_prepare_to_resume): Use perror_with_name instead of error.
1789
55329a5c 17902011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
09b4ad9f
UW
1791
1792 * linux-arm-low.c: Include <signal.h>.
1793 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
1794 (struct arm_linux_hwbp_cap): New data type.
1795 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
1796 (struct arm_linux_hw_breakpoint): New data type.
1797 (MAX_BPTS, MAX_WPTS): Define.
1798 (struct arch_process_info, struct arch_lwp_info): New data types.
1799 (arm_linux_get_hwbp_cap): New function.
1800 (arm_linux_get_hw_breakpoint_count): Likewise.
1801 (arm_linux_get_hw_watchpoint_count): Likewise.
1802 (arm_linux_get_hw_watchpoint_max_length): Likewise.
1803 (arm_hwbp_control_initialize): Likewise.
1804 (arm_hwbp_control_is_enabled): Likewise.
1805 (arm_hwbp_control_is_initialized): Likewise.
1806 (arm_hwbp_control_disable): Likewise.
1807 (arm_linux_hw_breakpoint_equal): Likewise.
1808 (arm_linux_hw_point_initialize): Likewise.
1809 (struct update_registers_data): New data structure.
1810 (update_registers_callback: New function.
1811 (arm_insert_point): Likewise.
1812 (arm_remove_point): Likewise.
1813 (arm_stopped_by_watchpoint): Likewise.
1814 (arm_stopped_data_address): Likewise.
1815 (arm_new_process): Likewise.
1816 (arm_new_thread): Likewise.
1817 (arm_prepare_to_resume): Likewise.
1818 (the_low_target): Register arm_insert_point, arm_remove_point,
1819 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
1820 arm_new_thread, and arm_prepare_to_resume.
1821
6b9801d4
SS
18222011-09-15 Stan Shebs <stan@codesourcery.com>
1823
1824 * server.h (struct emit_ops): Add compare-goto fields.
1825 * tracepoint.c (gdb_agent_op_sizes): New table.
1826 (emit_eq_goto): New function.
1827 (emit_ne_goto): New function.
1828 (emit_lt_goto): New function.
1829 (emit_le_goto): New function.
1830 (emit_gt_goto): New function.
1831 (emit_ge_goto): New function.
1832 (is_goto_target): New function.
1833 (compile_bytecodes): Recognize special cases of compare-goto
1834 combinations and call specialized emitters for them.
1835 * linux-x86-low.c (amd64_emit_eq_goto): New function.
1836 (amd64_emit_ne_goto): New function.
1837 (amd64_emit_lt_goto): New function.
1838 (amd64_emit_le_goto): New function.
1839 (amd64_emit_gt_goto): New function.
1840 (amd64_emit_ge_goto): New function.
1841 (amd64_emit_ops): Add the new functions.
1842 (i386_emit_eq_goto): New function.
1843 (i386_emit_ne_goto): New function.
1844 (i386_emit_lt_goto): New function.
1845 (i386_emit_le_goto): New function.
1846 (i386_emit_gt_goto): New function.
1847 (i386_emit_ge_goto): New function.
1848 (i386_emit_ops): Add the new functions.
1849
bf15cbda
SS
18502011-09-08 Stan Shebs <stan@codesourcery.com>
1851
1852 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
1853 (i386_emit_epilogue): Restore %ebx.
1854
943ca1dd
JZ
18552011-08-31 Jie Zhang <jzhang918@gmail.com>
1856
1857 * server.c (step_thread): Remove definition.
1858 (process_serial_event): Don't handle Hs.
1859 * server.h (step_thread): Remove declaration.
1860 * target.c (set_desired_inferior): Remove use of step_thread.
1861
e3deef73
LM
18622011-08-24 Luis Machado <lgustavo@codesourcery.com>
1863
1864 * linux-low.c: Include linux-procfs.h.
1865 (linux_attach_lwp_1): Update comments.
1866 (linux_attach): Scan for existing threads when attaching to a
1867 process that is the tgid.
1868 * Makefile.in: Update dependencies.
1869
13da1c97
LM
18702011-08-24 Luis Machado <lgustavo@codesourcery.com>
1871
1872 * configure.srv: Add linux-procfs.o dependencies.
1873
881127c9
YQ
18742011-08-14 Yao Qi <yao@codesourcery.com>
1875
1876 * target.h (struct target_ops): Fix indent.
1877 * win32-low.c (win32_target_ops): Fix comment.
1878
58dbd541
YQ
18792011-08-14 Andrew Jenner <andrew@codesourcery.com>
1880 Yao Qi <yao@codesourcery.com>
1881
1882 * Makefile.in (clean): Remove tic6x-*.c files.
1883 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
1884 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
1885 (tic6x-c64xp-linux.c): Likewise.
1886 * configure.srv: Add support for tic6x-*-uclinux.
1887 * linux-tic6x-low.c: New.
1888 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
1889
78d85199
YQ
18902011-08-14 Andrew Stubbs <ams@codesourcery.com>
1891 Yao Qi <yao@codesourcery.com>
1892
1893 * target.h (struct target_ops): Add read_loadmap.
1894 * linux-low.c (struct target_loadseg): New type.
1895 (struct target_loadmap): New type.
1896 (linux_read_loadmap): New function.
1897 (linux_target_ops): Add linux_read_loadmap.
1898 * server.c (handle_query): Support qXfer:fdpic:read packet.
43aaf8b6
PA
1899 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
1900 to NULL.
78d85199 1901
a959a88d
EZ
19022011-08-05 Eli Zaretskii <eliz@gnu.org>
1903
1904 * win32-low.c: Include <stdint.h>.
1905
1ced966e
PA
19062011-07-22 Pedro Alves <pedro@codesourcery.com>
1907
1908 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
1909 to the inferior here.
1910 (i386_remove_aligned_watchpoint): Ditto.
1911 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
1912 fit part of the watchpoint in the debug registers.
1913 (i386_update_inferior_debug_regs): New.
1914 (i386_low_insert_watchpoint): Work on a local mirror of the debug
1915 registers, and only update the inferior on success.
1916 (i386_low_remove_watchpoint): Ditto.
1917
d26e3629
KY
19182011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
1919
1920 * linux-low.c (compare_ints, unique, list_threads, show_process,
1921 linux_core_of_thread): Delete.
1922 (linux_target_ops): Change linux_core_of_thread to
1923 linux_common_core_of_thread.
1924 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
1925 * utils.c (malloc_failure): Change type of argument.
1926 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
1927 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
1928 common/linux-osdata.c, common/ptid.c and common/buffer.c.
1929 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
1930 (IPA_OBJS): Add common-utils-ipa.o.
1931 (ptid_h, linux_osdata_h): New macros.
1932 (server_h): Add common/common-utils.h, common/xml-utils.h,
1933 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
1934 common/ptid.h.
1935 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
1936 ptid.o, buffer.o): New rules.
1937 (linux-low.o): Add common/linux-osdata.h as a dependency.
1938 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
1939 * configure.ac: Add AC_HEADER_DIRENT check.
1940 * config.in: Regenerate.
1941 * configure: Regenerate.
1942 * remote-utils.c (xml_escape_text): Delete.
1943 (buffer_grow, buffer_free, buffer_init, buffer_finish,
1944 buffer_xml_printf): Move to common/buffer.c.
1945 * server.c (main): Remove call to initialize_inferiors.
1946 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
1947 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
1948 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
1949 internal_error, gdb_assert, gdb_assert_fail): Delete.
1950 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
1951 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
1952 common/buffer.h.
1953 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
1954 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
1955 initialize_inferiors): Delete.
1956
2275a1a7
PA
19572011-07-20 Pedro Alves <pedro@codesourcery.com>
1958
1959 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
1960 symbol error.
1961
0a5b1e09
PA
19622011-05-31 Pedro Alves <pedro@codesourcery.com>
1963
1964 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
1965 assertion.
1966 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
1967
6938fd34
YQ
19682011-05-26 Yao Qi <yao@codesourcery.com>
1969
1970 * Makefile.in (thread-db.o): Track dependence to
1971 common/gdb_thread_db.h.
1972 * thread-db.c: include gdb_thread_db.h from right place.
1973
b481f9e0
TT
19742011-05-16 Adrian Cornish <gnu@bluedreamer.com>
1975
1976 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
1977 __FILE__ and __LINE__ to internal_error.
1978
98a5dd13
DE
19792011-05-13 Doug Evans <dje@google.com>
1980
1981 * thread-db.c (try_thread_db_load_from_sdir): New function.
1982 (try_thread_db_load_from_dir): New function.
1983 (thread_db_load_search): Handle $sdir, ignore $pdir.
1984 Remove trying of system directories if search of
1985 libthread-db-search-path fails, that is now done via $sdir.
1986
d248b706
KY
19872011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
1988
1989 * server.c (handle_query): Add EnableDisableTracepoints to the list
1990 of supported features.
43aaf8b6 1991 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
d248b706 1992 tracepoints.
43aaf8b6
PA
1993 (cmd_qtenable_disable): New.
1994 (cmd_qtstart): Install tracepoints even if disabled.
1995 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
1996 receiving a QTEnable or QTDisable packet.
1997 (gdb_collect): Skip data collection if fast tracepoint is disabled.
1998 (ust_marker_to_static_tracepoint): Do not ignore disabled static
1999 tracepoints.
2000 (gdb_probe): Skip data collection if static tracepoint is disabled.
d248b706 2001
84e578fb
DE
20022011-05-10 Doug Evans <dje@google.com>
2003
2004 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
2005
71f55dd8
DE
20062011-05-04 Doug Evans <dje@google.com>
2007
2008 * linux-low.c (linux_join): Skip process lookup.
2009 * spu-low.c (spu_join): Ditto.
2010 * server.c (join_inferiors_callback): Delete.
2011 (process_serial_event): For 'D' packet (detach) call join_inferior
2012 directly.
2013
4d393d60
JM
20142011-05-04 Joseph Myers <joseph@codesourcery.com>
2015
2016 * README: Don't mention xscale*-*-linux*.
2017 * configure.srv (xscale*-*-linux*): Don't handle target.
2018
b00ad6ff
NF
20192011-04-27 Nathan Froyd <froydnj@codesourcery.com>
2020
2021 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
2022 casting pointers.
2023 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
2024 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
2025 (i386_emit_void_call_2): Likewise.
2026
af96c192
YQ
20272011-04-26 Yao Qi <yao@codesourcery.com>
2028
43aaf8b6
PA
2029 * linux-low.c: Move common macros to linux-ptrace.h.
2030 Include linux-ptrace.h.
af96c192
YQ
2031 * Makefile.in (linux_ptrace_h): New.
2032 (linux-low.o): Depends on linux-ptrace.h.
2033
03f2bd59
JK
20342011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
2035
2036 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
2037 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
2038 (remote_prepare): New function with most of the TCP code from ...
2039 (remote_open): ... here. Detect PORT here unconditionally. Move also
2040 setting transport_is_reliable.
2041 * server.c (run_once): New variable.
2042 (gdbserver_usage): Document it.
2043 (main): Set run_once for `--once'. Call remote_prepare. Exit after
2044 the first run if RUN_ONCE.
2045 * server.h (run_once, remote_prepare): New declarations.
2046
7a9dd1b2
TT
20472011-04-19 Tom Tromey <tromey@redhat.com>
2048
2049 * win32-low.c (handle_load_dll): Remove duplicate "the".
2050
81239425
PM
20512011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
2052
2053 Remove support for old Cygwin 1.5 versions.
2054 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
2055 function to avoid warning.
2056 (win32_add_one_solib): Use cygwin_conv_path function to avoid
2057 warning.
2058
9e0627f1
PM
20592011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
2060
2061 * gdbserver/server.h (Macro _): Define it if not available.
2062
588eebee
MS
20632011-03-14 Michael Snyder <msnyder@vmware.com>
2064
348af9f7 2065 * hostio.c (handle_close): Remove unnecessary null test.
588eebee 2066
43f70d4c
JB
20672011-03-10 Joel Brobecker <brobecker@adacore.com>
2068
2069 * Makefile.in (maintainer-clean realclean distclean): Remove
2070 "make ... subdir_do" command.
2071
348af9f7
MS
20722011-03-10 Michael Snyder <msnyder@vmware.com>
2073
2074 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
2075
2076 * server.c (handle_v_run): Free alloced buffer on early return.
2077
e637a4f5
YQ
20782011-03-09 Yao Qi <yao@codesourcery.com>
2079
2080 Revert:
2081 2011-03-04 Yao Qi <yao@codesourcery.com>
2082
2083 * Makefile.in: Remove GNU make feature --directory.
2084
2085 2011-03-05 Yao Qi <yao@codesourcery.com>
2086
2087 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
2088 (subdir_do): New make target. Copied from gdb/Makefile.
2089 (maintainer-clean, realclean, distclean, clean): Call corresponding
2090 make targets in common/Makefile.
2091
2092 2011-02-11 Yao Qi <yao@codesourcery.com>
2093
2094 * configure.ac: Call AC_PROG_RANLIB.
2095 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
2096 * configure: Regenerate.
2097
e6edda56
JK
20982011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
2099
2100 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
2101
e5141119
JB
21022011-03-06 Yao Qi <yao@codesourcery.com>
2103
2104 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
2105
64794aa4
JB
21062011-03-05 Yao Qi <yao@codesourcery.com>
2107
2108 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
2109 (subdir_do): New make target. Copied from gdb/Makefile.
2110 (maintainer-clean, realclean, distclean, clean): Call corresponding
2111 make targets in common/Makefile.
2112
7a762829
YQ
21132011-03-04 Yao Qi <yao@codesourcery.com>
2114
2115 * Makefile.in: Remove GNU make feature --directory.
2116
348af9f7
MS
21172011-03-04 Michael Snyder <msnyder@vmware.com>
2118
2119 * server.c (queue_stop_reply): Call xmalloc not malloc.
2120
21212011-03-02 Michael Snyder <msnyder@vmware.com>
2122
2123 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
2124
9f72fee2
MS
21252011-02-28 Michael Snyder <msnyder@vmware.com>
2126
588eebee
MS
2127 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
2128 (cmd_qtframe): Ditto.
2129 (cmd_qtbuffer): Ditto.
2130 (cmd_bigqtbuffer): Ditto.
2131
9f72fee2
MS
2132 * utils.c (decimal2str): Initialize 'width' to nine, then
2133 don't mess with it.
2134
8040bd49
UW
21352011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
2136
2137 * hostio.c (require_data): Free *data, not data.
2138
7e52cbd0
JK
21392011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
2140
2141 * hostio.c (require_data): Use free, not xfree.
2142
9130f83e
MS
21432011-02-27 Michael Snyder <msnyder@vmware.com>
2144
4b812f4e
MS
2145 * server.c (handle_query): Discard unused value.
2146
9130f83e
MS
2147 * hostio.c (require_data): Free malloc memory before returning
2148 error.
2149
69d37113
MS
21502011-02-26 Michael Snyder <msnyder@vmware.com>
2151
2152 * linux-low.c (list_threads): Call closedir for dirent.
2153
35f5825a
MS
21542011-02-27 Michael Snyder <msnyder@vmware.com>
2155
2a589cef
MS
2156 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
2157 a case statement falls through.
2158
0adea5f7
MS
2159 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
2160
35f5825a
MS
2161 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
2162 in comparison.
2163
238f1c74
MS
21642011-02-26 Michael Snyder <msnyder@vmware.com>
2165
2166 * utils.c (decimal2str): Eliminate dead code and dead param.
2167 (pulongest): Drop dead param from call to decimal2str.
2168 (plongest): Ditto.
2169
633ff500
JB
21702011-02-24 Joel Brobecker <brobecker@adacore.com>
2171
2172 Revert the following patch (not approved yet):
2173 2011-02-21 Hui Zhu <teawater@gmail.com>
2174 * tracepoint.c (tp_printf): New function.
2175 (eval_agent_expr): Handle gdb_agent_op_printf.
2176
f9c6ff72
HZ
21772011-02-21 Hui Zhu <teawater@gmail.com>
2178
2179 * tracepoint.c (tp_printf): New function.
2180 (eval_agent_expr): Handle gdb_agent_op_printf.
2181
94d5e490
TT
21822011-02-18 Tom Tromey <tromey@redhat.com>
2183
2184 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
2185 (tracepoint.o): Likewise.
2186 * tracepoint.c (enum gdb_agent_op): Use ax.def.
2187 (gdb_agent_op_names): Likewise.
2188
c7f96d2b
TT
21892011-02-18 Tom Tromey <tromey@redhat.com>
2190
2191 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
2192 gdb_agent_op_rot>: New constants.
2193 (gdb_agent_op_names): Add pick and roll.
2194 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
2195 cases.
2196
0feedb2c
JK
21972011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
2198
2199 * aclocal.m4: Regenerated with aclocal-1.11.1.
2200
b3b9301e
PA
22012011-02-14 Pedro Alves <pedro@codesourcery.com>
2202
2203 * server.c (handle_qxfer_traceframe_info): New.
2204 (qxfer_packets): Register "traceframe-info".
2205 (handle_query): Report support for qXfer:traceframe-info:read+.
2206 * tracepoint.c (match_blocktype): New.
2207 (traceframe_find_block_type): Rename to ...
2208 (traceframe_walk_blocks): ... this. Add callback filter argument,
2209 and use it.
2210 (traceframe_find_block_type): New, reimplemented on top of
2211 traceframe_walk_blocks.
2212 (build_traceframe_info_xml): New.
2213 (traceframe_read_info): New.
2214 * server.h (traceframe_read_info): Declare.
2215
4f3e6fb7
YQ
22162011-02-11 Yao Qi <yao@codesourcery.com>
2217
2218 * configure.ac: Call AC_PROG_RANLIB.
2219 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
2220 * configure: Regenerate.
2221
764880b7
PA
22222011-02-07 Pedro Alves <pedro@codesourcery.com>
2223
2224 * server.c (gdb_read_memory): Change return semantics to allow
2225 partial transfers.
2226 (handle_search_memory_1): Adjust.
2227 (process_serial_event) <'m' packet>: Handle partial transfers.
2228 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
2229
1c79eb8a
PA
22302011-01-28 Pedro Alves <pedro@codesourcery.com>
2231
2232 * regcache.c (init_register_cache): Initialize
2233 regcache->register_status.
2234 (free_register_cache): Release regcache->register_status.
2235 (regcache_cpy): Copy register_status.
2236 (registers_to_string): Print 'x's for unavailable registers.
2237 (supply_register): Mark the register's status valid or
2238 unavailable, depending on whether a buffer was passed in or not.
2239 (supply_register_zeroed): New.
2240 (supply_regblock): Mark the registers' status valid or
2241 unavailable, depending on whether a buffer was passed in or not.
2242 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
2243 (struct regcache): New `register_status' field.
2244 (supply_register_zeroed): Declare.
2245 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
2246 supply_register_zeroed, rather than passing a NULL buffer to
2247 supply_register.
2248 * tracepoint.c (fetch_traceframe_registers): Update comment.
2249
85724a0e
PA
22502011-01-28 Pedro Alves <pedro@codesourcery.com>
2251
2252 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
2253 buffer explicit.
2254
d08aafef
PA
22552011-01-25 Pedro Alves <pedro@codesourcery.com>
2256
2257 * server.h (decode_xfer_write): Change prototype.
2258 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
2259 and don't extract the annex here.
2260 * server.c (decode_xfer_read): Remove `annex' parameter,
2261 and don't extract the annex here.
2262 (decode_xfer): New.
2263 (struct qxfer): New.
2264 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
2265 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
2266 (handle_qxfer_statictrace): New functions, abstracted out from
2267 handle_query, and made to use the struct qxfer interface.
2268 (handle_threads_qxfer_proper): Rename to ...
2269 (handle_qxfer_threads_proper): ... this.
2270 (handle_threads_qxfer): Rename to ...
2271 (handle_qxfer_threads): ... this. Adjust.
2272 (qxfer_packets): New array.
2273 (handle_qxfer): New function.
2274 (handle_query): Use handle_qxfer.
2275
493e2a69
MS
22762011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
2277
2278 * gdbreplay.c: Shorten lines of >= 80 columns.
2279 * linux-low.c: Ditto.
2280 * linux-ppc-low.c: Ditto.
2281 * linux-s390-low.c: Ditto.
2282 * linux-sparc-low.c: Ditto.
2283 * linux-x86-low.c: Ditto.
2284 * linux-xtensa-low.c: Ditto.
2285 * mem-break.c: Ditto.
2286 * nto-low.c: Ditto.
2287 * regcache.h: Ditto.
2288 * remote-utils.c: Ditto.
2289 * server.c: Ditto.
2290 * server.h: Ditto.
2291 * thread-db.c: Ditto.
2292 * tracepoint.c: Ditto.
2293 * utils.c: Ditto.
2294 * win32-low.h: Ditto.
2295
44944448
JB
22962011-01-05 Joel Brobecker <brobecker@adacore.com>
2297
2298 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
2299 update.
2300
71ce852c
JB
23012011-01-01 Joel Brobecker <brobecker@adacore.com>
2302
2303 * server.c (gdbserver_version): Update copyright year in version
2304 output.
2305 * gdbreplay.c (gdbreplay_version): Ditto.
2306
eb826dc6
MF
23072010-12-29 Jie Zhang <jie.zhang@analog.com>
2308
2309 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
2310 * linux-bfin-low.c: New file.
2311 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
2312 PT_DATA_ADDR for BFIN targets.
2313 * Makefile.in (SFILES): Add linux-bfin-low.c.
2314 (clean): Remove reg-bfin.c.
2315 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
2316 * README: Mention supported Blackfin targets.
2317
39ab222a
MF
23182010-12-23 Mike Frysinger <vapier@gentoo.org>
2319
2320 * .gitignore: New file.
2321
a1f2ce7d
MF
23222010-11-16 Mike Frysinger <vapier@gentoo.org>
2323
2324 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
2325
f474844c
JZ
23262010-10-22 Jie Zhang <jie@codesourcery.com>
2327
2328 * Makefile.in: Add FLAGS_TO_PASS variable.
2329 (install): Remove dependency of install-only and recursively
2330 invoke make for install-only.
2331
f1048712
DE
23322010-10-04 Doug Evans <dje@google.com>
2333
2334 * Makefile.in (uninstall): Use $(DESTDIR).
2335
b53a1623
PA
23362010-09-24 Pedro Alves <pedro@codesourcery.com>
2337
e6ee044d
PA
2338 PR gdb/11842
2339
b53a1623
PA
2340 * linux-x86-low.c (compat_siginfo_from_siginfo)
2341 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
2342 si_code is < 0. Check for si_code == SI_TIMER before checking for
2343 si_code < 0.
2344
fa1bd1e4
JB
23452010-09-13 Joel Brobecker <brobecker@adacore.com>
2346
2347 * lynx-i386-low.c: New file.
2348 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
2349
47fac8f8
JB
23502010-09-13 Joel Brobecker <brobecker@adacore.com>
2351
2352 * lynx-low.c (ptrace_request_to_str): Remove handling for
2353 request values that have been removed in LynxOS 5.x.
2354
1adfc54d
JB
23552010-09-13 Joel Brobecker <brobecker@adacore.com>
2356
2357 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
2358 <ptrace.h>
2359
c2a66c29
NS
23602010-09-09 Nathan Sidwell <nathan@codesourcery.com>
2361
2362 * configure.ac: Add --enable-inprocess-agent option.
2363 * configure: Rebuilt.
2364
32fcada3
YQ
23652010-09-06 Yao Qi <yao@codesourcery.com>
2366
2367 * linux-low.c (linux_kill): Remove unused variable.
2368 (linux_stabilize_threads): Likewise.
2369 * server.c (start_inferior): Likewise.
2370 (queue_stop_reply_callback): Likewise.
2371 * tracepoint.c (do_action_at_tracepoint): Likewise.
2372
0cccb683
YQ
23732010-09-06 Yao Qi <yao@codesourcery.com>
2374
2375 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
2376 on return.
2377
423ec54c
JK
23782010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
2379
2380 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
2381
12ac6819
PA
23822010-09-06 Pedro Alves <pedro@codesourcery.com>
2383
2384 * Makefile.in (install-only): Replace $IPA_DEPFILES with
2385 "$(IPA_DEPFILES)".
2386
8ed54b31
JB
23872010-09-01 Joel Brobecker <brobecker@adacore.com>
2388
2389 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
2390 gdbserver/lynx-ppc-low.c: New files.
2391 * Makefile.in (lynx_low_h): New variable.
2392 (lynx-low.o, lynx-ppc-low.o): New rules.
2393 * configure.ac: On LynxOS, link with -lnetinet.
2394 * configure.srv: Add handling of powerpc-*-lynxos* targets.
2395 * configure: regenerate.
2396
bb0116a4
JB
23972010-09-01 Joel Brobecker <brobecker@adacore.com>
2398
2399 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
2400 * configure.ac: Add check for vasprintf and vsnprintf.
2401 * configure, config.in: Regenerate.
2402 * server.h (vasprintf, vsnprintf): Add conditional declarations.
2403
a778ab81 24042010-09-01 Joel Brobecker <brobecker@adacore.com>
2405
2406 * gdbreplay.c: Move include of alloca.h up, next to include of
2407 malloc.h.
2408 * server.h: Add include of malloc.h.
2409 * mem-break.c: Remove include of malloc.h.
2410 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
2411
8b034a19 24122010-09-01 Joel Brobecker <brobecker@adacore.com>
2413
2414 * Makefile.in (memmem.o): Build with -Wno-error.
2415
24162010-09-01 Joel Brobecker <brobecker@adacore.com>
2417
2418 * utils.c (xsnprintf): Make non-static.
2419 * server.h: Add xsnprintf declaration.
2420 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
2421 replace calls to snprintf by calls to xsnprintf throughout.
2422
24232010-09-01 Joel Brobecker <brobecker@adacore.com>
2424
2425 * configure.ac: Add configure check for alloca.
2426 * configure, config.in: Regenerate.
2427 * server.h: Include alloca.h if it exists.
2428 * gdbreplay.c: Include alloca.h if it exists.
2429
1a981360
PA
24302010-08-28 Pedro Alves <pedro@codesourcery.com>
2431
2432 * linux-low.c (__SIGRTMIN): Define if not already defined.
2433 (linux_create_inferior): Check for __ANDROID__ rather than
2434 __SIGRTMIN.
2435 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
2436 are already deferred.
2437 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
2438 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
2439 stopped and already has a pending signal to report.
2440 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
2441 a pending signal to report or is moving out of a jump pad.
2442 (linux_init_signals): Check for __ANDROID__ rather than
2443 __SIGRTMIN.
2444
b4d51a55
PA
24452010-08-28 Pedro Alves <pedro@codesourcery.com>
2446
2447 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
2448 debug_threads check. Avoid a linear search when not doing debug
2449 output.
2450
ec48365d
PA
24512010-08-27 Pedro Alves <pedro@codesourcery.com>
2452
2453 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
2454 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
2455 (struct file_handler) <fd>: Change type to gdb_fildes_t.
2456 (process_event): Change local fd's type to gdb_fildes_t.
2457 (create_file_handler): Adjust prototype.
2458 (delete_file_handler): Adjust prototype.
2459 (handle_file_event): Adjust prototype. Use pfildes.
2460 (create_file_event): Adjsut prototype.
2461 * remote-utils.c (remote_desc, listen_desc): Change type to
2462 gdb_fildes_t.
2463 * server.h: New gdb_fildes_t typedef.
2464 [USE_WIN32API]: Include winsock2.h.
2465 (delete_file_handler, add_file_handler): Adjust prototypes.
2466 (pfildes): Declare.
2467 * utils.c (pfildes): New.
2468
854d88f0
PA
24692010-08-27 Pedro Alves <pedro@codesourcery.com>
2470
2471 * configure.ac (build_warnings): Add -Wno-char-subscripts.
2472 * configure: Regenerate.
2473
0146f85b
PA
24742010-08-27 Pedro Alves <pedro@codesourcery.com>
2475
2476 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
2477 (linux_done_accessing_memory): ... this.
2478 (linux_target_ops): Adjust.
2479 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
2480 * nto-low.c (nto_target_ops): Adjust comment.
2481 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
2482 * spu-low.c (spu_target_ops): Adjust comment.
2483 * target.h (target_ops): Rename unprepare_to_access_memory field
2484 to done_accessing_memory.
2485 (unprepare_to_access_memory): Rename to ...
2486 (done_accessing_memory): ... this.
2487
90d74c30
PA
24882010-08-26 Pedro Alves <pedro@codesourcery.com>
2489
2490 * linux-low.c (linux_prepare_to_access_memory): New.
2491 (linux_unprepare_to_access_memory): New.
2492 (linux_target_ops): Install them.
2493 * server.c (read_memory): Rename to ...
2494 (gdb_read_memory): ... this. Use
2495 prepare_to_access_memory/prepare_to_access_memory.
2496 (write_memory): Rename to ...
2497 (gdb_write_memory): ... this. Use
2498 prepare_to_access_memory/prepare_to_access_memory.
2499 (handle_search_memory_1): Adjust.
2500 (process_serial_event): Adjust.
2501 * target.h (struct target_ops): New fields
2502 prepare_to_access_memory and unprepare_to_access_memory.
2503 (prepare_to_access_memory, unprepare_to_access_memory): New.
2504 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
2505 prepare_to_access_memory/prepare_to_access_memory.
2506 * nto-low.c (nto_target_ops): Adjust.
2507 * spu-low.c (spu_target_ops): Adjust.
2508 * win32-low.c (win32_target_ops): Adjust.
2509
fd467969
PA
25102010-08-26 Pedro Alves <pedro@codesourcery.com>
2511
2512 * Makefile.in (WARN_CFLAGS): Get it from configure.
2513 (WERROR_CFLAGS): New.
2514 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
2515 * configure.ac: Introduce --enable-werror, which adds -Werror to
2516 the compiler command line. Enabled by default. Disable with
2517 --disable-werror. Add -Wdeclaration-after-statement
2518 Wpointer-arith and -Wformat-nonliteral to warning flags.
2519 * configure: Regenerate.
2520
331e2f5f
PA
25212010-08-26 Pedro Alves <pedro@codesourcery.com>
2522
2523 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
2524
e581f2b4
PA
25252010-08-26 Pedro Alves <pedro@codesourcery.com>
2526
2527 * gdbreplay.c (remote_error): New.
2528 (gdbchar): New.
2529 (expect): Use gdbchar. Check for error reading from GDB.
2530 Clarify sync error output.
2531 (play): Check for errors writing to GDB.
2532 * linux-low.c (sigchld_handler): Really ignore `write' errors.
2533 * remote-utils.c (getpkt): Check for errors writing to the remote
2534 descriptor.
2535
3c11dd79
PA
25362010-08-25 Pedro Alves <pedro@codesourcery.com>
2537
2538 * linux-low.c (linux_wait_1): Move non-debugging code out of
2539 `debug_threads' control.
2540
d20a8ad9
PA
25412010-08-25 Pedro Alves <pedro@codesourcery.com>
2542
2543 * linux-low.c (linux_wait_1): Don't set last_status here.
2544 * server.c (push_event, queue_stop_reply_callback): Assert we're
2545 not pushing a TARGET_WAITKIND_IGNORE event.
2546 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
2547 (myresume, handle_target_event): Set the thread's last_resume_kind
2548 and last_status from the target returned status.
2549
964e4306
PA
25502010-08-25 Pedro Alves <pedro@codesourcery.com>
2551
2552 PR threads/10729
2553
2554 * linux-x86-low.c (update_debug_registers_callback): New.
2555 (i386_dr_low_set_addr): Use it.
2556 (i386_dr_low_get_addr): New.
2557 (i386_dr_low_set_control): Use update_debug_registers_callback.
2558 (i386_dr_low_get_control): New.
2559 (i386_dr_low_get_status): Adjust.
2560 * linux-low.c (linux_stop_lwp): New.
2561 * linux-low.h (linux_stop_lwp): Declare.
2562
2563 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
2564 argument instead of a i386_debug_reg_state.
2565 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
2566 a i386_debug_reg_state.
2567 (i386_insert_aligned_watchpoint): Adjust.
2568 (i386_remove_aligned_watchpoint): Adjust.
2569 (i386_low_stopped_data_address): Read the debug registers from the
2570 inferior instead of from the mirrors.
2571 * i386-low.h (struct i386_debug_reg_state): Extend comment.
2572 (i386_dr_low_get_addr): Declare.
2573 (i386_dr_low_get_control): Declare.
2574 (i386_dr_low_get_status): Change prototype.
2575
2576 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
2577 (i386_dr_low_get_addr): New.
2578 (i386_dr_low_get_control): New.
2579 (i386_dr_low_get_status): Adjust prototype. Return
2580 dr_status_mirror.
2581 (i386_initial_stuff): Clear dr_status_mirror and
2582 dr_control_mirror.
2583 (i386_get_thread_context): Adjust.
2584 (i386_set_thread_context): Adjust.
2585 (i386_thread_added): Adjust.
2586
5f21a75b
PA
25872010-08-24 Pedro Alves <pedro@codesourcery.com>
2588
2589 * linux-low.h (linux_thread_area): Delete declaration.
2590
3e4c1235
TS
25912010-08-11 Thomas Schwinge <thomas@codesourcery.com>
2592
2593 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
2594 after its termination.
2595
1971b033
PA
25962010-08-09 Pedro Alves <pedro@codesourcery.com>
2597
2598 * linux-low.c (gdb_wants_lwp_stopped): Delete.
2599 (gdb_wants_all_stopped): Delete.
2600 (linux_wait_1): Don't call them.
2601 * server.c (handle_v_cont): Tag all threads as want-stopped.
2602 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
2603 stopped as "client-wants-stopped".
2604
310444ac
PA
26052010-07-31 Pedro Alves <pedro@codesourcery.com>
2606
2607 * Makefile.in (signals_h): New.
2608 (server_h): Depend on it.
2609 (server.o): Don't depend on $(signals_def).
2610 (signals.o): Depend on $(signals_def).
2611
a19cae16
JK
26122010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
2613
2614 * Makefile.in (signals_def): New.
2615 (server_h): Append include/gdb/signals.h and signals_def.
2616 (server.o): Append signals_def.
2617
30d50328
JK
26182010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
2619
2620 * server.c (handle_target_event): Use target_signal_to_host for
2621 resume_info.sig initialization.
2622 * target.h (struct thread_resume) <sig>: New comment.
2623
5c3216e2
OS
26242010-07-20 Ozkan Sezer <sezeroz@gmail.com>
2625
c6f46ca0
OS
2626 * server.c (handle_query): strcpy() the returned string from paddress()
2627 instead of sprintf().
5c3216e2
OS
2628 * utils.c (paddress): Return phex_nz().
2629
6bd31874
JB
26302010-07-07 Joel Brobecker <brobecker@adacore.com>
2631
2632 * server.c (handle_v_cont): Call mourn_inferior if process
2633 just exited.
2634 (myresume): Likewise.
2635
0fb4aa4b
PA
26362010-07-01 Pedro Alves <pedro@codesourcery.com>
2637
2638 Static tracepoints, and integration with UST.
2639
2640 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
2641 * mem-break.c (uninsert_all_breakpoints)
2642 (reinsert_all_breakpoints): New.
2643 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
2644 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
2645 (gdb_agent_ust_loaded, helper_thread_id)
2646 (gdb_agent_helper_thread_id): New macros.
2647 (struct ipa_sym_addresses): Add addr_ust_loaded,
2648 addr_helper_thread_id, addr_cmd_buf.
2649 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
2650 (in_process_agent_loaded_ust): New.
2651 (write_e_ust_not_loaded): New.
2652 (maybe_write_ipa_ust_not_loaded): New.
2653 (struct collect_static_trace_data_action): New.
2654 (enum tracepoint_type) <static_tracepoint>: New.
2655 (struct tracepoint) <handle>: Mention static tracepoints.
2656 (struct static_tracepoint_ctx): New.
2657 (CMD_BUF_SIZE): New.
2658 (add_tracepoint_action): Handle static tracepoint actions.
2659 (unprobe_marker_at): New.
2660 (clear_installed_tracepoints): Handle static tracepoints.
2661 (cmd_qtdp): Handle static tracepoints.
2662 (probe_marker_at): New.
2663 (cmd_qtstart): Handle static tracepoints.
2664 (response_tracepoint): Handle static tracepoints.
2665 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
2666 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
2667 (get_context_regcache): Handle static tracepoints.
2668 (do_action_at_tracepoint): Handle static tracepoint actions.
2669 (traceframe_find_block_type): Handle static trace data blocks.
2670 (traceframe_read_sdata): New.
2671 (download_tracepoints): Download static tracepoint actions.
2672 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
2673 (GDB_PROBE_NAME): New.
2674 (ust_ops): New.
2675 (GET_UST_SYM): New.
2676 (USTF): New.
2677 (dlsym_ust): New.
2678 (ust_marker_to_static_tracepoint): New.
2679 (gdb_probe): New.
2680 (collect_ust_data_at_tracepoint): New.
2681 (gdb_ust_probe): New.
2682 (UNIX_PATH_MAX, SOCK_DIR): New.
2683 (gdb_ust_connect_sync_socket): New.
2684 (resume_thread, stop_thread): New.
2685 (run_inferior_command): New.
2686 (init_named_socket): New.
2687 (gdb_ust_socket_init): New.
2688 (cstr_to_hexstr): New.
2689 (next_st): New.
2690 (first_marker, next_marker): New.
2691 (response_ust_marker): New.
2692 (cmd_qtfstm, cmd_qtsstm): New.
2693 (unprobe_marker_at, probe_marker_at): New.
2694 (cmd_qtstmat, gdb_ust_thread): New.
2695 (gdb_ust_init): New.
2696 (initialize_tracepoint_ftlib): Call gdb_ust_init.
2697 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
2698 (ST_REGENTRY): New.
2699 (x86_64_st_collect_regmap): New.
2700 (X86_64_NUM_ST_COLLECT_GREGS): New.
2701 (AMD64_RIP_REGNUM): New.
2702 (supply_static_tracepoint_registers): New.
2703 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
2704 (ST_REGENTRY): New.
2705 (i386_st_collect_regmap): New.
2706 (i386_NUM_ST_COLLECT_GREGS): New.
2707 (supply_static_tracepoint_registers): New.
2708 * server.c (handle_query): Handle qXfer:statictrace:read.
2709 <qSupported>: Report support for StaticTracepoints, and
2710 qXfer:statictrace:read features.
2711 * server.h (traceframe_read_sdata)
2712 (supply_static_tracepoint_registers): Declare.
2713 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
2714 (unpack_varlen_hex): Include in IPA build.
2715 * Makefile.in (ustlibs, ustinc): New.
2716 (IPA_OBJS): Add remote-utils-ipa.o.
2717 ($(IPA_LIB)): Link -ldl and -lpthread.
2718 (UST_CFLAGS): New.
2719 (IPAGENT_CFLAGS): Add UST_CFLAGS.
2720 * config.in, configure: Regenerate.
2721
9e4344e5
PA
27222010-06-20 Ian Lance Taylor <iant@google.com>
2723 Pedro Alves <pedro@codesourcery.com>
2724
2725 * linux-x86-low.c (always_true): Delete.
2726 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
2727 trying to fool the compiler with always_true.
2728
c6beb2cb
PA
27292010-06-20 Pedro Alves <pedro@codesourcery.com>
2730
2731 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
2732 conditions in gdbserver.
2733
d2ed6730
UW
27342010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
2735
2736 * spu-low.c (spu_read_memory): Wrap around local store limit.
2737 (spu_write_memory): Likewise.
2738
4e29fb54
PA
27392010-06-15 Pedro Alves <pedro@codesourcery.com>
2740
2741 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
2742 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
2743 LONGEST uses.
2744 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
2745 uses.
2746 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
2747 uses with LONGEST uses.
2748
6a271cae
PA
27492010-06-14 Stan Shebs <stan@codesourcery.com>
2750 Pedro Alves <pedro@codesourcery.com>
2751
2752 Bytecode compiler.
2753
2754 * linux-x86-low.c: Include limits.h.
2755 (add_insns): New.
2756 (always_true): New.
2757 (EMIT_ASM): New.
2758 (EMIT_ASM32): New.
2759 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
2760 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
2761 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
2762 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
2763 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
2764 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
2765 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
2766 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
2767 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
2768 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
2769 (amd64_emit_void_call_2): New.
2770 (amd64_emit_ops): New.
2771 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
2772 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
2773 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
2774 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
2775 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
2776 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
2777 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
2778 (i386_emit_call, i386_emit_reg, i386_emit_pop)
2779 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
2780 (i386_emit_stack_adjust, i386_emit_int_call_1)
2781 (i386_emit_void_call_2): New.
2782 (i386_emit_ops): New.
2783 (x86_emit_ops): New.
2784 (the_low_target): Install x86_emit_ops.
2785 * server.h (struct emit_ops): New.
2786 (get_raw_reg_func_addr): Declare.
2787 (current_insn_ptr, emit_error): Declare.
2788 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
2789 (set_trace_state_variable_value): New defines.
2790 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
2791 addr_get_trace_state_variable_value and
2792 addr_set_trace_state_variable_value.
2793 (symbol_list): New fields for get_raw_reg,
2794 get_trace_state_variable_value and set_trace_state_variable_value.
2795 (condfn): New typedef.
2796 (struct tracepoint): New field `compiled_cond'.
2797 (do_action_at_tracepoint): Clear compiled_cond.
2798 (get_trace_state_variable_value, set_trace_state_variable_value):
2799 Export in the IPA.
2800 (condition_true_at_tracepoint): If there's a compiled condition,
2801 run that.
2802 (current_insn_ptr, emit_error): New globals.
2803 (struct bytecode_address): New.
2804 (get_raw_reg_func_addr): New.
2805 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
2806 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
2807 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
2808 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
2809 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
2810 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
2811 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
2812 (compile_tracepoint_condition, compile_bytecodes): New.
2813 * target.h (emit_ops): Forward declare.
2814 (struct target_ops): New field emit_ops.
2815 (target_emit_ops): New.
2816 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
2817 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
2818 * linux-low.c (linux_emit_ops): New.
2819 (linux_target_ops): Install it.
2820 * linux-low.h (struct linux_target_ops): New field emit_ops.
2821
92b72907
UW
28222010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
2823
2824 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
2825 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
2826
fa593d66
PA
28272010-06-01 Pedro Alves <pedro@codesourcery.com>
2828 Stan Shebs <stan@codesourcery.com>
2829
2830 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
2831 (all): Depend on $(extra_libraries).
2832 (install-only): Install the IPA.
2833 (IPA_OBJS, IPA_LIB): New.
2834 (clean): Remove the IPA lib.
2835 (IPAGENT_CFLAGS): New.
2836 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
2837 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
2838 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
2839 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
2840 * configure.ac: Check for atomic builtins support in the compiler.
2841 (IPA_DEPFILES, extra_libraries): Define.
2842 * configure.srv (ipa_obj): Add description.
2843 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
2844 (i[34567]86-*-linux*): Set ipa_obj.
2845 (x86_64-*-linux*): Set ipa_obj.
2846 * linux-low.c (stabilizing_threads): New.
2847 (supports_fast_tracepoints): New.
2848 (linux_detach): Stabilize threads before detaching.
2849 (handle_tracepoints): Handle internal tracing breakpoints. Assert
2850 the lwp is either not stabilizing, or is moving out of a jump pad.
2851 (linux_fast_tracepoint_collecting): New.
2852 (maybe_move_out_of_jump_pad): New.
2853 (enqueue_one_deferred_signal): New.
2854 (dequeue_one_deferred_signal): New.
2855 (linux_wait_for_event_1): If moving out of a jump pad, defer
2856 pending signals to later.
2857 (linux_stabilize_threads): New.
2858 (linux_wait_1): Check if threads need moving out of jump pads, and
2859 do it if so.
2860 (stuck_in_jump_pad_callback): New.
2861 (move_out_of_jump_pad_callback): New.
2862 (lwp_running): New.
2863 (linux_resume_one_lwp): Handle moving out of jump pads.
2864 (linux_set_resume_request): Dequeue deferred signals.
2865 (need_step_over_p): Also step over fast tracepoint jumps.
2866 (start_step_over): Also uninsert fast tracepoint jumps.
2867 (finish_step_over): Also reinsert fast tracepoint jumps.
2868 (linux_install_fast_tracepoint_jump): New.
2869 (linux_target_ops): Install linux_stabilize_threads and
2870 linux_install_fast_tracepoint_jump_pad.
2871 * linux-low.h (linux_target_ops) <get_thread_area,
2872 install_fast_tracepoint_jump_pad>: New fields.
2873 (struct lwp_info) <collecting_fast_tracepoint,
2874 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
2875 (linux_get_thread_area): Declare.
2876 * linux-x86-low.c (jump_insn): New.
2877 (x86_get_thread_area): New.
2878 (append_insns): New.
2879 (push_opcode): New.
2880 (amd64_install_fast_tracepoint_jump_pad): New.
2881 (i386_install_fast_tracepoint_jump_pad): New.
2882 (x86_install_fast_tracepoint_jump_pad): New.
2883 (the_low_target): Install x86_get_thread_area and
2884 x86_install_fast_tracepoint_jump_pad.
2885 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
2886 (struct fast_tracepoint_jump): New.
2887 (fast_tracepoint_jump_insn): New.
2888 (fast_tracepoint_jump_shadow): New.
2889 (find_fast_tracepoint_jump_at): New.
2890 (fast_tracepoint_jump_here): New.
2891 (delete_fast_tracepoint_jump): New.
2892 (set_fast_tracepoint_jump): New.
2893 (uninsert_fast_tracepoint_jumps_at): New.
2894 (reinsert_fast_tracepoint_jumps_at): New.
2895 (set_breakpoint_at): Use write_inferior_memory.
2896 (uninsert_raw_breakpoint): Use write_inferior_memory.
2897 (check_mem_read): Mask out fast tracepoint jumps.
2898 (check_mem_write): Mask out fast tracepoint jumps.
2899 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
2900 (set_fast_tracepoint_jump): Declare.
2901 (delete_fast_tracepoint_jump)
2902 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
2903 (reinsert_fast_tracepoint_jumps_at): Declare.
2904 * regcache.c: Don't compile many functions when building the
2905 in-process agent library.
2906 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
2907 the register buffer in the heap.
2908 (free_register_cache): If the register buffer isn't owned by the
2909 regcache, don't free it.
2910 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
2911 pre-existing register caches.
2912 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
2913 type.
2914 (convert_ascii_to_int): : Constify `from' parameter type.
2915 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
2916 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
2917 the needed buffer in-place.
2918 (relocate_instruction): New.
2919 * server.c (handle_query) <qSymbols>: If the target supports
2920 tracepoints, give it a chance of looking up symbols. Report
2921 support for fast tracepoints.
2922 (handle_status): Stabilize threads.
2923 (process_serial_event): Adjust.
2924 * server.h (struct fast_tracepoint_jump): Forward declare.
2925 (struct process_info) <fast_tracepoint_jumps>: New field.
2926 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
2927 (decode_X_packet, decode_M_packet): Adjust.
2928 (relocate_instruction): Declare.
2929 (in_process_agent_loaded): Declare.
2930 (tracepoint_look_up_symbols): Declare.
2931 (struct fast_tpoint_collect_status): Declare.
2932 (fast_tracepoint_collecting): Declare.
2933 (force_unlock_trace_buffer): Declare.
2934 (handle_tracepoint_bkpts): Declare.
2935 (initialize_low_tracepoint)
2936 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
2937 * target.h (struct target_ops) <stabilize_threads,
2938 install_fast_tracepoint_jump_pad>: New fields.
2939 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
2940 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
2941 [HAVE_STDINT_H]: Include stdint.h.
2942 (trace_debug_1): Rename to ...
2943 (trace_vdebug): ... this.
2944 (trace_debug): Rename to ...
2945 (trace_debug_1): ... this. Add `level' parameter.
2946 (trace_debug): New.
2947 (ATTR_USED, ATTR_NOINLINE): New.
2948 (IP_AGENT_EXPORT): New.
2949 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
2950 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
2951 (about_to_request_buffer_space, trace_buffer_is_full)
2952 (stopping_tracepoint, expr_eval_result, error_tracepoint)
2953 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
2954 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
2955 (traceframe_write_count, traceframes_created)
2956 (trace_state_variables)
2957 New renaming defines.
2958 (struct ipa_sym_addresses): New.
2959 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
2960 (symbol_list): New.
2961 (ipa_sym_addrs): New.
2962 (all_tracepoint_symbols_looked_up): New.
2963 (in_process_agent_loaded): New.
2964 (write_e_ipa_not_loaded): New.
2965 (maybe_write_ipa_not_loaded): New.
2966 (tracepoint_look_up_symbols): New.
2967 (debug_threads) [IN_PROCESS_AGENT]: New.
2968 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
2969 (UNKNOWN_SIDE_EFFECTS): New.
2970 (stop_tracing): New.
2971 (flush_trace_buffer): New.
2972 (stop_tracing_bkpt): New.
2973 (flush_trace_buffer_bkpt): New.
2974 (read_inferior_integer): New.
2975 (read_inferior_uinteger): New.
2976 (read_inferior_data_pointer): New.
2977 (write_inferior_data_pointer): New.
2978 (write_inferior_integer): New.
2979 (write_inferior_uinteger): New.
2980 (struct collect_static_trace_data_action): Delete.
2981 (enum tracepoint_type): New.
2982 (struct tracepoint) <type>: New field `type'.
43aaf8b6
PA
2983 <actions_str, step_actions, step_actions_str>: Only include in
2984 GDBserver.
fa593d66
PA
2985 <orig_size, obj_addr_on_target, adjusted_insn_addr>
2986 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
2987 (tracepoints): Use IP_AGENT_EXPORT.
2988 (last_tracepoint): Don't include in the IPA.
2989 (stopping_tracepoint): Use IP_AGENT_EXPORT.
2990 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
2991 (alloced_trace_state_variables): New.
2992 (trace_state_variables): Use IP_AGENT_EXPORT.
2993 (traceframe_t): Delete unused variable.
2994 (circular_trace_buffer): Don't include in the IPA.
2995 (trace_buffer_start): Delete.
2996 (struct trace_buffer_control): New.
2997 (trace_buffer_free): Delete.
2998 (struct ipa_trace_buffer_control): New.
2999 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
3000 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
3001 New.
3002 (trace_buffer_ctrl): New.
3003 (TRACE_BUFFER_CTRL_CURR): New.
3004 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
3005 Reimplement as macros.
3006 (trace_buffer_wrap): Delete.
3007 (traceframe_write_count, traceframe_read_count)
3008 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
3009 (struct tracepoint_hit_ctx) <type>: New field.
3010 (struct fast_tracepoint_ctx): New.
3011 (memory_barrier): New.
3012 (cmpxchg): New.
3013 (record_tracepoint_error): Update atomically in the IPA.
3014 (clear_inferior_trace_buffer): New.
3015 (about_to_request_buffer_space): New.
3016 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
3017 updating the same buffer.
3018 (add_tracepoint): Default the tracepoint's type to trap
3019 tracepoint, and orig_size to -1.
3020 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
3021 internal variables.
3022 (create_trace_state_variable): New parameter `gdb'. Handle it.
3023 (clear_installed_tracepoints): Clear fast tracepoint jumps.
3024 (cmd_qtdp): Handle fast tracepoints.
3025 (cmd_qtdv): Adjust.
3026 (max_jump_pad_size): New.
3027 (gdb_jump_pad_head): New.
3028 (get_jump_space_head): New.
3029 (claim_jump_space): New.
3030 (sort_tracepoints): New.
3031 (MAX_JUMP_SIZE): New.
3032 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
3033 IPA.
3034 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
3035 support. Upload fast traceframes, and delete internal IPA
3036 breakpoints.
3037 (stop_tracing_handler): New.
3038 (flush_trace_buffer_handler): New.
3039 (cmd_qtstop): Upload fast tracepoints.
3040 (response_tracepoint): Handle fast tracepoints.
3041 (tracepoint_finished_step): Upload fast traceframes. Set the
3042 tracepoint hit context's tracepoint type.
3043 (handle_tracepoint_bkpts): New.
3044 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
3045 type. Add comment about fast tracepoints.
3046 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
3047 non-existing action_str field.
3048 (get_context_regcache): Handle fast tracepoints.
3049 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
3050 to the regcache.
3051 (fast_tracepoint_from_jump_pad_address): New.
3052 (fast_tracepoint_from_ipa_tpoint_address): New.
3053 (collecting_t): New.
3054 (force_unlock_trace_buffer): New.
3055 (fast_tracepoint_collecting): New.
3056 (collecting): New.
3057 (gdb_collect): New.
3058 (write_inferior_data_ptr): New.
3059 (target_tp_heap): New.
3060 (target_malloc): New.
3061 (download_agent_expr): New.
3062 (UALIGN): New.
3063 (download_tracepoints): New.
3064 (download_trace_state_variables): New.
3065 (upload_fast_traceframes): New.
3066 (IPA_FIRST_TRACEFRAME): New.
3067 (IPA_NEXT_TRACEFRAME_1): New.
3068 (IPA_NEXT_TRACEFRAME): New.
3069 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
3070 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
3071 (gdb_jump_pad_buffer_end): New.
3072 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
3073 (initialize_tracepoint): Adjust.
3074 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
3075 buffer. Initialize the low module.
3076 * utils.c (PREFIX, TOOLNAME): New.
3077 (malloc_failure): Use PREFIX.
3078 (error): In the IPA, an error causes an exit.
3079 (fatal, warning): Use PREFIX.
3080 (internal_error): Use TOOLNAME.
3081 (NUMCELLS): Increase to 10.
3082 * configure, config.in: Regenerate.
3083
d149dd1d
PA
30842010-06-01 Pedro Alves <pedro@codesourcery.com>
3085
3086 * server.c (handle_query) <qSupported>: Do two passes over the
3087 qSupported string to avoid nesting strtok.
3088
f6528abd
JK
30892010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
3090
3091 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
3092 (CDEPS): New.
3093 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
3094 -Wl,--dynamic-list.
3095 * configure: Regenerate.
3096 * proc-service.list: New.
3097
ca2a87a0
JK
30982010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
3099
3100 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
3101 New comment.
3102
363a6e9f
OS
31032010-05-26 Ozkan Sezer <sezeroz@gmail.com>
3104
3105 * gdbreplay.c (remote_open): Check error return from socket() call by
3106 its equality to -1 not by it being negative.
3107 * remote-utils.c (remote_open): Likewise.
3108
d23b6cb1
PA
31092010-05-23 Pedro Alves <pedro@codesourcery.com>
3110
3111 * config.h: Regenerate.
3112
28d3cf85
MK
31132010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
3114
3115 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
3116 doesn't provide PTRACE_GET_THREAD_AREA.
3117
fea36a59
MK
31182010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
3119
3120 * linux-m68k-low.c: Include <asm/ptrace.h>
3121 (ps_get_thread_area): Implement.
3122
24b066ba
DE
31232010-05-03 Doug Evans <dje@google.com>
3124
3125 * event-loop.c (struct callback_event): New struct.
3126 (callback_list): New global.
3127 (append_callback_event, delete_callback_event): New functions.
3128 (process_callback): New function.
3129 (start_event_loop): Call it.
3130 * remote-utils.c (NOT_SCHEDULED): Define.
3131 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
3132 moved out of readchar.
3133 (readchar): Rewrite. Call reschedule before returning.
3134 (reset_readchar): New function.
3135 (remote_close): Call it.
3136 (process_remaining, reschedule): New functions.
3137 * server.h (callback_handler_func): New typedef.
3138 (append_callback_event, delete_callback_event): Declare.
3139
9836d6ea
PA
31402010-05-03 Pedro Alves <pedro@codesourcery.com>
3141
3142 * proc-service.c (ps_pglobal_lookup): Use
3143 thread_db_look_up_one_symbol.
3144 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
3145 parameter. Use it instead of all_symbols_looked_up.
3146 * server.h (struct process_info) <all_symbols_looked_up>: Delete
3147 field.
3148 (all_symbols_looked_up): Don't declare.
3149 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
3150 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
3151 field.
3152 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
3153 Set all_symbols_looked_up here.
3154 (thread_db_look_up_one_symbol): New.
3155 (thread_db_get_tls_address): Adjust.
3156 (thread_db_load_search, try_thread_db_load_1): Always allocate the
3157 thread_db object on the heap, and tentatively set it in the
3158 process structure.
3159 (thread_db_init): Don't set all_symbols_looked_up here.
3160 * linux-low.h (thread_db_look_up_one_symbol): Declare.
3161
7984d532
PA
31622010-05-03 Pedro Alves <pedro@codesourcery.com>
3163
3164 * linux-low.c (linux_kill, linux_detach): Adjust.
3165 (status_pending_p_callback): Remove redundant statement. Check
3166 for !TARGET_WAITIKIND_IGNORE, instead of
3167 TARGET_WAITKIND_STOPPED.
3168 (handle_tracepoints): Make sure LWP is locked. Adjust.
3169 (linux_wait_for_event_1): Adjust.
3170 (linux_cancel_breakpoints): New.
3171 (unsuspend_one_lwp): New.
3172 (unsuspend_all_lwps): New.
3173 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
3174 (send_sigstop_callback): Change return type to int, add new
3175 `except' parameter and handle it.
3176 (suspend_and_send_sigstop_callback): New.
3177 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
3178 pass them down. If SUSPEND, also increment the lwp's suspend
3179 count.
3180 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
3181 (need_step_over_p): Don't consider suspended LWPs.
3182 (start_step_over): Adjust.
3183 (proceed_one_lwp): Change return type to int, add new `except'
3184 parameter and handle it.
3185 (unsuspend_and_proceed_one_lwp): New.
3186 (proceed_all_lwps): Use find_inferior instead of
3187 for_each_inferior.
3188 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
3189 also decrement the suspend count of LWPs. Pass `except' down,
3190 instead of hacking its suspend count.
3191 (linux_pause_all): Add `freeze' parameter. Adjust.
3192 (linux_unpause_all): New.
3193 (linux_target_ops): Install linux_unpause_all.
3194 * server.c (handle_status): Adjust.
3195 * target.h (struct target_ops): New fields `unpause_all' and
3196 `cancel_breakpoints'. Add new parameter to `pause_all'.
3197 (pause_all): Add new `freeze' parameter.
3198 (unpause_all): New.
3199 (cancel_breakpoints): New.
3200 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
3201 cancel breakpoints.
3202 (cmd_qtstart): Pause threads.
3203 (stop_tracing): Pause threads, and cancel breakpoints.
3204 * win32-low.c (win32_target_ops): Adjust.
3205
e471f25b
PA
32062010-05-03 Pedro Alves <pedro@codesourcery.com>
3207
3208 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
3209 the inferior right away from here...
3210 (linux_wait_1): ... to here, and adjust to check the thread's
3211 last_resume_kind instead of the lwp's step or stop_expected flags.
3212
1915ef4f
PA
32132010-05-02 Pedro Alves <pedro@codesourcery.com>
3214
3215 * README: Use consistent `GDB' and `GDBserver' spellings.
3216
f9e39928
PA
32172010-05-02 Pedro Alves <pedro@codesourcery.com>
3218
3219 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
3220 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
3221 (linux_detach_one_lwp): Assume the lwp is stopped.
3222 (any_thread_of): Delete.
3223 (linux_detach): Stop all lwps here. Don't blindly delete all
3224 breakpoints.
3225 (delete_lwp_callback): New.
3226 (linux_mourn): Delete all lwps of the process that is gone.
3227 (linux_wait_1): Don't delete the last lwp of the process here.
3228 * mem-break.h (mark_breakpoints_out): Declare.
3229 * mem-break.c (mark_breakpoints_out): New.
3230 (free_all_breakpoints): Use it.
3231 * server.c (handle_target_event): If the process is gone, mark
3232 breakpoints out.
3233 * thread-db.c (struct thread_db) <create_bp>: New field.
3234 (thread_db_enable_reporting): Fix prototype. Store a thread event
3235 breakpoint reference in the thread_db struct.
3236 (thread_db_load_search): Clear the thread_db object.
3237 (try_thread_db_load_1): Ditto.
3238 (switch_to_process): New.
3239 (disable_thread_event_reporting): Use it.
3240 (remove_thread_event_breakpoints): New.
3241 (thread_db_detach, thread_db_mourn): Use it.
3242
1e7fc18c
PA
32432010-05-01 Pedro Alves <pedro@codesourcery.com>
3244
3245 * linux-low.c (linux_enable_event_reporting): New.
3246 (linux_wait_for_event_1, handle_extended_wait): Use it.
3247
02fc4de7
PA
32482010-04-30 Pedro Alves <pedro@codesourcery.com>
3249
3250 * linux-low.c (linux_kill_one_lwp, linux_kill)
3251 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
3252 (send_sigstop): Take an lwp_info as parameter instead. Queue a
3253 SIGSTOP even if the LWP is stopped.
3254 (send_sigstop_callback): New.
3255 (stop_all_lwps): Use send_sigstop_callback instead.
3256 (linux_resume_one_thread): Adjust.
3257 (proceed_one_lwp): Still proceed an LWP that the client has
3258 requested to stop, if we haven't reported it as stopped yet. Make
3259 sure that LWPs the client want stopped, have a pending SIGSTOP.
3260
bc3b5632
DE
32612010-04-26 Doug Evans <dje@google.com>
3262
ae1ada35
DE
3263 * server.c (handle_general_set): Make static.
3264
bc3b5632
DE
3265 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
3266 Print received char after testing for error/eof instead of before.
3267 (input_interrupt): Tweak comment.
3268
65730243
DE
32692010-04-23 Doug Evans <dje@google.com>
3270
3271 * server.c (start_inferior): Print inferior argv if --debug.
3272
a8ae7dc0
AR
32732010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
3274
3275 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
3276 * nto-x86-low.c: Include server.h
3277
1c07cc19
PM
32782010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
3279
3280 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
3281 be consistent with other sources of this directory.
3282 (init_registers_amd64): Correct name of source file of this function
3283 in the comment.
3284
e0a61e09
PM
32852010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
3286
3287 * configure.srv (x86_64-*-mingw*): New configuration for Windows
3288 64-bit executables.
3289
54709339
PM
32902010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
3291
3292 * win32-i386-low.c: Add 64-bit support.
3293 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
3294 (init_registers_amd64): Declare.
3295 (mappings): Add 64-bit version of array.
3296 (init_windows_x86): New function.
3297 (the_low_target): Change init_arch field to init_windows_x86.
3298
e8f0053d
PM
32992010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
3300
3301 * win32-low.c: Adapt to support also 64-bit architecture.
3302 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
3303 (get_image_name): Use SIZE_T type for local variable `done'.
3304 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
3305 (toolhelp_get_dll_name): Idem.
3306 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
3307 Use uintptr_t typecast to avoid warning.
3308 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
3309 (handle_exception): Use phex_nz to avoid warning.
3310 (win32_wait): Remove unused local variable `process'.
3311
c481e77e
PM
33122010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
3313
3314 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
3315 `amd64-avx.o'.
3316
12ea4b69
PM
33172010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
3318
3319 * configure.ac: Use `ws2_32' library for srv_mingw.
3320 * configure: Regenerate.
3321 * gdbreplay.c: Include winsock2.h instead of winsock.h.
3322 * remote-utils.c: Likewise.
3323
f6d1620c
L
33242010-04-17 H.J. Lu <hongjiu.lu@intel.com>
3325
3326 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
3327 if __x86_64__ is defined.
3328
8e642873
PM
33292010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
3330
3331 * configure: Regenerate.
3332
711e434b
PM
33332010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
3334
3335 * server.c (handle_query): Handle 'qGetTIBAddr' query.
3336 * target.h (target_ops): New get_tib_address field.
3337 * win32-low.h (win32_thread_info): Add thread_local_base field.
3338 * win32-low.c (child_add_thread): Add tlb argument.
3339 Set thread_local_base field to TLB.
3340 (get_child_debug_event): Adapt to child_add_thread change.
3341 (win32_get_tib_address): New function.
3342 (win32_target_ops): Set get_tib_address field to
3343 win32_get_tib_address.
3344 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
3345
505106cd
PA
33462010-04-12 Pedro Alves <pedro@codesourcery.com>
3347
505106cd
PA
3348 * linux-low.c (linux_mourn): Also remove the process.
3349 * server.c (handle_target_event): Don't remove the process here.
3350 * nto-low.c (nto_mourn): New.
3351 (nto_target_ops): Install it.
3352 * spu-low.c (spu_mourn): New.
3353 (spu_target_ops): Install it.
3354 * win32-low.c (win32_mourn): New.
3355 (win32_target_ops): Install it.
3356
e8470a06
PA
33572010-04-12 Pedro Alves <pedro@codesourcery.com>
3358
3359 * server.h (buffer_xml_printf): Remove redundant `;'.
3360
45ba0d02
PA
33612010-04-12 Pedro Alves <pedro@codesourcery.com>
3362
3363 * regcache.c (set_register_cache): Invalidate regcaches before
3364 changing the register cache layout.
3365 (regcache_invalidate_one): Allow a NULL regcache.
3366 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
3367 regcaches before changing the register cache layout or the target
3368 regsets.
3369
59e04013
L
33702010-04-12 H.J. Lu <hongjiu.lu@intel.com>
3371
3372 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
3373 variable warning on Linux/x86-64.
3374
8336d594
PA
33752010-04-11 Pedro Alves <pedro@codesourcery.com>
3376
3377 GDBserver disconnected tracing support.
3378
3379 * linux-low.c (linux_remove_process): Delete.
3380 (add_lwp): Don't set last_resume_kind here.
3381 (linux_kill): Use `mourn'.
3382 (linux_detach): Use `thread_db_detach', and `mourn'.
3383 (linux_mourn): New.
3384 (linux_attach_lwp_1): Adjust comment.
3385 (linux_attach): last_resume_kind moved the thread_info; adjust.
3386 (status_pending_p_callback): Adjust.
3387 (linux_wait_for_event_1): Adjust.
3388 (count_events_callback, select_singlestep_lwp_callback)
3389 (select_event_lwp_callback, cancel_breakpoints_callback)
3390 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
3391 (proceed_one_lwp): Adjust.
3392 (linux_async): Add debug output.
3393 (linux_thread_stopped): New.
3394 (linux_pause_all): New.
3395 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
3396 linux_pause_all.
3397 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
3398 (thread_db_free): Delete declaration.
3399 (thread_db_detach, thread_db_mourn): Declare.
3400 * thread-db.c (thread_db_init): Use thread_db_mourn.
3401 (thread_db_free): Delete, split in two.
3402 (disable_thread_event_reporting): New.
3403 (thread_db_detach): New.
3404 (thread_db_mourn): New.
3405
3406 * server.h (struct thread_info) <last_resume_kind>: New field.
3407 <attached>: Add comment.
3408 <gdb_detached>: New field.
3409 (handler_func): Change return type to int.
3410 (handle_serial_event, handle_target_event): Ditto.
3411 (gdb_connected): Declare.
3412 (tracing): Delete.
3413 (disconnected_tracing): Declare.
3414 (stop_tracing): Declare.
3415
3416 * server.c (handle_query) <qSupported>: Report support for
3417 disconnected tracing.
3418 (queue_stop_reply_callback): Account for running threads.
3419 (gdb_wants_thread_stopped): New.
3420 (gdb_wants_all_threads_stopped): New.
3421 (gdb_reattached_process): New.
3422 (handle_status): Clear the `gdb_detached' flag of all processes.
3423 In all-stop, stop all threads.
3424 (main): Be sure to leave tfind mode. Handle disconnected tracing.
3425 (process_serial_event): If the remote connection breaks, or if an
3426 exit was forced with "monitor exit", force an event loop exit.
3427 Handle disconnected tracing on detach.
3428 (handle_serial_event): Adjust.
3429 (handle_target_event): If GDB isn't connected, forward events back
3430 to the inferior, unless the last process exited, in which case,
3431 exit gdbserver. Adjust interface.
3432
3433 * remote-utils.c (remote_open): Don't block in accept. Instead
3434 register an event loop source on the listen socket file
3435 descriptor. Refactor bits into ...
3436 (listen_desc): ... this new global.
3437 (gdb_connected): ... this new function.
3438 (enable_async_notification): ... this new function.
3439 (handle_accept_event): ... this new function.
3440 (remote_close): Clear remote_desc.
3441
3442 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
3443
3444 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
3445 New fields.
3446 (mourn_inferior): Define.
3447 (target_process_qsupported): Avoid the dangling else problem.
3448 (thread_stopped): Define.
3449 (pause_all): Define.
3450 (target_waitstatus_to_string): Declare.
3451 * target.c (target_waitstatus_to_string): New.
3452
3453 * tracepoint.c (tracing): Make extern.
3454 (disconnected_tracing): New.
3455 (stop_tracing): Make extern. Handle tracing stops due to GDB
3456 disconnecting.
3457 (cmd_qtdisconnected): New.
3458 (cmd_qtstatus): Report disconnected tracing status in trace reply.
3459 (handle_tracepoint_general_set): Handle QTDisconnected.
3460
3461 * event-loop.c (event_handler_func): Change return type to int.
3462 (process_event): Bail out if the event handler wants the event
3463 loop to stop.
3464 (handle_file_event): Ditto.
3465 (start_event_loop): Bail out if the event handler wants the event
3466 loop to stop.
3467
3468 * nto-low.c (nto_target_ops): Adjust.
3469 * spu-low.c (spu_wait): Don't remove the process here.
3470 (spu_target_ops): Adjust.
3471 * win32-low.c (win32_wait): Don't remove the process here.
3472 (win32_target_ops): Adjust.
3473
5d267c4c
PA
34742010-04-11 Pedro Alves <pedro@codesourcery.com>
3475
3476 * regcache.c (realloc_register_cache): Invalidate inferior's
3477 regcache before recreating it.
3478
623ccd72
PA
34792010-04-09 Pedro Alves <pedro@codesourcery.com>
3480
3481 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
3482
219f2f23
PA
34832010-04-09 Stan Shebs <stan@codesourcery.com>
3484 Pedro Alves <pedro@codesourcery.com>
3485
3486 * server.h (LONGEST): New.
3487 (struct thread_info) <while_stepping>: New field.
3488 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
3489 Declare.
3490 (initialize_tracepoint, handle_tracepoint_general_set)
3491 (handle_tracepoint_query, tracepoint_finished_step)
3492 (tracepoint_was_hit, release_while_stepping_state_list):
3493 (current_traceframe): Declare.
3494 * server.c (handle_general_set): Handle tracepoint packets.
3495 (read_memory): New.
3496 (write_memory): New.
3497 (handle_search_memory_1): Use read_memory.
3498 (handle_query): Report support for conditional tracepoints, trace
3499 state variables, and tracepoint sources. Handle tracepoint
3500 queries.
3501 (main): Initialize the tracepoints module.
3502 (process_serial_event): Handle traceframe reads/writes.
3503
3504 * linux-low.c (handle_tracepoints): New.
3505 (linux_wait_1): Call it.
3506 (linux_resume_one_lwp): Handle while-stepping.
3507 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
3508 (linux_target_ops): Install them.
3509 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
3510 New field.
3511 * linux-x86-low.c (x86_supports_tracepoints): New.
3512 (the_low_target). Install it.
3513
3514 * mem-break.h (delete_breakpoint): Declare.
3515 * mem-break.c (delete_breakpoint): Make external.
3516
3517 * target.h (struct target_ops): Add `supports_tracepoints',
3518 `read_pc', and `write_pc' fields.
3519 (target_supports_tracepoints): Define.
3520 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
3521 (phex_nz): New.
3522
3523 * regcache.h (struct regcache) <registers_owned>: New field.
3524 (init_register_cache, regcache_cpy): Declare.
3525 (regcache_read_pc, regcache_write_pc): Declare.
3526 (register_cache_size): Declare.
3527 (supply_regblock): Declare.
3528 * regcache.c (init_register_cache): New.
3529 (new_register_cache): Use it.
3530 (regcache_cpy): New.
3531 (register_cache_size): New.
3532 (supply_regblock): New.
3533 (regcache_read_pc, regcache_write_pc): New.
889bf7c5 3534
219f2f23
PA
3535 * tracepoint.c: New.
3536
3537 * Makefile.in (OBS): Add tracepoint.o.
3538 (tracepoint.o): New rule.
3539
3a13a53b
L
35402010-04-08 H.J. Lu <hongjiu.lu@intel.com>
3541
3542 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
3543 (i386-mmx.o): New.
3544 (i386-mmx.c): Likewise.
3545 (i386-mmx-linux.o): Likewise.
3546 (i386-mmx-linux.c): Likewise.
3547
3548 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
3549 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
3550 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
3551 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
3552
3553 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
3554 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
3555 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
3556
1570b33e
L
35572010-04-07 H.J. Lu <hongjiu.lu@intel.com>
3558
3559 * Makefile.in (clean): Updated.
3560 (i386-avx.o): New.
3561 (i386-avx.c): Likewise.
3562 (i386-avx-linux.o): Likewise.
3563 (i386-avx-linux.c): Likewise.
3564 (amd64-avx.o): Likewise.
3565 (amd64-avx.c): Likewise.
3566 (amd64-avx-linux.o): Likewise.
3567 (amd64-avx-linux.c): Likewise.
3568
3569 * configure.srv (srv_i386_regobj): Add i386-avx.o.
3570 (srv_i386_linux_regobj): Add i386-avx-linux.o.
3571 (srv_amd64_regobj): Add amd64-avx.o.
3572 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
3573 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
3574 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
3575 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
3576 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
3577 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
3578 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
3579
3580 * i387-fp.c: Include "i386-xstate.h".
3581 (i387_xsave): New.
3582 (i387_cache_to_xsave): Likewise.
3583 (i387_xsave_to_cache): Likewise.
3584 (x86_xcr0): Likewise.
3585
3586 * i387-fp.h (i387_cache_to_xsave): Likewise.
3587 (i387_xsave_to_cache): Likewise.
3588 (x86_xcr0): Likewise.
3589
3590 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
3591 * linux-crisv32-low.c (target_regsets): Likewise.
3592 * linux-m68k-low.c (target_regsets): Likewise.
3593 * linux-mips-low.c (target_regsets): Likewise.
3594 * linux-ppc-low.c (target_regsets): Likewise.
3595 * linux-s390-low.c (target_regsets): Likewise.
3596 * linux-sh-low.c (target_regsets): Likewise.
3597 * linux-sparc-low.c (target_regsets): Likewise.
3598 * linux-xtensa-low.c (target_regsets): Likewise.
3599
3600 * linux-low.c: Include <sys/uio.h>.
3601 (regsets_fetch_inferior_registers): Support nt_type.
3602 (regsets_store_inferior_registers): Likewise.
3603 (linux_process_qsupported): New.
3604 (linux_target_ops): Add linux_process_qsupported.
3605
3606 * linux-low.h (regset_info): Add nt_type.
3607 (linux_target_ops): Add process_qsupported.
3608
3609 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
3610 and <sys/uio.h>.
3611 (init_registers_i386_avx_linux): New.
3612 (init_registers_amd64_avx_linux): Likewise.
3613 (xmltarget_i386_linux_no_xml): Likewise.
3614 (xmltarget_amd64_linux_no_xml): Likewise.
3615 (PTRACE_GETREGSET): Likewise.
3616 (PTRACE_SETREGSET): Likewise.
3617 (x86_fill_xstateregset): Likewise.
3618 (x86_store_xstateregset): Likewise.
3619 (use_xml): Likewise.
3620 (x86_linux_update_xmltarget): Likewise.
3621 (x86_linux_process_qsupported): Likewise.
3622 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
3623 (x86_arch_setup): Don't call init_registers_amd64_linux nor
3624 init_registers_i386_linux here. Call
3625 x86_linux_update_xmltarget.
3626 (the_low_target): Add x86_linux_process_qsupported.
3627
3628 * server.c (handle_query): Call target_process_qsupported.
3629
3630 * target.h (target_ops): Add process_qsupported.
3631 (target_process_qsupported): New.
3632
fc7238bb
PA
36332010-04-03 Pedro Alves <pedro@codesourcery.com>
3634
3635 * inferiors.c (add_thread): Set last_status kind to
3636 TARGET_WAITKIND_IGNORE.
3637 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
3638 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
3639 (linux_wait_1): Move `thread' local definition to block that uses
3640 it. Don't NULL initialize `event_child'.
3641 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
3642 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
3643 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
3644
bdabb078
PA
36452010-04-01 Pedro Alves <pedro@codesourcery.com>
3646
3647 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
3648 an extended waitstatus, or by a watchpoint.
3649 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
3650 thread was stepping or has been stopped by a watchpoint.
3651
d3bbe7a0
PA
36522010-04-01 Pedro Alves <pedro@codesourcery.com>
3653
3654 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
3655 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
3656 of another, then delete the previous, and validate all
3657 breakpoints.
3658 (validate_inserted_breakpoint): New.
3659 (delete_disabled_breakpoints): New.
3660 (validate_breakpoints): New.
3661 (check_mem_read): Validate breakpoints before trusting their
3662 shadow. Delete disabled breakpoints.
3663 (check_mem_write): Validate breakpoints before trusting they
3664 should be inserted. Delete disabled breakpoints.
3665 * mem-break.h (validate_breakpoints):
3666 * server.c (handle_query): Validate breakpoints when we see a
3667 qSymbol query.
3668
8b07ae33
PA
36692010-04-01 Pedro Alves <pedro@codesourcery.com>
3670
3671 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
3672 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
3673 if we could tell there's a GDB breakpoint at stop_pc.
3674 (need_step_over_p): Don't do a step over if we find a GDB
3675 breakpoint at the resume PC.
3676
3677 * mem-break.c (struct raw_breakpoint): New.
3678 (enum bkpt_type): New type `gdb_breakpoint'.
3679 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
3680 fields. New field `raw'.
3681 (find_raw_breakpoint_at): New.
3682 (set_raw_breakpoint_at): Handle refcounting. Create a raw
3683 breakpoint instead.
3684 (set_breakpoint_at): Adjust.
3685 (delete_raw_breakpoint): New.
3686 (release_breakpoint): New.
3687 (delete_breakpoint): Rename to...
3688 (delete_breakpoint_1): ... this. Add proc parameter. Use
3689 release_breakpoint. Return ENOENT.
3690 (delete_breakpoint): Reimplement.
3691 (find_breakpoint_at): Delete.
3692 (find_gdb_breakpoint_at): New.
3693 (delete_breakpoint_at): Delete.
3694 (set_gdb_breakpoint_at): New.
3695 (delete_gdb_breakpoint_at): New.
3696 (gdb_breakpoint_here): New.
3697 (set_reinsert_breakpoint): Use release_breakpoint.
3698 (uninsert_breakpoint): Rename to ...
3699 (uninsert_raw_breakpoint): ... this.
3700 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
3701 (reinsert_raw_breakpoint): Change parameter type to
3702 raw_breakpoint.
3703 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
3704 instead.
3705 (check_breakpoints): Adjust. Use release_breakpoint.
3706 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
3707 (breakpoint_inserted_here): Ditto.
3708 (check_mem_read): Adjust to iterate over raw breakpoints instead.
3709 Don't trust the breakpoint's shadow if it is not inserted.
3710 (check_mem_write): Adjust to iterate over raw breakpoints instead.
3711 (delete_all_breakpoints): Adjust.
3712 (free_all_breakpoints): Mark all breakpoints as uninserted, and
3713 use delete_breakpoint_1.
3714
3715 * mem-break.h (breakpoints_supported): Delete declaration.
3716 (set_gdb_breakpoint_at): Declare.
3717 (gdb_breakpoint_here): Declare.
3718 (delete_breakpoint_at): Delete.
3719 (delete_gdb_breakpoint_at): Declare.
3720
3721 * server.h (struct raw_breakpoint): Forward declare.
3722 (struct process_info): New field `raw_breakpoints'.
3723
3724 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
3725 breakpoints.
3726
6bf5e0ba
PA
37272010-03-24 Pedro Alves <pedro@codesourcery.com>
3728
3729 * linux-low.c (status_pending_p_callback): Fix comment.
3730 (linux_wait_for_event_1): Move most of the internal breakpoint
3731 handling from here...
3732 (linux_wait_1): ... to here.
3733 (count_events_callback): New.
3734 (select_singlestep_lwp_callback): New.
3735 (select_event_lwp_callback): New.
3736 (cancel_breakpoints_callback): New.
3737 (select_event_lwp): New.
3738 (linux_wait_1): Simplify internal breakpoint handling. Give equal
3739 priority to all LWPs that have had events that should be reported
3740 to the client. Cancel breakpoints when about to reporting the
3741 event to the client, not while stopping lwps. No longer cancel
3742 finished single-steps here.
3743 (cancel_finished_single_step): Delete.
3744 (cancel_finished_single_steps): Delete.
3745
414a389f
PA
37462010-03-24 Pedro Alves <pedro@codesourcery.com>
3747
3748 * mem-break.c (enum bkpt_type): New.
3749 (struct breakpoint): New field `type'.
3750 (set_breakpoint_at): Change return type to struct breakpoint
3751 pointer. Set type to `other_breakpoint' by default.
3752 (delete_breakpoint): Rewrite, supporting more than one breakpoint
3753 in the breakpoint list.
3754 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
3755 (reinsert_breakpoint): Rename to ...
3756 (reinsert_raw_breakpoint): ... this.
3757 (reinsert_breakpoints_at): Adjust.
3758 * mem-break.h (struct breakpoint): Declare.
3759 (set_breakpoint_at): Change return type to struct breakpoint
3760 pointer.
3761
2280c721
PA
37622010-03-24 Pedro Alves <pedro@codesourcery.com>
3763
3764 * server.c (handle_query): Assign, not compare.
3765
d50171e4
PA
37662010-03-24 Pedro Alves <pedro@codesourcery.com>
3767
3768 Teach linux gdbserver to step-over-breakpoints.
3769
3770 * linux-low.c (can_hardware_single_step): New.
3771 (supports_breakpoints): New.
3772 (handle_extended_wait): If stopping threads, read the stop pc of
3773 the new cloned LWP.
3774 (get_pc): New.
3775 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
3776 low target doesn't support retrieving the PC.
3777 (add_lwp): Set last_resume_kind to resume_continue.
3778 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
3779 (linux_attach): Don't clear stop_expected. Set the lwp's
3780 last_resume_kind to resume_stop.
3781 (linux_detach_one_lwp): Don't check for removed breakpoints.
3782 (check_removed_breakpoint): Delete.
3783 (status_pending_p): Rename to ...
3784 (status_pending_p_callback): ... this. Don't check for removed
3785 breakpoints. Don't consider threads that are stopped from GDB's
3786 perspective.
3787 (linux_wait_for_lwp): Always read the stop_pc here.
3788 (cancel_breakpoint): New.
3789 (step_over_bkpt): New global.
3790 (linux_wait_for_event_1): Implement stepping over breakpoints.
3791 (gdb_wants_lwp_stopped): New.
3792 (gdb_wants_all_stopped): New.
3793 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
3794 single-step traps here. Store the thread's last reported target
3795 wait status.
3796 (send_sigstop): Don't clear stop_expected. Always set it,
3797 instead.
3798 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
3799 (cancel_finished_single_step): New.
3800 (cancel_finished_single_steps): New.
3801 (wait_for_sigstop): Don't cancel finished single-step traps here.
3802 (linux_resume_one_lwp): Don't check for removed breakpoints.
3803 Don't set `step' on non-hardware step archs.
3804 (linux_set_resume_request): Ignore resume_stop requests if already
3805 stopping or stopped. Set the lwp's last_resume_kind.
3806 (resume_status_pending_p): Don't check for removed breakpoints.
3807 (need_step_over_p): New.
3808 (start_step_over): New.
3809 (finish_step_over): New.
3810 (linux_resume_one_thread): Always queue a sigstop for resume_stop
3811 requests. Clear the thread's last reported target waitstatus.
3812 Don't use the `suspended' flag. Don't consider pending breakpoints.
3813 (linux_resume): Start a step-over if necessary.
3814 (proceed_one_lwp): New.
3815 (proceed_all_lwps): New.
3816 (unstop_all_lwps): New.
3817 * linux-low.h (struct lwp_info): Rewrite comment for the
3818 `suspended' flag. Add the `stop_pc' field. Delete the
3819 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
3820 Add `'last_resume_kind' and `need_step_over' fields.
3821 * inferiors.c (struct thread_info): Delete, moved elsewhere.
3822 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
3823 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
3824 (set_raw_breakpoint_at): New.
3825 (set_breakpoint_at): Rewrite to use it.
3826 (reinsert_breakpoint_handler): Delete.
3827 (set_reinsert_breakpoint): New.
3828 (reinsert_breakpoint_by_bp): Delete.
3829 (delete_reinsert_breakpoints): New.
3830 (uninsert_breakpoint): Rewrite.
3831 (uninsert_breakpoints_at): New.
3832 (reinsert_breakpoint): Rewrite.
3833 (reinsert_breakpoints_at): New.
3834 (check_breakpoints): Rewrite.
3835 (breakpoint_here): New.
3836 (breakpoint_inserted_here): New.
3837 (check_mem_read): Adjust.
3838 * mem-break.h (breakpoints_supported, breakpoint_here)
3839 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
3840 (reinsert_breakpoint_by_bp): Delete declaration.
3841 (delete_reinsert_breakpoints): Declare.
3842 (reinsert_breakpoint): Delete declaration.
3843 (reinsert_breakpoints_at): Declare.
3844 (uninsert_breakpoint): Delete declaration.
3845 (uninsert_breakpoints_at): Declare.
3846 (check_breakpoints): Adjust prototype.
3847 * server.h: Adjust include order.
3848 (struct thread_info): Declare here. Add a `last_status' field.
3849
30ba68cb
MS
38502010-03-23 Michael Snyder <msnyder@vmware.com>
3851
3852 * server.c (crc32): New function.
3853 (handle_query): Add handling for 'qCRC:' request.
3854
b9a881c2
PA
38552010-03-23 Pedro Alves <pedro@codesourcery.com>
3856
3857 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
3858 lwp had been stopped by a watchpoint.
3859
e92d13d5
PA
38602010-03-16 Pedro Alves <pedro@codesourcery.com>
3861
3862 * server.h (internal_error): Declare.
3863 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
3864 * utils.c (internal_error): New function.
3865
64daa791
AS
38662010-03-15 Andreas Schwab <schwab@redhat.com>
3867
3868 * configure.srv: Fix typo setting srv_regobj.
3869
f52cd8cd
PA
38702010-03-15 Pedro Alves <pedro@codesourcery.com>
3871
3872 * linux-low.c (fetch_register): Avoid passing a non string literal
3873 format to `error'.
3874 (usr_store_inferior_registers): Ditto.
3875
93ae6fdc
PA
38762010-03-14 Pedro Alves <pedro@codesourcery.com>
3877
3878 * linux-low.c (linux_write_memory): Bail out early if peeking
3879 memory failed.
3880
c3adc08c
PA
38812010-03-14 Pedro Alves <pedro@codesourcery.com>
3882
3883 * linux-low.h (struct lwp_info): New fields
3884 `stopped_by_watchpoint' and `stopped_data_address'.
3885 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
3886 here, and cache them in the lwp object.
3887 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
3888 directly.
3889 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
3890 field.
3891 (linux_stopped_by_watchpoint): Rewrite.
3892 (linux_stopped_data_address): Rewrite.
3893
bce522a2
PA
38942010-03-06 Simo Melenius <simo.melenius@iki.fi>
3895
3896 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
3897 switching the current inferior, not before.
3898
90884b2b
L
38992010-03-01 H.J. Lu <hongjiu.lu@intel.com>
3900
3901 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
3902 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
3903 i386-linux.c and amd64-linux.c.
3904 (reg-i386.o): Removed.
3905 (reg-i386.c): Likewise.
3906 (reg-i386-linux.o): Likewise.
3907 (reg-i386-linux.c): Likewise.
3908 (reg-x86-64.o): Likewise.
3909 (reg-x86-64.c): Likewise.
3910 (reg-x86-64-linux.o): Likewise.
3911 (reg-x86-64-linux.c): Likewise.
3912 (i386.o): New.
3913 (i386.c): Likewise.
3914 (i386-linux.o): Likewise.
3915 (i386-linux.c): Likewise.
3916 (amd64.o): Likewise.
3917 (amd64.c): Likewise.
3918 (amd64-linux.o): Likewise.
3919 (amd64-linux.c): Likewise.
3920
3921 * configure.srv (srv_i386_regobj): New.
3922 (srv_i386_linux_regobj): Likewise.
3923 (srv_amd64_regobj): Likewise.
3924 (srv_amd64_linux_regobj): Likewise.
3925 (srv_i386_32bit_xmlfiles): Likewise.
3926 (srv_i386_64bit_xmlfiles): Likewise.
3927 (srv_i386_xmlfiles): Likewise.
3928 (srv_amd64_xmlfiles): Likewise.
3929 (srv_i386_linux_xmlfiles): Likewise.
3930 (srv_amd64_linux_xmlfiles): Likewise.
3931 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
3932 srv_xmlfiles to $srv_i386_xmlfiles.
3933 (i[34567]86-*-mingw32ce*): Likewise.
3934 (i[34567]86-*-mingw*): Likewise.
3935 (i[34567]86-*-nto*): Likewise.
3936 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
3937 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
3938 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
3939 (x86_64-*-linux*): Likewise.
3940
3941 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
3942 (init_registers_amd64_linux): New.
3943 (x86_arch_setup): Replace init_registers_x86_64_linux with
3944 init_registers_amd64_linux.
3945
193f13e6
MK
39462010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
3947
3948 * configure.ac: Check for libdl. If it is not available link against
3949 static libthread_db.
3950 * configure: Regenerate.
3951
85d721b8
PA
39522010-02-22 Pedro Alves <pedro@codesourcery.com>
3953
3954 PR9605
3955
3956 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
3957 handing a read watchpoint.
3958 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
3959
6076632b
DE
39602010-02-12 Doug Evans <dje@google.com>
3961
3962 * linux-low.c (linux_supports_tracefork_flag): Document.
3963 (linux_look_up_symbols): Add comment.
3964
3327ccf7
L
39652010-02-03 H.J. Lu <hongjiu.lu@intel.com>
3966
3967 * regcache.c (supply_register): Clear regcache if buf is NULL.
3968
0718675c 39692010-02-02 Nicolas Roche <roche@sourceware.org>
3327ccf7 3970 Joel Brobecker <brobecker@adacore.com>
0718675c
JB
3971
3972 * inferiors.c (find_inferior): Add function documentation.
3973 (unloaded_dll): Handle the case where the unloaded dll has not
3974 been previously registered in the dll list.
3975
177321bd
DJ
39762010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
3977
3978 * linux-arm-low.c (thumb_breakpoint_len): Delete.
3979 (thumb2_breakpoint): New.
3980 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
3981
2b009048
DJ
39822010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
3983
3984 * linux-low.c (get_stop_pc): Check for SIGTRAP.
3985 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
3986 breakpoints.
3987
3be029c7
PA
39882010-01-21 Pedro Alves <pedro@codesourcery.com>
3989
3990 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
3991
18f5de3b
JK
39922010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
3993
3994 * linux-s390-low.c (s390_collect_ptrace_register)
3995 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
3996
3743bb4f
DE
39972010-01-21 Doug Evans <dje@google.com>
3998
14ce3065
DE
3999 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
4000 (PTRACE_ARG4_TYPE): New macro.
4001 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
4002 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
4003 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
4004 (usr_store_inferior_registers): Ditto.
4005 (linux_read_memory, linux_write_memory): Ditto.
4006 (linux_test_for_tracefork): Ditto.
4007
3743bb4f
DE
4008 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
4009 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
4010
8b315be5
PA
40112010-01-21 Pedro Alves <pedro@codesourcery.com>
4012
4013 * proc-service.c (ps_lgetregs): Don't refetch registers from the
4014 target.
4015
85492558
PA
40162010-01-21 Pedro Alves <pedro@codesourcery.com>
4017
4018 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
4019 prototype to take a regcache. Adjust.
4020
442ea881
PA
40212010-01-20 Pedro Alves <pedro@codesourcery.com>
4022
4023 * regcache.h (struct thread_info): Forward declare.
4024 (struct regcache): New.
4025 (new_register_cache): Adjust prototype.
4026 (get_thread_regcache): Declare.
4027 (free_register_cache): Adjust prototype.
4028 (registers_to_string, registers_from_string): Ditto.
4029 (supply_register, supply_register_by_name, collect_register)
4030 (collect_register_as_string, collect_register_by_name): Ditto.
4031 * regcache.c (struct inferior_regcache_data): Delete.
4032 (get_regcache): Rename to ...
4033 (get_thread_regcache): ... this. Adjust. Switch inferior before
4034 fetching registers.
4035 (regcache_invalidate_one): Adjust.
4036 (regcache_invalidate): Fix prototype.
4037 (new_register_cache): Return the new register cache.
4038 (free_register_cache): Change prototype.
4039 (realloc_register_cache): Adjust.
4040 (registers_to_string): Change prototype to take a regcache. Adjust.
4041 (registers_from_string): Ditto.
4042 (register_data): Ditto.
4043 (supply_register): Ditto.
4044 (supply_register_by_name): Ditto.
4045 (collect_register): Ditto.
4046 (collect_register_as_string): Ditto.
4047 (collect_register_by_name): Ditto.
4048 * server.c (process_serial_event): Adjust.
4049 * linux-low.h (regset_fill_func, regset_store_func): Change
4050 prototype.
4051 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
4052 Change prototype.
4053 * linux-low.c (get_stop_pc): Adjust.
4054 (check_removed_breakpoint): Adjust.
4055 (linux_wait_for_event): Adjust.
4056 (linux_resume_one_lwp): Adjust.
4057 (fetch_register): Add regcache parameter. Adjust.
4058 (usr_store_inferior_registers): Ditto.
4059 (regsets_fetch_inferior_registers): Ditto.
4060 (regsets_store_inferior_registers): Ditto.
4061 (linux_fetch_registers, linux_store_registers): Ditto.
4062 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
4063 regcache. Adjust.
43aaf8b6
PA
4064 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
4065 Ditto.
442ea881
PA
4066 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
4067 prototype to take a regcache.
4068 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
4069 * remote-utils.c (convert_ascii_to_int, outreg)
4070 (prepare_resume_reply): Change prototype to take a regcache.
4071 Adjust.
4072 * target.h (struct target_ops) <fetch_registers, store_registers>:
4073 Change prototype to take a regcache.
4074 (fetch_inferior_registers, store_inferior_registers): Change
4075 prototype to take a regcache. Adjust.
4076 * proc-service.c (ps_lgetregs): Adjust.
4077 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
4078 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
4079 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
4080 take a regcache. Adjust.
4081 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
4082 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
4083 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
4084 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
4085 * linux-cris-low.c (cris_get_pc, cris_set_pc)
4086 (cris_cannot_fetch_register):
4087 (cris_breakpoint_at): Change prototype to take a regcache.
4088 Adjust.
4089 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
4090 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
4091 to take a regcache. Adjust.
4092 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
4093 Adjust.
4094 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
4095 take a regcache. Adjust.
4096 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
4097 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
4098 (m68k_set_pc): Change prototype to take a regcache. Adjust.
4099 * linux-mips-low.c (mips_get_pc):
4100 (mips_set_pc): Change prototype to take a regcache. Adjust.
4101 (mips_reinsert_addr): Adjust.
4102 (mips_collect_register): Change prototype to take a regcache.
4103 Adjust.
4104 (mips_supply_register):
4105 (mips_collect_register_32bit, mips_supply_register_32bit)
4106 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
4107 (mips_store_fpregset): Ditto.
43aaf8b6
PA
4108 * linux-ppc-low.c (ppc_supply_ptrace_register)
4109 (ppc_supply_ptrace_register): Ditto.
442ea881
PA
4110 (parse_spufs_run): Adjust.
4111 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
4112 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
4113 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
4114 take a regcache. Adjust.
4115 * linux-s390-low.c (s390_collect_ptrace_register)
4116 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
4117 (s390_set_pc): Change prototype to take a regcache. Adjust.
4118 (s390_arch_setup): Adjust.
4119 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
4120 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
4121 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
4122 (sparc_fill_gregset, sparc_store_gregset_from_stack)
4123 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
4124 regcache. Adjust.
4125 (sparc_breakpoint_at): Adjust.
4126 * linux-xtensa-low.c (xtensa_fill_gregset):
4127 (xtensa_store_gregset):
4128 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
4129 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
4130 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
4131 prototype to take a regcache. Adjust.
4132 * win32-arm-low.c (arm_fetch_inferior_register)
4133 (arm_store_inferior_register): Change prototype to take a
4134 regcache. Adjust.
4135 * win32-i386-low.c (i386_fetch_inferior_register)
4136 (i386_store_inferior_register): Change prototype to take a
4137 regcache. Adjust.
4138 * win32-low.c (child_fetch_inferior_registers)
4139 (child_store_inferior_registers): Change prototype to take a
4140 regcache. Adjust.
4141 (win32_wait): Adjust.
4142 (win32_fetch_inferior_registers): Change prototype to take a
4143 regcache. Adjust.
4144 (win32_store_inferior_registers): Adjust.
4145 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
4146 store_inferior_register>: Change prototype to take a regcache.
4147
60c3d7b0
DE
41482010-01-20 Doug Evans <dje@google.com>
4149
4150 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
4151 #ifdef.
4152 (linux_wait_for_event1, linux_init_signals): Ditto.
ec8ebe72 4153 (W_STOPCODE): Provide definition if missing.
60c3d7b0 4154
dc146f7c
VP
41552010-01-13 Vladimir Prus <vladimir@codesourcery.com>
4156
4157 * linux-low.c (linux_core_of_thread): New.
4158 (compare_ints, show_process, list_threads): New.
4159 (linux_qxfer_osdata): Report threads and cores.
4160 (linux_target_op): Register linux_core_of_thread.
4161 * remote-utils.c (prepare_resume_reply): Report the core.
4162 (buffer_xml_printf): Support %d specifier.
4163 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
4164 New.
4165 (handle_query): Handle qXfer:threads. Announce availability
4166 thereof.
4167 * target.h (struct target_ops): New field core_of_thread.
4168
7803799a
UW
41692010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
4170
4171 * Makefile.in (clean): Remove new generated files.
4172 (reg-s390.o, reg-s390.c): Remove rules.
4173 (reg-s390x.o, reg-s390x.c): Likewise.
4174 (s390-linux32.o, s390-linux32.c): Add rules.
4175 (s390-linux64.o, s390-linux64.c): Likewise.
4176 (s390x-linux64.o, s390x-linux64.c): Likewise.
4177 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
4178 * linux-s390-low.c: Include <elf.h>.
4179 (HWCAP_S390_HIGH_GPRS): Define if undefined.
4180 (init_registers_s390): Remove prototype.
4181 (init_registers_s390x): Likewise.
4182 (init_registers_s390_linux32): Add prototype.
4183 (init_registers_s390_linux64): Likewise.
4184 (init_registers_s390x_linux64): Likewise.
4185 (s390_num_regs_3264): New define.
4186 (s390_regmap_3264): New global variable.
4187 (s390_cannot_fetch_register): Remove obsolete check.
4188 (s390_cannot_store_register): Likewise.
4189 (s390_collect_ptrace_register): Handle upper/lower register halves.
4190 (s390_supply_ptrace_register): Likewise.
4191 (s390_fill_gregset): Update to register number changes.
4192 (s390_get_hwcap): New routine.
4193 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
4194 Install appropriate regmap and register set.
4195
6e7ffa39
JB
41962010-01-01 Joel Brobecker <brobecker@adacore.com>
4197
4198 * server.c (gdbserver_version): Update copyright year to 2010.
4199 * gdbreplay.c (gdbreplay_version): Likewise.
4200
957f3f49
DE
42012009-12-28 Doug Evans <dje@google.com>
4202
4203 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
4204 elf/external.h. Include <elf.h> instead but only if necessary.
4205
ca5c370d
PA
42062009-12-28 Pedro Alves <pedro@codesourcery.com>
4207
4208 * linux-low.c (linux_remove_process): Remove `detaching'
4209 parameter. Don't release/detach from thread_db here.
4210 (linux_kill): Release/detach from thread_db here, ...
4211 (linux_detach): ... and here, before actually detaching.
4212 (linux_wait_1): ... and here, when a process exits.
4213 * thread-db.c (any_thread_of): New.
4214 (thread_db_free): Switch the current inferior to a thread of the
4215 passed in process.
4216
4ee62156
DE
42172009-12-21 Doug Evans <dje@google.com>
4218
d90e6a88
DE
4219 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
4220
c5f62d5f
DE
4221 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
4222 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
4223 warning ifndef __NR_tkill. Move setting of errno there too.
4224 Delete unnecessary resetting of errno after syscall.
4225 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
4226
10e86dd7
DE
4227 * configure.ac: Check for dladdr.
4228 * config.in: Regenerate.
4229 * configure: Regenerate.
4230 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
4231 (try_thread_db_load): Update.
4232
4ee62156
DE
4233 * linux-low.c (my_waitpid): Delete unnecessary prototype.
4234
00f515da
DE
42352009-12-18 Doug Evans <dje@google.com>
4236
e9464885
DE
4237 * event-loop.c: Include unistd.h if it exists.
4238
07d4f67e
DE
4239 * linux-low.c (my_waitpid): Move definition away from being in
4240 between linux_tracefork_child/linux_test_for_tracefork.
4241
00f515da
DE
4242 * gdb_proc_service.h (psaddr_t): Fix type.
4243 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
4244 signature to match glibc.
4245
1de1badb
DE
42462009-12-16 Doug Evans <dje@google.com>
4247
4248 * linux-low.c (linux_read_memory): Fix argument to read.
4249
aeeb81d1
PA
42502009-11-26 Pedro Alves <pedro@codesourcery.com>
4251
4252 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
4253 events, don't leave current_inferior pointing at null.
4254
10357975
PA
42552009-11-26 Pedro Alves <pedro@codesourcery.com>
4256
4257 * win32-low.c (LOG): Delete.
4258 (OUTMSG): Output to stderr.
4259 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
4260 on compile time LOG macro.
4261 (win32_wait): Fix debug output.
4262
cf6e3471
PA
42632009-11-26 Pedro Alves <pedro@codesourcery.com>
4264
4265 * win32-low.c (win32_add_one_solib): If the dll name is
4266 "ntdll.dll", prepend the system directory to the dll path.
4267
0c85e18e
MK
42682009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
4269
4270 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
4271
9ac544ce 42722009-11-17 Nathan Sidwell <nathan@codesourcery.com>
889bf7c5 4273 Vladimir Prus <vladimir@codesourcery.com>
9ac544ce
MK
4274
4275 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
4276 * configure.ac: Check for __mcoldfire__ and set
4277 gdb_cv_m68k_is_coldfire.
4278 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
4279 reg-cf.o and reg-m68k.o.
4280 * configure: Regenerated.
4281
fd7dd3e6
PA
42822009-11-16 Pedro Alves <pedro@codesourcery.com>
4283
4284 * linux-low.c (linux_remove_process): Add `detaching' parameter.
4285 Pass it to thread_db_free.
4286 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
4287 proper `detaching' argument to linux_remove_process.
4288 * linux-low.h (thread_db_free): Add `detaching' parameter.
4289 * thread-db.c (thread_db_init): Pass false as `detaching' argument
4290 to thread_db_free.
4291 (thread_db_free): Add `detaching' parameter. Only
4292 call td_ta_clear_event if detaching from process.
4293
75aa492e
MK
42942009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
4295
4296 * thread-db.c (thread_db_free): Fix typo.
4297
21e1bee4
PP
42982009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
4299
4300 PR gdb/10838
4301 * thread-db.c (thread_db_free): Call td_ta_clear_event.
4302
8838b45e
NS
43032009-11-03 Nathan Sidwell <nathan@codesourcery.com>
4304
4305 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
4306 with an i686 compiler.
4307 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
4308 needed.
4309 * configure: Rebuilt.
4310
8a35fb51
SL
43112009-10-29 Sandra Loosemore <sandra@codesourcery.com>
4312
4313 PR gdb/10783
4314
4315 * server.c (handle_search_memory_1): Correct read_addr initialization
4316 in loop for searching subsequent chunks.
4317
96f15937
PP
43182009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
4319
4320 * configure.ac: New --with-libthread-db option.
4321 * thread-db.c: Allow direct dependence on libthread_db.
4322 (thread_db_free): Adjust.
4323 * config.in: Regenerate.
4324 * configure: Likewise.
889bf7c5 4325
5f7d1694
PP
43262009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
4327
4328 PR gdb/10757
4329 * thread-db.c (attach_thread): New function.
4330 (maybe_attach_thread): Return success/failure.
4331 (find_new_threads_callback): Adjust.
889bf7c5
PA
4332 (thread_db_find_new_threads): Loop until no new threads.
4333
88e3b899
PA
43342009-10-13 Pedro Alves <pedro@codesourcery.com>
4335
4336 * proc-service.c (ps_lgetregs): Formatting.
4337
cdbfd419
PP
43382009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
4339
4340 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
4341 * configure.ac: Adjust.
4342 * linux-low.h (struct process_info_private): Move members to struct
4343 thread_db.
4344 (thread_db_free, thread_db_handle_monitor_command): New prototype.
4345 * linux-low.c (linux_remove_process): Adjust.
4346 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
4347 * server.c (handle_query): Move code ...
4348 (handle_monitor_command): ... here. New function.
4349 * target.h (struct target_ops): New member.
4350 * thread-db.c (struct thread_db): New.
4351 (libthread_db_search_path): New variable.
4352 (thread_db_create_event, thread_db_enable_reporting)
4353 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
4354 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
4355 (try_thread_db_load_1, dladdr_to_soname): New functions.
4356 (try_thread_db_load, thread_db_load_search): New functions.
4357 (thread_db_init): Search for libthread_db.
4358 (thread_db_free): New function.
4359 (thread_db_handle_monitor_command): Likewise.
4360 * config.in: Regenerate.
4361 * configure: Regenerate.
889bf7c5 4362
4168d2d6
UW
43632009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
4364
4365 * spu-low.c (spu_kill): Wait for inferior to terminate.
4366 Call clear_inferiors.
4367 (spu_detach): Call clear_inferiors.
4368
81ecdfbb
RW
43692009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
4370
4371 * aclocal.m4: Regenerate.
4372 * config.in: Likewise.
4373 * configure: Likewise.
4374
0b9ff2c0
UW
43752009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
4376
4377 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
4378 (parse_spufs_run): New function.
4379 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
4380 (ppc_breakpoint_at): Handle SPU breakpoints.
4381
efcbbd14
UW
43822009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
4383
4384 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
4385 (SPUFS_MAGIC): Define.
4386 (spu_enumerate_spu_ids): New function.
4387 (linux_qxfer_spu): New function.
4388 (linux_target_ops): Install linux_qxfer_spu.
4389
f4d9bade
UW
43902009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
4391
4392 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
4393 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
4394 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
4395 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
4396 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
4397 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
4398 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
4399 (init_registers_powerpc_cell32l): Add prototype.
4400 (init_registers_powerpc_cell64l): Likewise.
4401 (ppc_arch_setup): Detect Cell/B.E. architecture.
4402
96e946ca
RW
44032009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
4404
4405 * Makefile.in (datarootdir): New variable.
4406
58d6951d
DJ
44072009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
4408
4409 * linux-low.c (linux_write_memory): Update debugging output.
4410 * Makefile.in (clean): Add new descriptions.
4411 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
4412 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
4413 * configure.srv: Add new files for arm*-*-linux*.
4414 * linux-arm-low.c: Add new declarations.
4415 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
4416 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
4417 (HWCAP_VFPv3D16): New.
4418 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
4419 instead of __IWMMXT__.
4420 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
4421 (arm_arch_setup): New.
4422 (target_regsets): Remove #ifdef. Add VFP regset.
4423 (the_low_target): Use arm_arch_setup.
4424
12b42a12
DJ
44252009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
4426
4427 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
4428 the main thread again.
4429
ac8c974e
AR
44302009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
4431
4432 Adding Neutrino gdbserver.
4433 * configure: Regenerated.
4434 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
4435 * configure.srv (i[34567]86-*-nto*): New target.
4436 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
4437 * remote-utils.c [__QNX__]: Include sys/iomgr.h
4438 (nto_comctrl) [__QNX__]: New function.
4439 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
4440
4424e0c3 44412009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7437790a
PA
4442
4443 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
4444 srv_tgtobj.
4445
912cf4ba
PA
44462009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
4447 Pedro Alves <pedro@codesourcery.com>
4448
4449 * win32-i386-low.c (i386_get_thread_context): Handle systems that
4450 don't support CONTEXT_EXTENDED_REGISTERS.
4451 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
4452 (the_low_target): Install them.
4453 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
4454 failing with ERROR_PIPE_NOT_CONNECTED.
4455
aa5ca48f
DE
44562009-06-30 Doug Evans <dje@google.com>
4457 Pierre Muller <muller@ics.u-strasbg.fr>
4458
4459 Add h/w watchpoint support to x86-linux, win32-i386.
4460 * Makefile.in (SFILES): Add i386-low.c
4461 (i386_low_h): Define.
4462 (i386-low.o): Add dependencies.
4463 (linux-x86-low.o): Add i386-low.h dependency.
4464 (win32-i386-low.o): Ditto.
4465 * i386-low.c: New file.
4466 * i386-low.h: New file.
4467 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
4468 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
4469 * linux-low.c (linux_add_process): Initialize arch_private.
4470 (linux_remove_process): Free arch_private.
4471 (add_lwp): Initialize arch_private.
4472 (delete_lwp): Free arch_private.
4473 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
4474 provided.
4475 * linux-low.h (process_info_private): New member arch_private.
4476 (lwp_info): New member arch_private.
4477 (linux_target_ops): New members new_process, new_thread,
4478 prepare_to_resume.
4479 (ptid_of): New macro.
4480 * linux-x86-low.c: Include stddef.h, i386-low.h.
4481 (arch_process_info): New struct.
4482 (arch_lwp_info): New struct.
4483 (x86_linux_dr_get, x86_linux_dr_set): New functions.
4484 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
4485 (i386_dr_low_get_status): New function.
4486 (x86_insert_point, x86_remove_point): New functions.
4487 (x86_stopped_by_watchpoint): New function.
4488 (x86_stopped_data_address): New function.
4489 (x86_linux_new_process, x86_linux_new_thread): New functions.
4490 (x86_linux_prepare_to_resume): New function.
4491 (the_low_target): Add entries for insert_point, remove_point,
4492 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
4493 prepare_to_resume.
4494 * server.c (debug_hw_points): New global.
4495 (monitor_show_help): Document set debug-hw-points.
4496 (handle_query): Process "set debug-hw-points".
4497 * server.h (debug_hw_points): Declare.
4498 (paddress): Declare.
4499 * utils.c (NUMCELLS, CELLSIZE): New macros.
4500 (get_sell, xsnprintf, paddress): New functions.
4501 * win32-arm-low.c (the_low_target): Add entries for insert_point,
4502 remove_point, stopped_by_watchpoint, stopped_data_address.
4503 * win32-i386-low.c: Include i386-low.h.
4504 (debug_reg_state): Replaces dr.
4505 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
4506 (i386_dr_low_get_status): New function.
4507 (i386_insert_point, i386_remove_point): New functions.
4508 (i386_stopped_by_watchpoint): New function.
4509 (i386_stopped_data_address): New function.
4510 (i386_initial_stuff): Update.
4511 (get_thread_context,set_thread_context,i386_thread_added): Update.
4512 (the_low_target): Add entries for insert_point,
4513 remove_point, stopped_by_watchpoint, stopped_data_address.
4514 * win32-low.c (win32_insert_watchpoint): New function.
4515 (win32_remove_watchpoint): New function.
4516 (win32_stopped_by_watchpoint): New function.
4517 (win32_stopped_data_address): New function.
4518 (win32_target_ops): Add entries for insert_watchpoint,
4519 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
4520 * win32-low.h (win32_target_ops): New members insert_point,
4521 remove_point, stopped_by_watchpoint, stopped_data_address.
4522
d993e290
PA
45232009-06-25 Pedro Alves <pedro@codesourcery.com>
4524
4525 * server.c (process_serial_event): Re-return unsupported, not
4526 error, if the type isn't recognized. Re-allow supporting only
4527 insert or remove packets. Also call require_running for
4528 breakpoints. Add missing break statement to default case. Tidy.
4529 * target.h (struct target_ops): Rename insert_watchpoint to
4530 insert_point, and remove_watchpoint to remove_point.
4531
4532 * linux-low.h (struct linux_target_ops): Likewise.
4533 * linux-low.c (linux_insert_watchpoint): Rename to ...
4534 (linux_insert_point): ... this. Adjust.
4535 (linux_remove_watchpoint): Rename to ...
4536 (linux_remove_point): ... this. Adjust.
4537 (linux_target_ops): Adjust.
4538 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
4539 (cris_insert_point): ... this.
4540 (cris_remove_watchpoint): Rename to ...
4541 (cris_remove_point): ... this.
4542 (the_low_target): Adjust.
4543
0f54c268
PM
45442009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
4545
4546 * server.c (handle_v_kill): Pass signal_pid to
4547 kill_inferior if multi_process is zero.
4548
c6314022
AR
45492009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
4550
4551 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
4552 * target.h (target_ops): Comment for *_watchpoint to make it clear
4553 the functions can get types '0' and '1'.
4554
4463ce24
AR
45552009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
4556
4557 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
4558 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
4559 * regcache.c (get_regcache): Likewise.
4560 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
4561 * win32-low.c (child_fetch_inferior_registers): Remove check for
4562 regno 0.
4563
cf8fd78b
PA
45642009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
4565 Pedro Alves <pedro@codesourcery.com>
4566
4567 * target.h (struct target_ops) <supports_multi_process>: New
4568 callback.
4569 (target_supports_multi_process): New.
4570 * server.c (handle_query): Even if GDB reports support, only
4571 enable multi-process if the target also supports it. Report
4572 multi-process support only if the target backend supports it.
4573 * linux-low.c (linux_supports_multi_process): New function.
4574 (linux_target_ops): Install it as target_supports_multi_process
4575 callback.
4576
47c0c975
DE
45772009-05-24 Doug Evans <dje@google.com>
4578
e09875d4
DE
4579 Global renaming of find_thread_pid to find_thread_ptid.
4580 * server.h (find_thread_ptid): Renamed from find_thread_pid.
4581 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
4582 All callers updated.
4583
e27d73f6
DE
4584 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
4585 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
4586 directly.
4587
47c0c975
DE
4588 * linux-low.c (get_stop_pc): Print pc if debug_threads.
4589 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
4590 (linux_resume_one_lwp): Ditto.
4591
2acc282a
DE
45922009-05-23 Doug Evans <dje@google.com>
4593
4594 * linux-low.c (linux_resume_one_lwp): Change type of first arg
4595 from struct inferior_list_entry * to struct lwp_info *.
4596 All callers updated.
4597
9f1036c1
DE
45982009-05-13 Doug Evans <dje@google.com>
4599
4600 * linux-x86-low.c: Don't include assert.h.
4601 (x86_siginfo_fixup): Use fatal, not assert.
4602 (x86_arch_setup): Fix comment.
4603
d0722149
DE
46042009-05-12 Doug Evans <dje@google.com>
4605
4606 Biarch support for i386/amd64 gdbserver.
4607 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
4608 Add linux-x86-low.c.
4609 (linux-i386-low.o, linux-x86-64-low.o): Delete.
4610 (linux-x86-low.o): Add.
4611 * linux-x86-64-low.c: Delete.
4612 * linux-i386-low.c: Delete.
4613 * linux-x86-low.c: New file.
4614 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
4615 linux-x86-low.o.
4616 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
4617 linux-x86-low.o.
4618 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
4619 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
4620 (linux_child_pid_to_exec_file): New function.
4621 (elf_64_header_p, elf_64_file_p): New functions.
4622 (siginfo_fixup): New function.
4623 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
4624 give target a chance to convert layout.
4625 * linux-low.h (linux_target_ops): New member siginfo_fixup.
4626 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
4627
fdeb2a12
DE
46282009-05-07 Doug Evans <dje@google.com>
4629
4630 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
4631 (regsets_store_inferior_registers): Ditto.
4632
a6dbe5df
PA
46332009-05-06 Pedro Alves <pedro@codesourcery.com>
4634
4635 PR server/10048
4636
4637 * linux-low.c (must_set_ptrace_flags): Delete.
4638 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
4639 of the global.
4640 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
4641 `lwp->must_set_ptrace_flags' instead.
ba42693b 4642 (linux_wait_for_event_1): Set ptrace options here.
a6dbe5df
PA
4643 (linux_wait_1): ... not here.
4644
5091eb23
DE
46452009-04-30 Doug Evans <dje@google.com>
4646
9f767825
DE
4647 * inferiors.c (started_inferior_callback): New function.
4648 (attached_inferior_callback): New function.
4649 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
4650 * server.c (print_started_pid, print_attached_pid): New functions.
4651 (detach_or_kill_for_exit): New function.
4652 (main): Call it instead of for_each_inferior (kill_inferior_callback).
4653 * server.h (have_started_inferiors_p): Declare.
4654 (have_attached_inferiors_p): Declare.
4655
5091eb23
DE
4656 * inferiors.c (remove_process): Fix memory leak, free process.
4657 * linux-low.c (linux_remove_process): New function.
4658 (linux_kill): Call it instead of remove_process.
4659 (linux_detach, linux_wait_1): Ditto.
4660
155c8968
PA
46612009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
4662
4663 * configure.srv: Add x86 Windows CE target.
4664
7fe519cb
UW
46652009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
4666
4667 * inferiors.c (get_thread_process): Make global.
4668 * server.h (get_thread_process): Add prototype.
4669 * thread-db.c (find_one_thread): Use get_thread_process
4670 instead of current_process.
4671 (thread_db_get_tls_address): Do not crash if called when
4672 thread layer is not yet initialized.
4673
5472f405
UW
46742009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
4675
4676 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
4677 * spu-low.c (current_tid): Rename to ...
4678 (current_ptid): ... this.
4679 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
4680 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
4681 ptid_get_lwp (current_ptid) instead of current_tid.
4682 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
4683 instead of current_tid. Use find_process_pid to verify pid
4684 argument is valid. Pass proper argument to remove_process.
4685 (spu_thread_alive): Compare current_ptid instead of current_tid.
4686 (spu_resume): Likewise.
4687
55ac2b99
PA
46882009-04-02 Pedro Alves <pedro@codesourcery.com>
4689
4690 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
4691 variable.
4692
95954743
PA
46932009-04-01 Pedro Alves <pedro@codesourcery.com>
4694
4695 Implement the multiprocess extensions, and add linux multiprocess
4696 support.
4697
4698 * server.h (ULONGEST): Declare.
4699 (struct ptid, ptid_t): New.
4700 (minus_one_ptid, null_ptid): Declare.
4701 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
4702 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
4703 (struct inferior_list_entry): Change `id' type from unsigned from
4704 to ptid_t.
4705 (struct sym_cache, struct breakpoint, struct
4706 process_info_private): Forward declare.
4707 (struct process_info): Declare.
4708 (current_process): Declare.
4709 (all_processes): Declare.
4710 (initialize_inferiors): Declare.
4711 (add_thread): Adjust to use ptid_t.
4712 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
4713 (add_process, remove_process, find_thread_pid): Declare.
4714 (find_inferior_id): Adjust to use ptid_t.
4715 (cont_thread, general_thread, step_thread): Change type to ptid_t.
4716 (multi_process): Declare.
4717 (push_event): Adjust to use ptid_t.
4718 (read_ptid, write_ptid): Declare.
4719 (prepare_resume_reply): Adjust to use ptid_t.
4720 (clear_symbol_cache): Declare.
4721 * inferiors.c (all_processes): New.
4722 (null_ptid, minus_one_ptid): New.
4723 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
4724 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
4725 (add_thread): Change unsigned long to ptid. Remove gdb_id
4726 parameter. Adjust.
4727 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
4728 (gdb_id_to_thread): Rename to ...
4729 (find_thread_pid): ... this. Change unsigned long to ptid.
4730 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
4731 (loaded_dll, pull_pid_from_list): Adjust.
4732 (add_process, remove_process, find_process_pid)
4733 (get_thread_process, current_process, initialize_inferiors): New.
4734 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
4735 (struct target_waitstatus) <related_pid>: Ditto.
4736 (struct target_ops) <kill, detach>: Add `pid' argument. Change
4737 return type to int.
4738 (struct target_ops) <join>: Add `pid' argument.
4739 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
4740 (struct target_ops) <wait>: Add `ptid' field. Change return type
4741 to ptid.
4742 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
4743 (mywait): Add `ptid' argument. Change return type to ptid_t.
4744 (target_pid_to_str): Declare.
4745 * target.c (set_desired_inferior): Adjust to use ptids.
4746 (mywait): Add new `ptid' argument. Adjust.
4747 (target_pid_to_str): New.
4748 * mem-break.h (free_all_breakpoints): Declare.
4749 * mem-break.c (breakpoints): Delelete.
4750 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
4751 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
4752 to use per-process breakpoint list.
4753 (free_all_breakpoints): New.
4754 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
4755 (symbol_cache, all_symbols_looked_up): Delete.
4756 (hexchars): New.
4757 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
4758 read_ptid): New.
4759 (prepare_resume_reply): Change ptid argument's type from unsigned
4760 long to ptid_t. Adjust. Implement W;process and X;process.
4761 (free_sym_cache, clear_symbol_cache): New.
4762 (look_up_one_symbol): Adjust to per-process symbol cache. *
4763 * server.c (cont_thread, general_thread, step_thread): Change type
4764 to ptid_t.
4765 (attached): Delete.
4766 (multi_process): New.
4767 (last_ptid): Change type to ptid_t.
4768 (struct vstop_notif) <ptid>: Change type to ptid_t.
4769 (queue_stop_reply, push_event): Change `ptid' argument's type to
4770 ptid_t.
4771 (discard_queued_stop_replies): Add `pid' argument.
4772 (start_inferior): Adjust to use ptids. Adjust to mywait interface
4773 changes. Don't reference the `attached' global.
4774 (attach_inferior): Adjust to mywait interface changes.
4775 (handle_query): Adjust to use ptids. Parse GDB's qSupported
4776 features. Handle and report "multiprocess+". Handle
4777 "qAttached:PID".
4778 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
4779 changes.
4780 (handle_v_kill): New.
4781 (handle_v_stopped): Adjust to use target_pid_to_str.
4782 (handle_v_requests): Allow multiple attaches and runs when
4783 multiprocess extensions are in effect. Handle "vKill".
4784 (myresume): Adjust to use ptids.
4785 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
4786 (handle_status): Adjust to discard_queued_stop_replies interface
4787 change.
4788 (first_thread_of, kill_inferior_callback)
4789 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
4790 (main): Call initialize_inferiors. Adjust to use ptids, killing
4791 and detaching from all inferiors. Handle multiprocess packet
4792 variants.
4793 * linux-low.h: Include gdb_proc_service.h.
4794 (struct process_info_private): New.
4795 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
4796 <lwpid_of>: Use ptid_get_lwp.
4797 (get_lwp_thread): Adjust.
4798 (struct lwp_info): Add `dead' member.
4799 (find_lwp_pid): Declare.
4800 * linux-low.c (thread_db_active): Delete.
4801 (new_inferior): Adjust comment.
4802 (inferior_pid): Delete.
4803 (linux_add_process): New.
4804 (handle_extended_wait): Adjust.
4805 (add_lwp): Change unsigned long to ptid.
4806 (linux_create_inferior): Add process to processes table. Adjust
4807 to use ptids. Don't set new_inferior here.
4808 (linux_attach_lwp): Rename to ...
4809 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
4810 it. Adjust to use ptids.
4811 (linux_attach_lwp): New.
4812 (linux_attach): Add process to processes table. Don't set
4813 new_inferior here.
4814 (struct counter): New.
4815 (second_thread_of_pid_p, last_thread_of_process_p): New.
4816 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
4817 multiple processes.
4818 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
4819 processes. Remove process from process table.
4820 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
4821 to multiple processes.
4822 (any_thread_of): New.
4823 (linux_detach): Add `pid' argument, and handle it. Remove process
4824 from processes table.
4825 (linux_join): Add `pid' argument. Handle it.
4826 (linux_thread_alive): Change unsighed long argument to ptid_t.
4827 Consider dead lwps as not being alive.
4828 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
4829 threads we're not interested in.
4830 (same_lwp, find_lwp_pid): New.
4831 (linux_wait_for_lwp): Change `pid' argument's type from int to
4832 ptid_t. Adjust.
4833 (linux_wait_for_event): Rename to ...
4834 (linux_wait_for_event_1): ... this. Change `pid' argument's type
4835 from int to ptid_t. Adjust.
4836 (linux_wait_for_event): New.
4837 (linux_wait_1): Add `ptid' argument. Change return type to
4838 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
4839 that exit from the process table.
4840 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
4841 Adjust.
4842 (mark_lwp_dead): New.
4843 (wait_for_sigstop): Adjust to use ptids. If a process exits while
4844 stopping all threads, mark its main lwp as dead.
4845 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
4846 ptids.
4847 (fetch_register, usr_store_inferior_registers)
4848 (regsets_fetch_inferior_registers)
4849 (regsets_store_inferior_registers, linux_read_memory)
4850 (linux_write_memory): Inline `inferior_pid'.
4851 (linux_look_up_symbols): Adjust to use per-process
4852 `thread_db_active'.
4853 (linux_request_interrupt): Adjust to use ptids.
4854 (linux_read_auxv): Inline `inferior_pid'.
4855 (initialize_low): Don't reference thread_db_active.
4856 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
4857 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
4858 (ps_getpid): Return the pid of the current inferior.
4859 * thread-db.c (proc_handle, thread_agent): Delete.
4860 (thread_db_create_event, thread_db_enable_reporting): Adjust to
4861 per-process data.
4862 (find_one_thread): Change argument type to ptid_t. Adjust to
4863 per-process data.
4864 (maybe_attach_thread): Adjust to per-process data and ptids.
4865 (thread_db_find_new_threads): Ditto.
4866 (thread_db_init): Ditto.
4867 * spu-low.c (spu_create_inferior, spu_attach): Add process to
4868 processes table. Adjust to use ptids.
4869 (spu_kill, spu_detach): Adjust interface. Remove process from
4870 processes table.
4871 (spu_join, spu_thread_alive): Adjust interface.
4872 (spu_wait): Adjust interface. Remove process from processes
4873 table. Adjust to use ptids.
4874 * win32-low.c (current_inferior_tid): Delete.
4875 (current_inferior_ptid): New.
4876 (debug_event_ptid): New.
4877 (thread_rec): Take a ptid. Adjust.
4878 (child_add_thread): Add `pid' argument. Adjust to use ptids.
4879 (child_delete_thread): Ditto.
4880 (do_initial_child_stuff): Add `attached' argument. Add process to
4881 processes table.
4882 (child_fetch_inferior_registers, child_store_inferior_registers):
4883 Adjust.
4884 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
4885 (win32_attach): Pass 1 to do_initial_child_stuff.
4886 (win32_kill): Adjust interface. Remove process from processes
4887 table.
4888 (win32_detach): Ditto.
4889 (win32_join): Adjust interface.
4890 (win32_thread_alive): Take a ptid.
4891 (win32_resume): Adjust to use ptids.
4892 (get_child_debug_event): Ditto.
4893 (win32_wait): Adjust interface. Remove exiting process from
4894 processes table.
4895
bd99dc85
PA
48962009-04-01 Pedro Alves <pedro@codesourcery.com>
4897
4898 Non-stop mode support.
4899
4900 * server.h (non_stop): Declare.
4901 (gdb_client_data, handler_func): Declare.
4902 (delete_file_handler, add_file_handler, start_event_loop):
4903 Declare.
4904 (handle_serial_event, handle_target_event, push_event)
4905 (putpkt_notif): Declare.
4906 * target.h (enum resume_kind): New.
4907 (struct thread_resume): Replace `step' field by `kind' field.
4908 (TARGET_WNOHANG): Define.
4909 (struct target_ops) <wait>: Add `options' argument.
4910 <supports_non_stop, async, start_non_stop>: New fields.
4911 (target_supports_non_stop, target_async): New.
4912 (start_non_stop): Declare.
4913 (mywait): Add `options' argument.
4914 * target.c (mywait): Add `options' argument. Print child exit
4915 notifications here.
4916 (start_non_stop): New.
4917 * server.c (non_stop, own_buf, mem_buf): New globals.
4918 (struct vstop_notif): New.
4919 (notif_queue): New global.
4920 (queue_stop_reply, push_event, discard_queued_stop_replies)
4921 (send_next_stop_reply): New.
4922 (start_inferior): Adjust to use resume_kind. Adjust to mywait
4923 interface changes.
4924 (attach_inferior): In non-stop mode, don't wait for the target
4925 here.
4926 (handle_general_set): Handle QNonStop.
4927 (handle_query): When handling qC, return the current general
4928 thread, instead of the first thread of the list.
4929 (handle_query): If the backend supports non-stop mode, include
4930 QNonStop+ in the qSupported query response.
4931 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
4932 and non-stop mode.
4933 (handle_v_attach, handle_v_run): Handle non-stop mode.
4934 (handle_v_stopped): New.
4935 (handle_v_requests): Report support for vCont;t. Handle vStopped.
4936 (myresume): Adjust to use resume_kind. Handle non-stop.
4937 (queue_stop_reply_callback): New.
4938 (handle_status): Handle non-stop mode.
4939 (main): Clear non_stop flag on reconnection. Use the event-loop.
4940 Refactor serial protocol handling from here ...
4941 (process_serial_event): ... to this new function. When GDB
4942 selects any thread, select one here. In non-stop mode, wait until
4943 GDB acks all pending events before exiting.
4944 (handle_serial_event, handle_target_event): New.
4945 * remote-utils.c (remote_open): Install remote_desc in the event
4946 loop.
4947 (remote_close): Remove remote_desc from the event loop.
4948 (putpkt_binary): Rename to...
4949 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
4950 (putpkt_binary): New as wrapper around putpkt_binary_1.
4951 (putpkt_notif): New.
4952 (prepare_resume_reply): In non-stop mode, don't change the
4953 general_thread.
4954 * event-loop.c: New.
4955 * Makefile.in (OBJ): Add event-loop.o.
4956 (event-loop.o): New rule.
4957
4958 * linux-low.h (pid_of): Moved here.
4959 (lwpid_of): New.
4960 (get_lwp_thread): Use lwpid_of.
4961 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
4962 * linux-low.c (pid_of): Delete.
4963 (inferior_pid): Use lwpid_of.
4964 (linux_event_pipe): New.
4965 (target_is_async_p): New.
4966 (delete_lwp): New.
4967 (handle_extended_wait): Use lwpid_of.
4968 (add_lwp): Don't set lwpid field.
4969 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
4970 (linux_kill_one_lwp): If killing a running lwp, stop it first.
4971 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
4972 (linux_detach_one_lwp): If detaching from a running lwp, stop it
4973 first. Adjust to linux_wait_for_event interface changes. Use
4974 lwpid_of.
4975 (linux_detach): Don't delete the main lwp here.
4976 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
4977 (status_pending_p): Don't consider explicitly suspended lwps.
4978 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
4979 pointer. Add OPTIONS argument. Change return type to int. Use
4980 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
4981 (linux_wait_for_event): Take an integer pid instead of a lwp_info
4982 pointer. Add status pointer argument. Return a pid instead of a
4983 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
4984 changes. In non-stop mode, don't switch to a random thread.
4985 (linux_wait): Rename to...
4986 (linux_wait_1): ... this. Add target_options argument, and handle
4987 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
4988 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
4989 clean exit and signal exit code. Don't stop all threads in
4990 non-stop mode. In all-stop mode, only stop all threads when
4991 reporting a stop to GDB. Handle explicit thread stop requests.
4992 (async_file_flush, async_file_mark): New.
4993 (linux_wait): New.
4994 (send_sigstop): Use lwpid_of.
4995 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
4996 interface changes. In non-stop mode, don't switch to a random
4997 thread.
4998 (linux_resume_one_lwp): Use lwpid_of.
4999 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
5000 (linux_resume_one_thread): ... this. Handle resume_stop. In
5001 non-stop mode, don't look for pending flag in all threads.
5002 (resume_status_pending_p): Don't consider explicitly suspended
5003 threads.
5004 (my_waitpid): Reimplement. Emulate __WALL.
5005 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
5006 Use lwpid_of.
5007 (sigchld_handler, linux_supports_non_stop, linux_async)
5008 (linux_start_non_stop): New.
5009 (linux_target_ops): Register linux_supports_non_stop, linux_async
5010 and linux_start_non_stop.
5011 (initialize_low): Install SIGCHLD handler.
5012 * thread-db.c (thread_db_create_event, find_one_thread)
5013 (thread_db_get_tls_address): Use lwpid_of.
5014 * win32-low.c (win32_detach): Adjust to use resume_kind.
5015 (win32_wait): Add `options' argument.
5016 * spu-low.c (spu_resume): Adjust to use resume_kind.
5017 (spu_wait): Add `options' argument.
5018
5b1c542e
PA
50192009-04-01 Pedro Alves <pedro@codesourcery.com>
5020
5021 Decouple target code from remote protocol.
5022
5023 * target.h (enum target_waitkind): New.
5024 (struct target_waitstatus): New.
5025 (struct target_ops) <wait>: Return an unsigned long. Take a
5026 target_waitstatus pointer instead of a char pointer.
5027 (mywait): Likewise.
5028 * target.c (mywait): Change prototype to return an unsigned long.
5029 Take a target_waitstatus pointer instead of a char pointer. Adjust.
5030 * server.h (thread_from_wait, old_thread_from_wait): Delete
5031 declarations.
5032 (prepare_resume_reply): Change prototype to take a
5033 target_waitstatus.
5034 * server.c (thread_from_wait, old_thread_from_wait): Delete.
5035 (last_status, last_ptid): New.
5036 (start_inferior): Remove "statusptr" argument. Adjust. Return a
5037 pid instead of a signal.
5038 (attach_inferior): Remove "status" and "signal" parameters.
5039 Adjust.
5040 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
5041 not as an address.
5042 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
5043 (handle_v_requests, myresume): Remove "status" and "signal"
5044 parameters. Adjust.
5045 (handle_status): New.
5046 (main): Delete local `status'. Adjust.
5047 * remote-utils.c: Include target.h.
5048 (prepare_resume_reply): Change prototype to take a
5049 target_waitstatus. Adjust.
5050
5051 * linux-low.c (linux_wait): Adjust to new target_ops->wait
5052 interface.
5053 * spu-low.c (spu_wait): Adjust.
5054 * win32-low.c (enum target_waitkind, struct target_waitstatus):
5055 Delete.
5056 (win32_wait): Adjust.
5057
2bd7c093
PA
50582009-04-01 Pedro Alves <pedro@codesourcery.com>
5059
5060 * target.h (struct thread_resume): Delete leave_stopped member.
5061 (struct target_ops): Add a `n' argument to the `resume' callback.
5062 * server.c (start_inferior): Adjust.
5063 (handle_v_cont, myresume): Adjust.
5064 * linux-low.c (check_removed_breakpoint): Adjust to resume
5065 interface change, and to removed leave_stopped field.
5066 (resume_ptr): Delete.
5067 (struct thread_resume_array): New.
5068 (linux_set_resume_request): Add new `arg' parameter. Adjust to
5069 resume interface change.
5070 (linux_continue_one_thread, linux_queue_one_thread)
5071 (resume_status_pending_p): Check if the resume field is NULL
5072 instead of checking the leave_stopped member.
5073 (linux_resume): Adjust to the target resume interface change.
5074 * spu-low.c (spu_resume): Adjust to the target resume interface
5075 change.
5076 * win32-low.c (win32_detach, win32_resume): Ditto.
5077
c35fafde
PA
50782009-04-01 Pedro Alves <pedro@codesourcery.com>
5079
5080 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
5081 flag.
5082 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
5083 pending.
5084 (linux_continue_one_thread): Only preserve the stepping flag if
5085 there's a pending breakpoint.
5086
0a59d50b
PA
50872009-03-31 Pedro Alves <pedro@codesourcery.com>
5088
5089 * server.c (main): After the inferior having exited, call
5090 remote_close before exiting gdbserver.
5091
f04c6d38
TJB
50922009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
5093
5094 Fix size of FPSCR in Power 7 processors.
5095 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
5096 (PPC_FEATURE_HAS_DFP): New #define.
5097 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
5098 size of the FPSCR.
5099
78e5cee6
PA
51002009-03-23 Pedro Alves <pedro@codesourcery.com>
5101
5102 * server.c (handle_query) Whitespace and formatting.
5103
1b3f6016
PA
51042009-03-22 Pedro Alves <pedro@codesourcery.com>
5105
5106 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
5107 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
5108 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
5109 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
5110 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
5111 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
5112 Makefile.in, configure.ac: Fix whitespace throughout.
5113 * configure: Regenerate.
5114
a07b2135
PA
51152009-03-22 Pedro Alves <pedro@codesourcery.com>
5116
5117 * inferiors.c (find_inferior): Make it safe for the callback
5118 function to delete the currently iterated inferior.
5119
67cc2626
PA
51202009-03-22 Pedro Alves <pedro@codesourcery.com>
5121
5122 * Makefile.in (linuw_low_h): Move higher.
5123 (thread-db.o): Depend on $(linux_low_h).
5124
54a0b537
PA
51252009-03-17 Pedro Alves <pedro@codesourcery.com>
5126
5127 Rename "process" to "lwp" throughout.
5128
5129 * linux-low.c (all_processes): Rename to...
5130 (all_lwps): ... this.
5131 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
5132 (add_process): Rename to ...
5133 (add_lwp): ... this. Adjust.
5134 (linux_create_inferior): Adjust.
5135 (linux_attach_lwp): Adjust.
5136 (linux_attach): Adjust.
5137 (linux_kill_one_process): Rename to ...
5138 (linux_kill_one_lwp): ... this. Adjust.
5139 (linux_kill): Adjust.
5140 (linux_detach_one_process): Rename to ...
5141 (linux_detach_one_lwp): ... this. Adjust.
5142 (linux_detach): Adjust.
5143 (check_removed_breakpoint): Adjust.
5144 (status_pending_p): Adjust.
5145 (linux_wait_for_process): Rename to ...
5146 (linux_wait_for_lwp): ... this. Adjust.
5147 (linux_wait_for_event): Adjust.
5148 (send_sigstop): Adjust.
5149 (wait_for_sigstop): Adjust.
5150 (stop_all_processes): Rename to ...
5151 (stop_all_lwps): ... this.
5152 (linux_resume_one_process): Rename to ...
5153 (linux_resume_one_lwp): ... this. Adjust.
5154 (linux_set_resume_request, linux_continue_one_thread)
5155 (linux_queue_one_thread, resume_status_pending_p)
5156 (usr_store_inferior_registers, regsets_store_inferior_registers)
5157 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
5158 Adjust.
5159 * linux-low.h (get_process): Rename to ...
5160 (get_lwp): ... this. Adjust.
5161 (get_thread_process): Rename to ...
5162 (get_thread_lwp): ... this. Adjust.
5163 (get_process_thread): Rename to ...
5164 (get_lwp_thread): ... this. Adjust.
5165 (struct process_info): Rename to ...
5166 (struct lwp_info): ... this.
5167 (all_processes): Rename to ...
5168 (all_lwps): ... this.
5169 * proc-service.c (ps_lgetregs): Adjust.
5170 * thread-db.c (thread_db_create_event, find_one_thread)
5171 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
5172
0b16c5cf
PA
51732009-03-14 Pedro Alves <pedro@codesourcery.com>
5174
5175 * server.c (handle_query): Handle "qAttached".
5176
32de4b9d
NS
51772009-03-13 Nathan Sidwell <nathan@codesourcery.com>
5178
5179 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
5180 GPLv3, update license URL.
5181
2aecd87f
DE
51822009-03-01 Doug Evans <dje@google.com>
5183
93efd302 5184 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
2aecd87f
DE
5185 (server_h): Add gdb_signals.h.
5186 (signals.o): Update.
5187 * server.h (target_signal_from_host,target_signal_to_host_p)
5188 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
5189
86b1f9c5
PM
51902009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
5191
5192 * remote-utils.c (getpkt): Also generate remote-debug
5193 information if noack_mode is set.
5194
4aa995e1
PA
51952009-02-06 Pedro Alves <pedro@codesourcery.com>
5196
5197 * server.c (handle_query): Report qXfer:siginfo:read and
5198 qXfer:siginfo:write as supported and handle them.
5199 * target.h (struct target_ops) <qxfer_siginfo>: New field.
5200 * linux-low.c (linux_xfer_siginfo): New.
5201 (linux_target_ops): Set it.
5202
62709adf
PA
52032009-01-26 Pedro Alves <pedro@codesourcery.com>
5204
5205 * server.c (gdbserver_usage): Mention --remote-debug.
5206 (main): Accept '--remote-debug' switch.
5207
aef93bd7
DE
52082009-01-18 Doug Evans <dje@google.com>
5209
5210 * regcache.c (new_register_cache): No need to check result of xcalloc.
5211 * server.c (handle_search_memory): Back out calls to xmalloc,
5212 result is checked and error is returned to user upon failure.
5213 (handle_query): Ditto. Add more checks for result of malloc.
5214 (handle_v_cont): Check result of malloc, report error back to
5215 user upon failure.
5216 (handle_v_run): Ditto. Call freeargv.
5217 * server.h (freeargv): Declare.
5218 * utils.c (freeargv): New fn.
5219
54363045
DE
52202009-01-15 Doug Evans <dje@google.com>
5221
f626972c
DE
5222 * gdbreplay.c (perror_with_name): Make arg const char *.
5223 * server.h (target_signal_to_name): Make return type const char *.
0842e787 5224 * thread-db.c (thread_db_err_str): Make return type const char *.
f626972c 5225 * utils.c (perror_with_name): Make arg const char *.
54363045 5226
18aae699
PA
52272009-01-14 Pedro Alves <pedro@codesourcery.com>
5228
5229 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
5230 when handling a EXIT_PROCESS_DEBUG_EVENT.
5231
ff703abe
JB
52322009-01-06 Joel Brobecker <brobecker@adacore.com>
5233
5234 * gdbreplay.c (gdbreplay_version): Update copyright year.
5235 * server.c (gdbserver_version): Likewise.
5236
f21cc1a2 52372009-01-05 Doug Evans <dje@google.com>
0e21c1ec
DE
5238
5239 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
f21cc1a2 5240 (handle_extended_wait): Improve comment.
0e21c1ec 5241
bca929d3
DE
52422008-12-13 Doug Evans <dje@google.com>
5243
5244 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
5245 * server.h (ATTR_MALLOC): New macro.
5246 (xmalloc,xcalloc,xstrdup): Declare.
5247 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
5248 * inferiors.c: Ditto.
5249 * linux-low.c: Ditto.
5250 * mem-break.c: Ditto.
5251 * regcache.c: Ditto.
5252 * remote-utils.c: Ditto.
5253 * server.c: Ditto.
5254 * target.c: Ditto.
5255 * win32-low.c: Ditto.
5256
97438e3f
DE
52572008-12-12 Doug Evans <dje@google.com>
5258
896c7fbb
DE
5259 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
5260 in debugging printf.
5261
97438e3f
DE
5262 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
5263
e3b886f8
DE
52642008-12-09 Doug Evans <dje@google.com>
5265
5266 * linux-low.h (struct process_info): Delete member tid, unused.
5267 * thread-db.c (find_one_thread): Update.
5268 (maybe_attach_thread): Update.
5269
07e059b5
VP
52702008-12-02 Pedro Alves <pedro@codesourcery.com>
5271
889bf7c5
PA
5272 * target.h (struct target_ops): Add qxfer_osdata member.
5273 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
5274 and dirent.h.
5275 (linux_qxfer_osdata): New functions.
5276 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
5277 callback.
5278 * server.c (handle_query): Handle "qXfer:osdata:read:".
5279 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
5280 (buffer_xml_printf): New functions.
5281 * server.h (struct buffer): New.
5282 (buffer_grow_str, buffer_grow_str0): New macros.
5283 (buffer_grow, buffer_free, buffer_init, buffer_finish)
5284 (buffer_xml_printf): Declare.
07e059b5 5285
4cab47ab
DE
52862008-11-24 Doug Evans <dje@google.com>
5287
5288 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
5289
f142445f
DJ
52902008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
5291
5292 * server.c (handle_v_run): Always use the supplied argument list.
5293
d0107bb6 52942008-11-19 Bob Wilson <bob.wilson@acm.org>
889bf7c5 5295
d0107bb6
BW
5296 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
5297 (xtensa_regmap_table): Add entry for scompare1.
889bf7c5 5298
2c4ad781
TJB
52992008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
5300
5301 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
5302 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
5303 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
5304 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
5305 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
5306 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
5307 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
5308 XML target descriptions.
5309 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
5310 when inferior is running on an ISA 2.05 or later processor. Add
5311 special case to return offset for full 64-bit slot of FPSCR when
5312 in 32-bits.
5313
dfb64f85
DJ
53142008-11-14 Daniel Gutson <dgutson@codesourcery.com>
5315
5316 * Makefile.in (SFILES, clean): Added sparc64 files.
5317 (reg-sparc64.o, reg-sparc64.c): New.
5318 * configure.srv (sparc*-*-linux*): New configuration.
5319 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
5320 syscall arguments for SPARC.
5321 (regsets_store_inferior_registers): Likewise.
5322 * linux-sparc-low.c: New file.
5323
66b6e1dd
DE
53242008-10-21 Doug Evans <dje@google.com>
5325
5326 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
5327 (READLINE_DIR,READLINE_DEP): Delete.
5328 (INTERNAL_CFLAGS): Update.
5329 (LINTFLAGS): Update.
5330
9b710a42
PA
53312008-10-10 Pedro Alves <pedro@codesourcery.com>
5332
5333 * server.c (handle_v_run): If GDB didn't specify an argv, use the
5334 whole argv from the last run, not just argv[0].
5335
5822d809
PA
53362008-09-08 Pedro Alves <pedro@codesourcery.com>
5337
5338 * regcache.c (new_register_cache): Return NULL if the register
5339 cache size isn't known yet.
5340 (free_register_cache): Avoid dereferencing a NULL regcache.
5341
74aac56f
DJ
53422008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
5343
5344 * configure.srv: Merge MIPS and MIPS64.
5345
400b20f5
MR
53462008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
5347
5348 * Makefile.in (uninstall): Apply $(EXEEXT) too.
5349
677c5bb1
LM
53502008-08-18 Luis Machado <luisgpm@br.ibm.com>
5351
5352 * Makefile.in: Add required vsx dependencies.
5353
5354 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
5355 Declare init_registers_powerpc_vsx32l.
5356 Declare init_registers_powerpc_vsx64l.
5357 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
5358 (ppc_arch_setup): Check for VSX in hwcap.
5359 (ppc_fill_vsxregset): New function.
5360 (ppc_store_vsxregset): New function.
5361 Add new VSX entry in regset_info target_regsets.
5362
5363 * configure.srv: Add new VSX dependencies.
5364
a6f3e723
SL
53652008-08-12 Pedro Alves <pedro@codesourcery.com>
5366
5367 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
5368 (remote_open): Set or clear transport_is_reliable.
5369 (putpkt_binary): Don't expect acks in noack mode.
5370 (getpkt): Don't send ack/nac in noack mode.
5371 * server.c (handle_general_set): Handle QStartNoAckMode.
5372 (handle_query): If connected by tcp pass QStartNoAckMode+ in
5373 qSupported.
5374 (main): Reset noack_mode on every connection.
5375 * server.h (noack_mode): Declare.
5376
a417dc56
RW
53772008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
5378
5379 * Makefile.in (GDBREPLAY_OBS): New variable.
5380 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
5381
3221518c
UW
53822008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
5383 Daniel Jacobowitz <dan@codesourcery.com>
5384
5385 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
5386 (usr_store_inferior_registers): Likewise.
5387 (regsets_store_inferior_registers): Likewise.
5388
ec56be1b
PA
53892008-07-31 Rolf Jansen <rj@surtec.com>
5390 Pedro Alves <pedro@codesourcery.com>
5391
5392 * configure.ac: Check for memmem declaration.
5393 * server.c [HAVE_MALLOC_H]: Include malloc.h.
5394 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
5395 (disable_packet_qfThreadInfo): Unconditionally compile.
5396 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
5397 * configure, config.in: Regenerate.
5398
2fe5e3ff
DE
53992008-07-28 Doug Kwan <dougkwan@google.com>
5400
5401 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
5402 (linux_write_memory): Remove declaration of errno.
5403
836acd6d
UW
54042008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
5405
5406 * linux-low.c (handle_extended_wait): Do not use "status"
5407 variable uninitialized.
5408
aeba519e
PA
54092008-07-07 Pedro Alves <pedro@codesourcery.com>
5410
5411 * server.c (handle_v_attach): Inhibit reporting dll changes.
5412
db42f210
PA
54132008-06-27 Pedro Alves <pedro@codesourcery.com>
5414
5415 * remote-utils.c (prepare_resume_reply): If requested, don't
5416 output "thread:TID" in the T stop reply.
5417
5418 * server.c (disable_packet_vCont, disable_packet_Tthread)
5419 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
5420 (handle_query): If requested, disable support for qC, qfThreadInfo
5421 and qsThreadInfo.
5422 (handle_v_requests): If requested, disable support for vCont.
5423 (gdbserver_show_disableable): New.
5424 (main): Handle --disable-packet and --disable-packet=LIST.
5425
5426 * server.h (disable_packet_vCont, disable_packet_Tthread)
5427 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
5428
8e4c5421
CD
54292008-06-20 Carlos O'Donell <carlos@codesourcery.com>
5430
5431 * server.c (gdbserver_usage): Mention --version.
5432
6e23a804
DJ
54332008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
5434
5435 * Makefile.in (gdbreplay.o): New rule.
5436
90aa6a40
JM
54372008-06-06 Joseph Myers <joseph@codesourcery.com>
5438
5439 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
5440 message, not gdbserver.
5441
c16158bc 54422008-06-05 Vladimir Prus <vladimir@codesourcery.com>
889bf7c5
PA
5443 Nathan Sidwell <nathan@codesourcery.com>
5444 Joseph Myers <joseph@codesourcery.com>
c16158bc
JM
5445
5446 * acinclude.m4: Include ../../config/acx.m4.
5447 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
5448 * configure, config.in: Regenerate.
5449 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
5450 * server.c (gdbserver_version): Print PKGVERSION.
5451 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
5452 (main): Adjust gdbserver_usage calls.
5453 * gdbreplay.c (version, host_name): Add declarations.
5454 (gdbreplay_version, gdbreplay_usage): New.
5455 (main): Accept --version and --help options.
5456
aeb75bf5
DJ
54572008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
5458
5459 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
5460 (arm_breakpoint_at): Handle Thumb.
5461 (the_low_target): Add comment.
5462
76b233dd
UW
54632008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
5464
5465 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
5466
08388c79
DE
54672008-05-09 Doug Evans <dje@google.com>
5468
a3c83fae
DE
5469 * server.h (decode_search_memory_packet): Declare.
5470 * remote-utils.c (decode_search_memory_packet): New fn.
5471 * server.c (handle_search_memory_1): New fn.
08388c79
DE
5472 (handle_search_memory): New fn.
5473 (handle_query): Process qSearch:memory packets.
5474
bb9c3d36
UW
54752008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
5476
5477 * regcache.c (registers_length): Remove.
5478 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
5479 full register packet.
5480 * regcache.h (registers_length): Remove prototype.
5481 * server.h (PBUFSIZ): Define to 16384.
5482
7284e1be
UW
54832008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
5484
5485 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
5486 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
5487 powerpc-64l.o, and powerpc-altivec64l.o.
5488 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
5489 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
5490 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
5491 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
5492 rs6000/power-linux.xml, and rs6000/power64-linux.xml
5493 to srv_xmlfiles.
5494
5495 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
5496 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
5497 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
5498 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
5499 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
5500 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
5501 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
5502 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
5503 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
5504 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
5505 (clean): Update.
5506
5507 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
5508 (init_registers_powerpc_32l): ... this new prototype.
5509 (init_registers_powerpc_32): Remove, replace by ...
5510 (init_registers_powerpc_altivec32l): ... this new prototype.
5511 (init_registers_powerpc_e500): Remove, replace by ...
5512 (init_registers_powerpc_e500l): ... this new prototype.
5513 (init_registers_ppc64): Remove, replace by ...
5514 (init_registers_powerpc_64l): ... this new prototype.
5515 (init_registers_powerpc_64): Remove, replace by ...
5516 (init_registers_powerpc_altivec64l): ... this new prototype.
5517 (ppc_num_regs): Set to 73.
5518 (PT_ORIG_R3, PT_TRAP): Define if necessary.
5519 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
5520 (ppc_cannot_store_register): Handle orig_r3 and trap.
5521 (ppc_arch_setup): Update init_registers_... calls.
5522 (ppc_fill_gregset): Handle orig_r3 and trap.
5523
5524 * inferiors.c (clear_inferiors): Reset current_inferior.
5525
fdc59709
PB
55262008-04-23 Paolo Bonzini <bonzini@gnu.org>
5527
889bf7c5
PA
5528 * acinclude.m4: Add override.m4.
5529 * configure: Regenerate.
fdc59709 5530
c9b2f845
UW
55312008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
5532
5533 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
5534 initial call to init_register_ppc64.
5535
550512b8
UW
55362008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
5537
43aaf8b6
PA
5538 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
5539 single powerpc*-*-linux* case.
550512b8
UW
5540 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
5541
b6430ec3
UW
55422008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
5543
5544 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
889bf7c5 5545 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
b6430ec3
UW
5546 from reg_xmlfiles.
5547 * linux-ppc-low.c: Include <elf.h>.
5548 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
5549 (ppc_hwcap): New global variable.
5550 (ppc_regmap): Remove __SPE__ #ifdef sections.
5551 (ppc_regmap_e500): New global variable.
5552 (ppc_cannot_store_register): Update __SPE__ special case.
5553 (ppc_get_hwcap): New function.
5554 (ppc_arch_setup): Use it to determine whether inferior supports
5555 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
5556 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
5557 Do not access registers if target does not support AltiVec.
5558 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
5559 Do not access registers if target does not support SPE.
5560 (target_regsets): Unconditionally include AltiVec and SPE regsets.
5561
52fa2412
UW
55622008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
5563
5564 * linux-low.c (disabled_regsets, num_regsets): New.
5565 (use_regsets_p): Delete.
5566 (linux_wait_for_process): Clear disabled_regsets.
5567 (regsets_fetch_inferior_registers): Check and set it.
5568 (regsets_store_inferior_registers): Likewise.
5569 (linux_fetch_registers, linux_store_registers): Do not use
5570 use_regsets_p.
5571 (initialize_low): Allocate disabled_regsets.
5572
e28b3332
DJ
55732008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
5574
5575 * Makefile.in (LIBOBJS): New.
5576 (OBS): Use LIBOBJS.
5577 (memmem.o): New rule.
5578 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
5579 * configure: Regenerated.
5580
4536995d
UW
55812008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
5582
5583 * server.c (handle_query): Never return "unsupported" for
5584 qXfer:features:read queries.
5585
221c031f
UW
55862008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
5587
5588 * server.c (get_features_xml): Fix inverted condition.
5589 (handle_query): Always support qXfer:feature:read.
5590
ccd213ac
DJ
55912008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
5592
5593 * server.c (wrapper_argv): New.
5594 (start_inferior): Handle wrapper_argv. If set, expect an extra
5595 trap.
5596 (gdbserver_usage): Document --wrapper.
5597 (main): Parse --wrapper.
5598
6fe305f7
UW
55992008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
5600
5601 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
5602 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
5603 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
5604 (ppc_set_pc): Likewise.
5605 (ppc_arch_setup): New function.
5606 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
5607 of collect_register.
889bf7c5 5608 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
6fe305f7 5609
5b0a002e
UW
56102008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
5611
5612 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
5613 instead of linux-ppc64-low.o.
5614 * linux-ppc64-low.c: Remove file.
5615 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
5616 (linux-ppc64-low.o): Remove rule.
5617
5618 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
5619 (init_registers_powerpc_64): Likewise.
5620 (ppc_regmap): Conditionally define depending on __powerpc64__.
5621 (ppc_cannot_store_register): Do not special-case "fpscr" when
5622 compiled on __powerpc64__.
5623 (ppc_collect_ptrace_register): New function.
5624 (ppc_supply_ptrace_register): New function.
5625 (ppc_breakpoint): Change type to "unsigned int".
5626 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
5627 (the_low_target): Conditionally provide initializers for the
889bf7c5 5628 arch_setup member depending on __powerpc64__. Install
5b0a002e
UW
5629 collect_ptrace_register and supply_ptrace_register members.
5630
9b4b61c8
UW
56312008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
5632
5633 * regcache.h (gdbserver_xmltarget): Add extern declaration.
5634 * server.c (gdbserver_xmltarget): Define.
5635 (get_features_xml): Use it to replace "target.xml" and arch_string.
5636
5637 * configure.srv: Remove srv_xmltarget. Add XML files that were
5638 mentioned there to srv_xmlfiles instead. Remove conditional tests
5639 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
5640 srv_xmlfiles and srv_regobj to include all possible choices.
5641 * configure.ac (srv_xmltarget): Remove.
5642 (srv_xmlfiles): Do not add "target.xml".
5643 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
5644 checks for supplementary target information.
5645 * configure: Regenerate.
5646 * Makefile.in (XML_TARGET): Remove.
5647 (target.xml): Remove rule.
5648 (clean): Do not clean up target.xml.
5649 (.PRECIOUS): Do not mention target.xml.
5650
5651 * target.h (struct target_ops): Remove arch_string member.
5652 * linux-low.c (linux_arch_string): Remove.
5653 (linux_target_ops): Remove arch_string initializer.
5654 * linux-low.h (struct linux_target_ops): Remove arch_string member.
5655 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
5656 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
5657 * spu-low.c (spu_arch_string): Remove.
5658 (spu_target_ops): Remove arch_string initializer.
5659 * win32-low.c (win32_arch_string): Remove.
5660 (win32_target_ops): Remove arch_string initializer.
5661 * win32-low.h (struct win32_target_ops): Remove arch_string member.
5662 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
5663 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
5664
ee1a7ae4
UW
56652008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
5666
5667 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
5668 by collect_ptrace_register and supply_ptrace_register hooks.
5669 * linux-low.c (fetch_register): Use supply_ptrace_register callback
5670 instead of checking for the_low_target.left_pad_xfer.
5671 (usr_store_inferior_registers): Use collect_ptrace_register callback
5672 instead of checking for the_low_target.left_pad_xfer.
5673
5674 * linux-s390-low.c (s390_collect_ptrace_register): New function.
5675 (s390_supply_ptrace_register): Likewise.
5676 (s390_fill_gregset): Call s390_collect_ptrace_register.
5677 (the_low_target): Update.
5678
5679 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
5680 (ppc_supply_ptrace_register): Likewise.
5681 (the_low_target): Update.
5682
5683 * linux-i386-low.c (the_low_target): Update.
5684 * linux-x86-64-low.c (the_low_target): Update.
5685
d61ddec4
UW
56862008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
5687
5688 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
5689 reg-s390.o and reg-s390x.o.
5690
5691 * linux-low.c (new_inferior): New global variable.
5692 (linux_create_inferior, linux_attach): Set it.
5693 (linux_wait_for_process): Call the_low_target.arch_setup after the
5694 target has stopped for the first time.
5695 (initialize_low): Do not call the_low_target.arch_setup.
5696
5697 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
5698 (s390_set_pc): Likewise.
5699 (s390_arch_setup): New function.
5700 (the_low_target): Use s390_arch_setup as arch_setup routine.
5701
5702 * regcache.c (realloc_register_cache): New function.
5703 (set_register_cache): Call it for each existing regcache.
5704
d05b4ac3
UW
57052008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
5706
5707 * server.h (init_registers): Remove prototype.
5708
5709 * linux-low.h (struct linux_target_ops): Add arch_setup field.
5710 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
5711 instead of init_registers ().
5712 * linux-arm-low.c (init_registers_arm): Add prototype.
5713 (init_registers_arm_with_iwmmxt): Likewise.
5714 (the_low_target): Add initializer for arch_setup field.
5715 * linux-cris-low.c (init_registers_cris): Add prototype.
5716 (the_low_target): Add initializer for arch_setup field.
5717 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
5718 (the_low_target): Add initializer for arch_setup field.
5719 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
5720 (the_low_target): Add initializer for arch_setup field.
5721 * linux-ia64-low.c (init_registers_ia64): Add prototype.
5722 (the_low_target): Add initializer for arch_setup field.
5723 * linux-m32r-low.c (init_registers_m32r): Add prototype.
5724 (the_low_target): Add initializer for arch_setup field.
5725 * linux-m68k-low.c (init_registers_m68k): Add prototype.
5726 (the_low_target): Add initializer for arch_setup field.
5727 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
5728 (init_registers_mips64_linux): Likewise.
5729 (the_low_target): Add initializer for arch_setup field.
5730 * linux-ppc-low.c (init_registers_ppc): Add prototype.
5731 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
5732 (the_low_target): Add initializer for arch_setup field.
5733 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
5734 (init_registers_powerpc_64): Likewise.
5735 (the_low_target): Add initializer for arch_setup field.
5736 * linux-s390-low.c (init_registers_s390): Add prototype.
5737 (init_registers_s390x): Likewise.
5738 (the_low_target): Add initializer for arch_setup field.
5739 * linux-sh-low.c (init_registers_sh): Add prototype.
5740 (the_low_target): Add initializer for arch_setup field.
5741 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
5742 (the_low_target): Add initializer for arch_setup field.
5743 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
5744 (the_low_target): Add initializer for arch_setup field.
5745
5746 * win32-low.h (struct win32_target_ops): Add arch_setup field.
5747 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
5748 instead of init_registers ().
5749 * win32-arm-low.c (init_registers_arm): Add prototype.
5750 (the_low_target): Add initializer for arch_setup field.
5751 * win32-i386-low.c (init_registers_i386): Add prototype.
5752 (the_low_target): Add initializer for arch_setup field.
5753
5754 * spu-low.c (init_registers_spu): Add prototype.
5755 (initialize_low): Call initialie_registers_spu () instead of
5756 initialize_registers ().
5757
fd96d250
PA
57582008-02-19 Pedro Alves <pedro@codesourcery.com>
5759
5760 * server.c (handle_v_requests): When handling the vRun and vAttach
5761 packets, if already debugging a process, don't kill it. Return an
5762 error instead.
5763
d41b6bb4
DJ
57642008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
5765
5766 * server.c (handle_query): Correct length check.
5767
5ac588cf
PA
57682008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
5769
5770 * win32-low.c (do_initial_child_stuff): Add process handle
5771 parameter. Set current_process_handle and current_process_id from the
5772 parameters. Clear globals.
5773 (win32_create_inferior): Don't set current_process_handle and
5774 current_process_id here. Instead pass them on the call to
5775 do_initial_child_stuff.
5776 (win32_attach): Likewise.
5777 (win32_clear_inferiors): New.
5778 (win32_kill): Don't close the current process handle or the
5779 current thread handle here. Instead call win32_clear_inferiors.
5780 (win32_detach): Don't open a new handle to the process. Call
5781 win32_clear_inferiors.
5782 (win32_join): Don't rely on current_process_handle; open a new
5783 handle using the process id.
5784 (win32_wait): Call win32_clear_inferiors when the inferior process
5785 has exited.
5786
ecd7ecbc
DJ
57872008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
5788
5789 * server.c (monitor_show_help): Add "exit".
5790
1525d545
MG
57912008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
5792
ecd7ecbc 5793 * Makefile.in (SFILES): Add linux-xtensa-low.c.
1525d545
MG
5794 (clean): Add reg-xtensa.c.
5795 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
ecd7ecbc
DJ
5796 * configure.srv (xtensa*-*-linux*) New target.
5797 * linux-xtensa-low.c: New.
5798 * xtensa-xtregs.c: New.
1525d545 5799
59a016f0
PA
58002008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
5801
5802 * hostio.c: Don't include errno.h.
5803 (errno_to_fileio_errno): Move to hostio-errno.
5804 * hostio.c: (hostio_error): Remove the error parameter. Defer the
5805 error number outputting to the target->hostio_last_error callback.
5806 (hostio_packet_error): Use FILEIO_EINVAL directly.
5807 (handle_open, handle_pread, hostio_error, handle_unlink): Update
5808 calls to hostio_error.
5809 * hostio-errno.c: New.
5810 * server.h (hostio_last_error_from_errno): Declare.
5811 * target.h (target_ops): Add hostio_last_error member.
5812 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
5813 as hostio_last_error handler.
889bf7c5 5814 * spu-low.c (spu_target_ops): Likewise.
59a016f0
PA
5815 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
5816 (wince_hostio_last_error): New functions.
5817 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
5818 as hostio_last_error handler.
5819 (win32_target_ops) [!_WIN32_WCE]: Register
5820 hostio_last_error_from_errno as hostio_last_error handler.
5821 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
5822 (hostio-errno.o): New rule.
5823 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
5824 * configure.srv (srv_hostio_err_objs): New variable. Default to
5825 hostio-errno.o.
5826 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
5827 * configure: Regenerate.
5828
2d717e4f
DJ
58292008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
5830
5831 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
5832 (linux_kill, linux_detach): Clean up the process list.
5833 * remote-utils.c (remote_open): Improve port number parsing.
5834 (putpkt_binary, input_interrupt): Only send interrupts if the target
5835 is running.
5836 * server.c (extended_protocol): Make static.
5837 (attached): Define earlier.
5838 (exit_requested, response_needed, program_argv): New variables.
5839 (target_running): New.
5840 (start_inferior): Clear attached here.
5841 (attach_inferior): Set attached here.
5842 (require_running): Define.
5843 (handle_query): Use require_running and target_running. Implement
5844 "monitor exit".
5845 (handle_v_attach, handle_v_run): New.
5846 (handle_v_requests): Use require_running. Handle vAttach and vRun.
5847 (gdbserver_usage): Update.
5848 (main): Redo argument parsing. Handle --debug and --multi. Handle
5849 --attach along with other options or after the port. Save
5850 program_argv. Support no initial program. Resynchronize
5851 communication with GDB after an error. Handle "monitor exit".
5852 Use require_running and target_running. Always allow the extended
5853 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
5854 restart in extended mode.
5855 * README: Refer to the GDB manual. Update --attach usage.
5856
7407e2de
AS
58572007-12-20 Andreas Schwab <schwab@suse.de>
5858
5859 * linux-low.c (STACK_SIZE): Define.
5860 (linux_tracefork_child): Use it. Use __clone2 on ia64.
5861 (linux_test_for_tracefork): Likewise.
5862
b65d95c5
DJ
58632007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
5864
5865 * linux-low.c (linux_wait_for_event): Update messages. Do not
5866 reinsert auto-delete breakpoints.
5867 * mem-break.c (struct breakpoint): Change return type of handler to
5868 int.
5869 (set_breakpoint_at): Update handler type.
5870 (reinsert_breakpoint_handler): Return 1 instead of calling
5871 delete_breakpoint.
5872 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
5873 setting a new one.
5874 (check_breakpoints): Delete auto-delete breakpoints and return 2.
5875 * mem-break.h (set_breakpoint_at): Update handler type.
5876 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
5877 * win32-low.c (auto_delete_breakpoint): New.
5878 (get_child_debug_event): Use it.
5879
4e799345
DJ
58802007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
5881
5882 * configure.ac: Check for pread and pwrite.
5883 * hostio.c (handle_pread): Fall back to lseek and read.
5884 (handle_pwrite): Fall back to lseek and write.
5885 * config.in, configure: Regenerated.
5886
27524b67
DJ
58872007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
5888
5889 * server.c (myresume): Add own_buf argument.
5890 (main): Update calls.
5891
a20d5e98
DJ
58922007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
5893
5894 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
5895 * remote-utils.c (remote_open): Do not call disable_async_io.
5896 (block_async_io): Delete.
5897 (unblock_async_io): Make static.
5898 (initialize_async_io): New.
5899 * server.c (handle_v_cont): Handle async I/O here.
5900 (myresume): Likewise. Move other common resume tasks here...
5901 (main): ... from here. Call initialize_async_io. Disable async
5902 I/O before the main loop.
5903 * server.h (initialize_async_io): Declare.
5904 (block_async_io, unblock_async_io): Delete prototypes.
5905 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
5906
b79d787e
DJ
59072007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
5908
5909 * remote-utils.c (readchar): Allow binary data in received messages.
5910
d97903b2
PA
59112007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
5912
5913 * win32-low.c (attaching): New global.
5914 (win32_create_inferior): Clear the `attaching' global.
5915 (win32_attach): Set the `attaching' global.
5916 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
5917 attaching. Only set a breakpoint at the entry point if not
5918 attaching.
5919
311de423
PA
59202007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
5921
5922 * server.c (main): Don't report dll events on the initial
5923 connection on attaches.
5924
6c2d16d2
PA
59252007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
5926
5927 * server.c (main): Relax numerical bases supported for the pid of
5928 the --attach command line argument.
5929
5ca906e6
PA
59302007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
5931
5932 * win32-low.c (win32_attach): Call OpenProcess before
5933 DebugActiveProcess, not after. Add last error output to error
5934 call.
5935
9c6c8194
PA
59362007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
5937
5938 * win32-low.c (win32_get_thread_context)
5939 (win32_set_thread_context): New functions.
5940 (thread_rec): Use win32_get_thread_context.
5941 (continue_one_thread, win32_resume): Use win32_set_thread_context.
5942 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
5943 field.
5944
4d5d1aaa
PA
59452007-12-03 Leo Zayas
5946 Pedro Alves <pedro_alves@portugalmail.pt>
5947
5948 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
5949 global variables.
5950 (child_add_thread): Minor cleanup.
5951 (child_continue): Resume artificially suspended threads before
5952 calling ContinueDebugEvent.
5953 (suspend_one_thread): New.
5954 (fake_breakpoint_event): New.
5955 (get_child_debug_event): Change return type to int. Check here if
5956 gdb sent an interrupt request. If a soft interrupt was requested,
5957 fake a breakpoint event. Return 0 if there is no event to handle,
5958 and 1 otherwise.
5959 (win32_wait): Don't check here if gdb sent an interrupt request.
5960 Ensure there is a valid event to handle.
5961 (win32_request_interrupt): Add soft interruption method as last
5962 resort.
5963
c436e841
PA
59642007-12-03 Leo Zayas
5965 Pedro Alves <pedro_alves@portugalmail.pt>
5966
5967 * win32-low.h (win32_thread_info): Add descriptions to the
5968 structure members. Replace `suspend_count' counter by a
5969 `suspended' flag.
5970 * win32-low.c (thread_rec): Update condition of when to get the
5971 context from the inferior. Rely on ContextFlags being set if it
5972 has already been retrieved. Only suspend the inferior thread if
5973 we haven't already. Warn if that fails.
5974 (continue_one_thread): s/suspend_count/suspended/. Only call
5975 ResumeThread once. Warn if that fails.
5976
e7b5fa67
PA
59772007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
5978
5979 * win32-low.c (win32_wait): Don't read from the inferior when it
5980 has already exited.
5981
a385171d
PA
59822007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
5983
5984 * Makefile.in (win32_low_h): New variable.
5985 (win32-low.o): Add dependency on $(win32_low_h).
5986 (win32-arm-low.o, win32-i386-low.o): New rules.
5987
f80c84b3
DJ
59882007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
5989
5990 * hostio.c: Correct copyright year.
5991
a6b151f1
DJ
59922007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
5993
5994 * Makefile.in (OBS): Add hostio.o.
5995 (hostio.o): New rule.
5996 * server.h (handle_vFile): Declare.
5997 * hostio.c: New file.
5998 * server.c (handle_v_requests): Take packet_len and new_packet_len
5999 for binary packets. Call handle_vFile.
6000 (main): Update call to handle_v_requests.
6001
f9387fc3
DJ
60022007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
6003
6004 * linux-low.c: Include <sched.h>.
6005
51c2684e
DJ
60062007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
6007
6008 * linux-low.c (linux_tracefork_grandchild): New.
6009 (linux_tracefork_child): Use clone.
6010 (linux_test_for_tracefork): Use clone; allocate and free a stack.
6011
75f83163
JB
60122007-10-31 Joel Brobecker <brobecker@adacore.com>
6013
6014 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
6015
da5898ce
DJ
60162007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
6017
6018 * linux-low.c (handle_extended_wait): Handle unexpected signals.
6019
24a09b5f
DJ
60202007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
6021
6022 * inferiors.c (change_inferior_id): Delete.
6023 (add_pid_to_list, pull_pid_from_list): New.
6024 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
6025 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
6026 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
6027 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
6028 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
6029 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
6030 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
6031 (using_threads): Always set to 1.
6032 (handle_extended_wait): New.
6033 (add_process): Do not set TID.
6034 (linux_create_inferior): Set must_set_ptrace_flags.
6035 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
6036 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
6037 (linux_thread_alive): Rename TID argument to LWPID.
6038 (linux_wait_for_process): Handle unknown processes. Do not use TID.
6039 (linux_wait_for_event): Do not use TID or check using_threads. Update
6040 call to dead_thread_notify. Call handle_extended_wait.
6041 (linux_create_inferior): Use PTRACE_SETOPTIONS.
6042 (send_sigstop): Delete sigstop_sent.
6043 (wait_for_sigstop): Avoid TID.
6044 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
6045 (linux_test_for_tracefork): New.
6046 (linux_lookup_signals): Use thread_db_active and
6047 linux_supports_tracefork_flag.
6048 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
6049 * linux-low.h (get_process_thread): Avoid TID.
6050 (struct process_ifo): Move thread_known and tid to the end. Remove
6051 sigstop_sent.
6052 (linux_attach_lwp, thread_db_init): Update prototypes.
6053 * server.h (change_inferior_id): Delete prototype.
6054 (add_pid_to_list, pull_pid_from_list): New prototypes.
6055 * thread-db.c (thread_db_use_events): New.
6056 (find_first_thread): Rename to...
6057 (find_one_thread): ...this. Update callers and messages. Do not
6058 call fatal. Check thread_db_use_events. Do not call
6059 change_inferior_id or new_thread_notify.
6060 (maybe_attach_thread): Update. Do not call new_thread_notify.
6061 (thread_db_init): Set thread_db_use_events. Check use_events.
6062 * utils.c (fatal, warning): Correct message prefix.
6063
30ed0a8f
DJ
60642007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
6065
6066 * Makefile.in (clean): Remove new files.
6067 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
6068 (powerpc-64.o, powerpc-64.c): New rules.
6069 * configure.srv: Use alternate register sets for powerpc64-*-linux*
6070 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
6071 with SPE.
6072 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
6073 SPE targets.
6074 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
6075 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
6076 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
6077 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
6078 (target_regsets): Add AltiVec and SPE register sets.
6079 * configure.ac: Check for AltiVec and SPE.
6080 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
6081 (ppc_fill_vrregset, ppc_store_vrregset): New.
6082 (target_regsets): Add AltiVec register set.
6083 * configure: Regenerated.
6084
fd462a61
DJ
60852007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
6086
6087 * linux-low.c (O_LARGEFILE): Define.
6088 (linux_read_memory): Use /proc/PID/mem.
6089 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
6090 * configure, config.in: Regenerated.
6091
69f223ed
DJ
60922007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
6093
6094 * linux-low.c (linux_wait_for_event): Do not pass signals while
6095 single-stepping.
6096
aec18585
PA
60972007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
6098
6099 * win32-low.c (create_process): New.
6100 (win32_create_inferior): Use create_process instead of
6101 CreateProcess. If create_process failed retry appending an ".exe"
6102 suffix. Store the GetLastError result immediatelly after
6103 create_process calls and use it on the call to error.
6104
34d86ddd
PA
61052007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
6106
6107 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
6108
5a0e3bd0
JB
61092007-08-23 Joel Brobecker <brobecker@adacore.com>
6110
6111 * configure.ac: Switch license to GPLv3.
6112
f88c79e6
MS
61132007-08-01 Michael Snyder <msnyder@access-company.com>
6114
6115 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
6116
6b3d9b83
PA
61172007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
6118
6119 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
6120 typedef.
6121 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
6122 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
6123 CloseToolhelp32Snapshot.
6124 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
6125 CloseToolhelp32Snapshot.
6126
c588c53c
MS
61272007-07-27 Michael Snyder <michael.snyder@access-company.com>
6128
6129 * server.c (main): Check for inferior exit before main loop.
6130
aa0403d9
PA
61312007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
6132
6133 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
6134 instead of on tmp_desc.
6135
255e7678
DJ
61362007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
6137 Daniel Jacobowitz <dan@codesourcery.com>
6138
6139 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
6140 (add_thread): Minor cleanups.
6141 (clear_inferiors): Move lower in the file. Clear the DLL
6142 list.
6143 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
6144 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
6145 (xml_escape_text): New.
6146 * server.c (handle_query): Handle qXfer:libraries:read. Report it
6147 for qSupported.
6148 (handle_v_cont): Report errors.
6149 (gdbserver_version): Update.
6150 (main): Correct size of own_buf. Do not report initial DLL events.
6151 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
6152 (unloaded_dll, xml_escape_text): New.
6153 * win32-low.c (enum target_waitkind): Update comments.
6154 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
6155 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
6156 (win32_EnumProcessModules, win32_GetModuleInformation)
6157 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
6158 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
6159 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
6160 (win32_Module32First, win32_Module32Next, load_toolhelp)
6161 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
6162 (get_child_debug_event): Handle DLL events.
6163 (win32_wait): Likewise.
6164
0d37add9
DJ
61652007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
6166
6167 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
6168 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
6169
45e2715e
PA
61702007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
6171
6172 * win32-low.c (handle_output_debug_string): Ignore event if not
6173 waiting.
6174
c5674cf1
PA
61752007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
6176
6177 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
6178
2bbe3cc1
DJ
61792007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
6180
6181 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
6182
ae13219e
DJ
61832007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
6184
6185 * inferiors.c (change_inferior_id): Add comment.
6186 * linux-low.c (check_removed_breakpoint): Add an early
6187 prototype. Improve debug output.
6188 (linux_attach): Doc update.
6189 (linux_detach_one_process, linux_detach): Clean up before releasing
6190 each process.
6191 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
6192 * linux-low.h (struct process_info): Doc improvement.
6193 * mem-break.c (delete_all_breakpoints): New.
6194 * mem-break.h (delete_all_breakpoints): New prototype.
6195 * thread-db.c (find_first_thread): New.
6196 (thread_db_create_event): Call it instead of
6197 thread_db_find_new_threads. Clean up unused variables.
6198 (maybe_attach_thread): Remove first thread handling.
6199 (thread_db_find_new_threads): Use find_first_thread.
6200 (thread_db_get_tls_address): Likewise.
6201
4105de34
DJ
62022007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
6203
6204 * thread-db.c (thread_db_find_new_threads): Add prototype.
6205 (thread_db_create_event): Check for the main thread before adding
6206 a new thread.
6207 (maybe_attach_thread): Only enable event reporting if TID == 0.
6208 (thread_db_get_tls_address): Check for new threads.
6209
2b876972
DJ
62102007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
6211
6212 * linux-low.c (linux_create_inferior): Try execv before execvp.
6213 * spu-low.c (spu_create_inferior): Likewise.
6214
7a245884
DJ
62152007-06-13 Mike Frysinger <vapier@gentoo.org>
6216
6217 * linux-low.c (linux_create_inferior): Change execv to execvp.
6218 * spu-low.c (spu_create_inferior): Likewies.
6219
117ce543
DJ
62202007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
6221
6222 * Makefile.in (clean): Clean new files instead of deleted ones.
6223 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
6224 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
6225 rules.
6226 * configure.srv: Specify XML files and new regformats for MIPS and
6227 MIPS64 GNU/Linux.
6228 * linux-mips-low.c (mips_num_regs): Set to only used registers.
6229 (mips_regmap): Do not fetch $0. Remove unused registers. Add
6230 an entry for the restart register.
6231 (mips_cannot_fetch_register, mips_cannot_store_register)
6232 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
6233 register names to match the XML descriptions.
6234 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
6235 restart register instead of $0.
6236
0e7f50da
UW
62372007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
6238 Markus Deuling <deuling@de.ibm.com>
6239
6240 * remote-utils.c (decode_xfer_write): New function.
6241 * server.h (decode_xfer_write): Add prototype.
6242 * server.c (handle_query): Add PACKET_LEN argument. Support
6243 qXfer:spu:read and qXfer:spu:write packets.
6244 (main): Pass packet_len to handle_query.
6245 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
6246 * target.h (target_ops): Add qxfer_spu.
6247
374c1d38
UW
62482007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
6249
6250 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
6251 accessing non-seekable spufs files.
6252
bb63802a
UW
62532007-05-16 Markus Deuling <deuling@de.ibm.com>
6254
889bf7c5 6255 * server.c (handle_query): Add reply for qC packet.
bb63802a 6256
7390519e
PA
62572007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
6258 Leo Zayas <lerele@champenstudios@com>
6259
6260 * server.h (check_remote_input_interrupt_request): New function.
6261 * remote_utils.c (INVALID_DESCRIPTOR): New define.
6262 (remote_desc): Initialize with INVALID_DESCRIPTOR.
6263 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
6264 (check_remote_input_interrupt_request): New function.
6265 * server.h (check_remote_input_interrupt_request): Declare.
3ecf0694 6266 * win32-low.c (winapi_DebugBreakProcess,
7390519e
PA
6267 winapi_GenerateConsoleCtrlEvent): New typedefs.
6268 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
6269 to 250 ms.
6270 (win32_wait): Check for remote interrupt request
6271 with check_remote_input_interrupt_request.
6272 (win32_request_interrupt): New function.
6273 (win32_target_op): Set request_interrupt to win32_request_interrupt.
6274
34b34921
PA
62752007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
6276
6277 * win32-low.c (debug_registers_changed,
6278 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
6279 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
6280 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
6281 (thread_rec): Get context using the low target.
6282 (child_add_thread): Call thread_added on the low target,
6283 which does the same thing.
6284 (regptr): Delete.
6285 (do_initial_child_stuff): Remove debug registers references.
6286 Set context using the low target. Resume threads after
6287 setting the contexts.
6288 (child_continue): Remove dead variable. Remove debug
6289 registers references.
6290 (child_fetch_inferior_registers): Go through the low target.
6291 (do_child_store_inferior_registers): Remove.
6292 (child_store_inferior_registers): Go through the low target.
6293 (win32_resume): Remove debug registers references.
6294 Set context using the low target.
6295 (handle_exception): Change return type to void. Don't record
6296 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
6297 first chance exception.
889bf7c5 6298 (get_child_debug_event): Change return type to void. Remove
34b34921
PA
6299 goto loop. Always return after waiting for debug event.
6300 (win32_wait): Convert to switch statement. Handle spurious
6301 events.
6302
6303 * win32-i386-low.c (debug_registers_changed,
6304 debug_registers_used): New.
6305 (initial_stuff): Rename to ...
6306 (i386_initial_stuff): ... this. Clear debug registers
6307 state variables.
6308 (store_debug_registers): Delete.
6309 (i386_get_thread_context): New.
6310 (load_debug_registers): Delete.
6311 (i386_set_thread_context): New.
6312 (i386_thread_added): New.
6313 (single_step): Rename to ...
6314 (i386_single_step): ... this.
6315 (do_fetch_inferior_registers): Rename to ...
6316 (i386_fetch_inferior_register): ... this.
6317 (i386_store_inferior_register): New.
6318 (the_low_target): Adapt to new interface.
6319
6320 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
6321 (arm_get_thread_context): New.
6322 (arm_set_thread_context): New.
6323 (regptr): New.
6324 (do_fetch_inferior_registers): Rename to ...
6325 (arm_fetch_inferior_register): ... this.
6326 (arm_store_inferior_register): New.
6327 (arm_wince_breakpoint): Reimplement as unsigned long.
6328 (arm_wince_breakpoint_len): Define.
6329 (the_low_target): Adapt to new interface.
6330
6331 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
6332 load_debug_registers. Add get_thread_context, set_thread_context,
6333 thread_added and store_inferior_register. Rename
6334 fetch_inferior_registers to fetch_inferior_register.
6335 (regptr): Remove declaration.
6336
dd6953e1
PA
63372007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
6338
6339 * linux-low.c (linux_detach): Change return type to int. Return 0.
6340 * spu-low.c (spu_detach): Likewise.
6341
444d6139
PA
63422007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
6343
6344 * target.h (target_ops): Change return type of detach to int.
6345 Add join.
6346 (join_inferior): New.
6347 * server.c (main): Don't skip detach support on mingw32.
6348 If the inferior doesn't support detaching return error.
6349 Call join_inferior instead of using waitpid.
6350 * linux-low.c (linux_join): New.
6351 (linux_target_op): Add linux_join.
6352 * spu-low.c (spu_join): New.
6353 (spu_target_ops): Add spu_join.
6354 * win32-low.c (win32_detach): Adapt to new interface.
6355 Reopen current_process_handle before detaching. Issue a child
6356 resume before detaching.
6357 (win32_join): New.
6358 (win32_target_op): Add win32_join.
6359
1d5315fe
PA
63602007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
6361
6362 * win32-low.c (win32-attach): Fix return value.
6363 * target.h (target_ops): Describe ATTACH return values.
6364
bf914831
PA
63652007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
6366
6367 * win32-low.c (GETPROCADDRESS): Define.
6368 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
6369 (winapi_DebugSetProcessKillOnExit): Likewise.
6370 (win32_create_inferior): Force usage of ansi CreateProcessA.
6371 (win32_attach): Use GETPROCADDRESS.
6372 (win32_detach): Likewise.
6373
f72f3e60
PA
63742007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
6375
6376 * win32-low.c (win32_wait): Don't use WSTOPSIG.
6377
ed50f18f
PA
63782007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
6379
6380 * win32-low.c: Commit leftover changes from 2007-03-29.
6381
0c2ead7e
DJ
63822007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
6383
6384 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
6385 fields short instead of int. Add explicit padding.
6386 (i387_cache_to_fsave): Remove unnecessary casts.
6387 (i387_fsave_to_cache): Doc fix.
6388 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
6389
73725ff3
DJ
63902007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
6391
6392 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
6393 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
6394
d99f33d8
PA
63952007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
6396
6397 * configure.srv (arm*-*-mingw32ce*): Move near the other
6398 arm targets.
6399
68070c10
PA
64002007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
6401
2482afc6 6402 * configure.ac: Add errno checking.
68070c10
PA
6403 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
6404 sys/file.h and malloc.h.
6405 (AC_CHECK_DECLS): Add perror.
6406 (srv_mingwce): Handle.
2482afc6 6407 * configure.srv (i[34567]86-*-cygwin*): Add
68070c10
PA
6408 win32-i386-low.o to srv_tgtobj.
6409 (i[34567]86-*-mingw*): Likewise.
6410 (arm*-*-mingw32ce*): Add case.
6411 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
6412 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
6413 [__MINGW32CE__] (strerror): New function.
6414 [__MINGW32CE__] (errno): Define to GetLastError.
6415 [__MINGW32CE__] (COUNTOF): New macro.
6416 (remote_open): Remove extra close call.
6417 * mem-break.c (delete_breakpoint_at): New function.
6418 * mem-break.h (delete_breakpoint_at): Declare.
6419 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
6420 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
6421 [USE_WIN32API] (read, write): Add char* casts.
6422 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
6423 * server.h: Include wincecompat.h on Windows CE.
6424 [HAVE_ERRNO_H]: Check.
6425 (perror): Declare if not declared.
6426 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
6427 (perror_with_name): Remove errno declaration.
6428 * wincecompat.h: New.
6429 * wincecompat.c: New.
6430 * win32-low.h: New.
6431 * win32-arm-low.c: New.
6432 * win32-i386-low.c: New.
6433 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
6434 (OUTMSG2): Make it safe.
6435 (_T): New macro.
6436 (COUNTOF): New macro.
6437 (NUM_REGS): Get it from the low target.
6438 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
6439 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
6440 (thread_rec): Let low target handle debug registers.
6441 (child_add_thread): Likewise.
6442 (child_init_thread_list): Likewise.
6443 (continue_one_thread): Likewise.
6444 (regptr): New.
6445 (do_child_fetch_inferior_registers): Move to ...
6446 * win32-i386-low.c: ... here, and rename to ...
6447 (do_fetch_inferior_registers): ... this.
889bf7c5 6448 * win32-low.c (child_fetch_inferior_registers):
68070c10
PA
6449 Go through the low target.
6450 (do_child_store_inferior_registers): Use regptr.
6451 (strwinerror): New function.
6452 (win32_create_inferior): Handle Windows CE.
6453 Use strwinerror instead of strerror on Windows error
6454 codes. Add program to the error output.
6455 Don't close the main thread handle on Windows CE.
6456 (win32_attach): Use coredll.dll on Windows CE.
6457 (win32_kill): Close current process and current
6458 thread handles.
6459 (win32_detach): Use coredll.dll on Windows CE.
6460 (win32_resume): Let low target handle debug registers, and
6461 step request.
6462 (handle_exception): Add/Remove initial breakpoint. Avoid
6463 non-existant WSTOPSIG on Windows CE.
6464 (win32_read_inferior_memory): Cast to remove warning.
6465 (win32_arch_string): Go through the low target.
6466 (initialize_low): Call set_breakpoint_data with the low
6467 target's breakpoint.
6468 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
6469 FOP_REGNUM, mappings): Move to ...
6470 * win32-i386-low.c: ... here.
6471 * win32-low.c (win32_thread_info): Move to ...
6472 * win32-low.h: ... here.
6473 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
6474 win32-arm-low.c and wincecompat.c.
6475 (all:): Add $EXEEXT.
6476 (install-only:): Likewise.
6477 (gdbserver:): Likewise.
6478 (gdbreplay:): Likewise.
6479 * config.in: Regenerate.
6480 * configure: Regenerate.
6481
41093d81
PA
64822007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
6483
6484 * win32-low.c: Rename typedef thread_info to
6485 win32_thread_info throughout.
6486
544afa54
PA
64872007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
6488
6489 * win32-i386-low.c: Rename to ...
6490 * win32-low.c: ... this.
6491 * configure.srv: Replace win32-i386-low.o with win32-low.o.
6492 * Makefile.in: Likewise.
6493
bce7165d
PA
64942007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
6495
6496 * remote-utils.c (monitor_output): Constify msg parameter.
6497 * server.h (monitor_output): Likewise.
6498 * win32-i386-low.c (handle_output_debug_string): New.
6499 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
6500 handle_output_debug_string.
6501 (get_child_debug_event): Likewise.
6502
506c7aa0
DJ
65032007-03-27 Mat Hostetter <mat@lcs.mit.edu>
6504
6505 * server.c (main): Correct strtoul check.
6506
42c81e2a
DJ
65072007-03-27 Jon Ringle <jon@ringle.org>
6508
6509 * linux-low.c: Check __ARCH_HAS_MMU__ also.
6510
9453113a
DJ
65112007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
6512
6513 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
6514
64a69107
DJ
65152007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
6516
6517 * terminal.h: Check HAVE_SGTTY_H.
6518
65192007-02-27 Mat Hostetter <mat@lcs.mit.edu>
6f8486da
DJ
6520
6521 * remote-utils.c (remote_open): Print out the assigned port number.
6522
c74d0ad8
DJ
65232007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
6524
6525 * remote-utils.c (monitor_output): New function.
6526 * server.c (debug_threads): Define here.
6527 (monitor_show_help): New function.
6528 (handle_query): Handle qRcmd.
6529 (main): Do not handle 'd' packet.
6530 * server.h (debug_threads, remote_debug, monitor_output): Declare.
6531 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
6532 of debug_threads.
6533
de7c3b4a
PA
65342007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
6535
6536 * Makefile.in (EXEEXT): New.
6537 (clean): Use $(EXEEXT).
6538
ef57601b
PA
65392007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
6540
6541 * target.h (target_ops): Rename send_signal to request_interrupt,
6542 and remove enum target_signal parameter.
6543 * linux-low.c (linux_request_interrupt): Rename from
6544 linux_send_signal, and always send SIGINT.
6545 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
6546 and always send SIGINT.
6547 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
6548 of send_signal.
6549 (input_interrupt): Likewise.
6550
820f2bda
PA
65512007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
6552
6553 * server.c (get_features_xml): Check if target implemented
6554 arch_string.
6555 * win32-i386-low.c (win32_arch_string): New.
6556 (win32_target_ops): Add win32_arch_string as arch_string member.
6557
ab39bf24
UW
65582007-02-22 Markus Deuling <deuling@de.ibm.com>
6559
6560 * spu-low.c (spu_arch_string): New.
6561 (spu_target_ops): Add spu_arch_string.
6562
61ff6e04
DJ
65632007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
6564
6565 * remote-utils.c: Remove HAVE_TERMINAL_H check.
6566 * configure.ac: Do not check for terminal.h.
6567 * configure, config.in: Regenerated.
6568
fb1e4ffc
DJ
65692007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
6570
6571 * Makefile.in (OBS): Add $(XML_BUILTIN).
6572 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
6573 (clean): Update.
6574 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
6575 (arm-with-iwmmxt.c): New.
6576 * config.in, configure: Regenerate.
6577 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
6578 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
6579 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
6580 (arm*-*-linux*): Add iWMMXt and regset support.
6581 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
6582 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
6583 (arm_store_wmmxregset, target_regsets): New.
6584 * server.c (get_features_xml): Take annex argument. Check builtin
6585 XML documents.
6586 (handle_query): Handle multiple annexes.
6587
0f48aa01
DJ
65882007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
6589
6590 * remote-utils.c [USE_WIN32API] (read, write): Define.
6591 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
6592 write.
6593
23181151
DJ
65942007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
6595
6596 * linux-i386-low.c (the_low_target): Set arch_string.
6597 * linux-x86-64-low.c (the_low_target): Likewise.
6598 * linux-low.c (linux_arch_string): New.
6599 (linux_target_ops): Add it.
6600 * linux-low.h (struct linux_target_ops): Add arch_string.
6601 * server.c (write_qxfer_response): Use const void * for DATA.
6602 (get_features_xml): New.
6603 (handle_query): Handle qXfer:features:read. Report it for qSupported.
6604 * target.h (struct target_ops): Add arch_string method.
6605
9d606399
DJ
66062007-01-03 Denis Pilat <denis.pilat@st.com>
6607 Daniel Jacobowitz <dan@codesourcery.com>
6608
6609 * linux-low.c (linux_kill): Handle being called with no threads.
6610 * win32-i386-low.c (win32_kill): Likewise.
6611 (get_child_debug_event): Clear current_process_handle.
6612
66132006-12-30 Denis PILAT <denis.pilat@st.com>
8264bb58
DJ
6614 Daniel Jacobowitz <dan@codesourcery.com>
6615
6616 * remote-utils.c (remote_open): Check the type of specified
6617 serial port devices before opening them.
6618 * server.c (main): Kill the inferior if an error occurs during
6619 the first remote_open.
6620
a5e13d24
DJ
66212006-12-05 Markus Deuling <deuling@de.ibm.com>
6622
6623 * README: Update supported targets.
6624
186947f7
DJ
66252006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
6626
6627 * Makefile.in (clean): Remove reg-mips64.c.
6628 (reg-mips64.c, reg-mips64.o): New rules.
6629 * configure.srv: Handle mips64. Include regset support for mips.
6630 * linux-mips-low.c (union mips_register): New.
6631 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
6632 (mips_breakpoint, mips_breakpoint_at): Use int.
6633 (mips_collect_register, mips_supply_register)
6634 (mips_collect_register_32bit, mips_supply_register_32bit)
6635 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
6636 (mips_store_fpregset, target_regsets): New.
6637 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
6638
a13e2c95
UW
66392006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
6640
6641 * configure.srv: Add target "spu*-*-*".
6642 * Makefile.in (clean): Remove reg-spu.c.
6643 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
6644 * spu-low.c: New file.
6645
cb7283db
DJ
66462006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
6647
6648 * configure.ac: Correct td_thr_tls_get_addr test.
6649 * configure: Regenerated.
6650
89be2091
DJ
66512006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
6652
6653 * linux-low.c (linux_wait_for_event): Reformat. Use the
6654 pass_signals array.
6655 * remote-utils.c (decode_address_to_semicolon): New.
6656 * server.c (pass_signals, handle_general_set): New.
6657 (handle_query): Mention QPassSignals for qSupported.
6658 (main): Call handle_general_set.
6659 * server.h (pass_signals, decode_address_to_semicolon): New.
6660
000ef4f0
DJ
66612006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
6662
6663 * server.c (handle_query): Correct error handling for read_auxv.
6664
b7149293
UW
66652005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
6666
6667 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
6668 and srv_linux_thread_db to yes.
6669 * linux-s390-low.c (s390_fill_gregset): New function.
6670 (target_regsets): Define data structure.
6671
dae5f5cf
DJ
66722006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
6673
6674 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
6675 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
6676 * config.in, configure: Regenerated.
6677 * inferiors.c (gdb_id_to_thread): New function.
6678 (gdb_id_to_thread_id): Use it.
6679 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
6680 * linux-low.h (struct process_info): Add th member.
6681 (thread_db_get_tls_address): New prototype.
6682 * remote-utils.c (decode_address): Make non-static.
6683 * server.c (handle_query): Handle qGetTLSAddr.
6684 * server.h (gdb_id_to_thread, decode_address): New prototypes.
6685 * target.h (struct target_ops): Add get_tls_address.
6686 * thread-db.c (maybe_attach_thread): Save the thread handle.
6687 (thread_db_get_tls_address): New.
6688
32ca6d61
DJ
66892006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
6690
6691 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
6692 (linux_resume_one_process): Take a siginfo_t *. Update all
6693 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
6694 (struct pending_signals): Add a siginfo_t.
6695 (linux_wait_for_process): Always set last_status.
6696 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
6697 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
6698 * linux-low.h (struct process_info): Add last_status.
6699
5ffff7c1
DJ
67002006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
6701
6702 * remote-utils.c (try_rle): New function.
6703 (putpkt_binary): Use it.
6704
8695c747
DJ
67052006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
6706
6707 * Makefile.in (clean): Clean reg-x86-64-linux.c.
6708 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
6709 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
6710 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
6711 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
6712 point registers.
6713
290fadea
RS
67142006-08-08 Richard Sandiford <richard@codesourcery.com>
6715
6716 * server.c (terminal_fd): New variable.
6717 (old_foreground_pgrp): Likewise.
6718 (restore_old_foreground_pgrp): New function.
6719 (start_inferior): Record the terminal file descriptor in terminal_fd
6720 and its original foreground group in old_foreground_pgrp. Register
6721 restore_old_foreground_pgrp with atexit().
6722
9f2e1e63
DJ
67232006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
6724
6725 * server.c (handle_query): Correct qPart to qXfer.
6726
b80864fb
DJ
67272006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
6728
6729 * configure.ac: Check for more headers which are missing on
6730 Windows. Automatically supply -lwsock32 and USE_WIN32API.
6731 * configure.srv: Add Cygwin and mingw32.
6732 * remote-utils.c: Don't include headers unconditionally which
6733 are missing on mingw32. Include <winsock.h> for mingw32.
6734 (remote_open): Adjust for mingw32 support. Flush
6735 standard error after writing to it.
6736 (remote_close, putpkt_binary, input_interrupt, block_async_io)
6737 (unblock_async_io, enable_async_io, disable_async_io)
6738 (readchar, getpkt): Update for Winsock support.
6739 (prepare_resume_reply): Expect a protocol signal number.
6740 * server.c: Disable <sys/wait.h> on mingw32.
6741 (start_inferior): Adjust for mingw32 support. Flush
6742 standard error after writing to it.
6743 (attach_inferior): Likewise. Use protocol signal
6744 numbers.
6745 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
6746 and names.
6747 * win32-i386-low.c: New file.
6748 * Makefile.in (XM_CLIBS): Set.
6749 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
6750 (win32-i386-low.o): New dependency rule.
6751 * linux-low.c (linux_wait): Use target signal numbers.
6752 * target.h (struct target_ops): Doc fix.
6753 * server.h (target_signal_to_name): New prototype.
6754 * gdbreplay.c: Don't include headers unconditionally which
6755 are missing on mingw32. Include <winsock.h> for mingw32.
6756 (remote_close, remote_open): Adjust for Winsock support.
6757 * configure, config.in: Regenerated.
6758
0876f84a
DJ
67592006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
6760
6761 * server.c (decode_xfer_read, write_qxfer_response): New.
6762 (handle_query): Take a packet length argument. Handle
6763 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
6764 the qSupported response.
6765 (main): Update call to handle_query.
6766
01f9e8fa
DJ
67672006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
6768
6769 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
6770 (putpkt_binary): Renamed from putpkt and adjusted for binary
6771 data.
6772 (putpkt): New wrapper for putpkt_binary.
6773 (readchar): Don't mask off the high bit.
6774 (decode_X_packet): New function.
6775 * server.c (main): Call putpkt_binary if a handler sets the packet
6776 length. Save the length of the incoming packet. Handle 'X'.
6777 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
6778
be2a5f71
DJ
67792006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
6780
6781 * server.c (handle_query): Handle qSupported.
6782
ea025f5f
DJ
67832006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
6784
6785 * remote-utils.c (all_symbols_looked_up): New variable.
6786 (look_up_one_symbol): Check it.
6787 * server.h (look_up_one_symbol): New declaration.
6788 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
6789
9308fc88
DJ
67902006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
6791
6792 * Makefile.in (linux-arm-low.o): Update dependencies.
66f338c7 6793 * linux-arm-low.c: Include "gdb_proc_service.h".
9308fc88
DJ
6794 (PTRACE_GET_THREAD_AREA): Define.
6795 (ps_get_thread_area): New function.
6796
52fb6437
NS
67972006-05-09 Nathan Sidwell <nathan@codesourcery.com>
6798
6799 * configure.srv (m68k*-*-uclinux*): New target.
6800 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
6801 (linux_resume_one_process): Remove extraneous cast.
6802 (linux_read_offsets): New.
6803 (linux_target_op): Add linux_read_offsets on mmuless systems.
6804 * server.c (handle_query): Add qOffsets logic.
6805 * target.h (struct target_ops): Add read_offsets.
6806
21b0f40c
DJ
68072006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
6808
6809 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
6810 (PTRACE_GET_THREAD_AREA): Define.
6811 (ps_get_thread_area): New function.
6812 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
6813 (linux-x86-64-low.o): Update.
6814
0050a760
DJ
68152006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
6816
6817 * configure.ac: Remove checks for prfpregset_t.
6818 * gdb_proc_service.h: New file.
6819 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
6820 new "gdb_proc_service.h".
6821 * proc-service.c: Likewise.
6822 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
6823 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
6824 * Makefile.in (gdb_proc_service_h): Updated.
6825 * configure, config.in: Regenerated.
6826
b92a518e
DJ
68272006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
6828
6829 * remote-utils.c (prepare_resume_reply): Move declaration
6830 of gdb_id_from_wait to the top of the block.
6831
545587ee
DJ
68322006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
6833
6834 * linux-low.c (regsets_store_inferior_registers): Read the regset
6835 from the target before filling it.
6836
9db87ebd
DJ
68372006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
6838
6839 * server.c (attach_inferior): Return SIGTRAP for a successful
6840 attach.
6841
dd24457d
DJ
68422006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
6843
6844 * Makefile.in (OBS): Add version.o.
6845 (STAGESTUFF): Delete.
6846 (version.o): Add dependencies.
6847 (version.c): Replace rule.
6848 (clean): Remove version.c.
6849 * server.c (gdbserver_version): New.
6850 (gdbserver_usage): Use printf.
6851 (main): Handle --version and --help.
6852 * server.h (version, host_name): Add declarations.
6853
6f0f660e
EZ
68542005-12-23 Eli Zaretskii <eliz@gnu.org>
6855
889bf7c5
PA
6856 * linux-arm-low.c:
6857 * linux-arm-low.c:
6858 * inferiors.c:
6859 * i387-fp.h:
6860 * i387-fp.c:
6861 * gdbreplay.c:
6862 * regcache.c:
6863 * proc-service.c:
6864 * mem-break.h:
6865 * mem-break.c:
6866 * linux-x86-64-low.c:
6867 * linux-sh-low.c:
6868 * linux-s390-low.c:
6869 * linux-ppc64-low.c:
6870 * linux-ppc-low.c:
6871 * linux-mips-low.c:
6872 * linux-m68k-low.c:
6873 * linux-m32r-low.c:
6874 * linux-low.h:
6875 * linux-low.c:
6876 * linux-ia64-low.c:
6877 * linux-i386-low.c:
6878 * linux-crisv32-low.c:
6879 * thread-db.c:
6880 * terminal.h:
6881 * target.h:
6882 * target.c:
6883 * server.h:
6884 * server.c:
6885 * remote-utils.c:
6886 * regcache.h:
6887 * utils.c:
6888 * Makefile.in:
6889 * configure.ac:
6f0f660e
EZ
6890 * gdbserver.1: Add (C) after Copyright. Update the FSF
6891 address.
6892
9d1fb177
DJ
68932005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
6894
6895 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
6896 (arm_breakpoint_at): Recognize both breakpoints.
6897 (the_low_target): Use the correct breakpoint instruction.
6898
011a70c2
DJ
68992005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
6900
6901 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
6902 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
6903 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
6904 (the_low_target): Update.
6905
7fb85e41
AS
69062005-10-25 Andreas Schwab <schwab@suse.de>
6907
6908 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
6909
6910 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
6911 (ia64_num_regs): Reduce to 462.
6912
3db0444b
DJ
69132005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
6914
6915 * acinclude.m4: Correct quoting.
6916 * aclocal.m4: Regenerated.
6917
6918 Suggested by SZOKOVACS Robert <szo@ies.hu>:
6919 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
6920 (thread_db_init): Call thread_db_err_str.
6921 * configure.ac: Check for TD_VERSION.
6922 * config.in, configure: Regenerated.
6923
bee0189a
DJ
69242005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6925
6926 * server.h (error, fatal, warning): Add ATTR_FORMAT.
6927
e9d25b98
DJ
69282005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
6929
6930 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
6931 is not available. Define HAVE_PTRACE_GETREGS if it is.
6932 * config.in, configure: Regenerated.
6933 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
6934 * linux-i386-low.c, linux-m68k-low.c: Update to use
6935 HAVE_PTRACE_GETREGS.
6936 * linux-low.c (regsets_fetch_inferior_registers)
6937 (regsets_store_inferior_registers): Only return 0 if we processed
6938 GENERAL_REGS.
6939 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
6940 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
6941
a06660f7
DJ
69422005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
6943
6944 * inferiors.c (struct thread_info): Add gdb_id.
6945 (add_thread): Add gdb_id argument.
6946 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
6947 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
6948 calls to add_thread.
6949 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
6950 * server.c (handle_query): Use thread_to_gdb_id.
6951 (handle_v_cont, main): Use gdb_id_to_thread_id.
6952 * server.h (add_thread): Update prototype.
6953 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
6954 prototypes.
6955
5a1f5858
DJ
69562005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
6957
6958 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
6959 left-padded registers.
6960 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
6961 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
6962
e122f1f5
SE
69632005-07-01 Steve Ellcey <sje@cup.hp.com>
6964
6965 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
6966 * configure: Regenerate.
6967 * config.in: Regenerate.
6968 * server.h (NEED_DECLARATION_STRERROR):
6969 Replace with !HAVE_DECL_STRERROR.
6970
d592fa2f
DJ
69712005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
6972
6973 * linux-low.c (linux_wait, linux_send_signal): Don't test
6974 an unsigned long variable for > 0 if it could be MAX_ULONG.
6975 * server.c (myresume): Likewise.
6976 * target.c (set_desired_inferior): Likewise.
6977
ccbd4912
MK
69782005-06-13 Mark Kettenis <kettenis@gnu.org>
6979
6980 * configure.ac: Simplify and improve check for socklen_t.
6981 * configure, config.in: Regenerate.
6982
f450004a
DJ
69832005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
6984
6985 * acconfig.h: Remove.
6986 * configure.ac: Add a test for socklen_t. Use three-argument
6987 AC_DEFINE throughout.
6988 * config.in: Regenerated using autoheader 2.59.
6989 * configure: Regenerated.
6990
6991 * gdbreplay.c (socklen_t): Provide a default.
6992 (remote_open): Use socklen_t.
6993 * remote-utils.c (socklen_t): Provide a default.
6994 (remote_open): Use socklen_t.
6995 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
6996 unsigned char.
6997
6998 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
6999 char for buffers.
7000 * linux-low.c (linux_read_memory, linux_write_memory)
7001 (linux_read_auxv): Likewise.
7002 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
7003 (check_mem_write): Likewise.
7004 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
7005 Likewise.
7006 * regcache.c (struct inferior_rgcache_data, registers_to_string)
7007 (registers_from_string, register_data): Likewise.
7008 * server.c (handle_query, main): Likewise.
7009 * server.h (convert_ascii_to_int, convert_int_to_ascii)
7010 (decode_M_packet): Likewise.
7011 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
7012 * target.h (struct target_ops): Update read_memory, write_memory,
7013 and read_auxv.
7014 (read_inferior_memory, write_inferior_memory): Update.
7015 * linux-low.h (struct linux_target_ops): Change type of breakpoint
7016 to unsigned char *.
7017 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
7018 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
7019 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
7020 linux-s390-low.c, linux-sh-low.c: Update for changes in
7021 read_inferior_memory and the_low_target->breakpoint.
7022
eee84df1
DJ
70232005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
7024
7025 * Makefile.in (SFILES): Add linux-ppc64-low.c.
7026 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
7027 * configure.srv: Add powerpc64-*-linux*.
7028 * linux-ppc64-low.c: New file.
7029
45b134e5
OF
70302005-05-23 Orjan Friberg <orjanf@axis.com>
7031
7032 * linux-cris-low.c: New file with support for CRIS.
7033 * linux-crisv32-low.c: Ditto for CRISv32.
7034 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
7035 (clean): Add reg-cris.c and reg-crisv32.c.
889bf7c5 7036 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
45b134e5
OF
7037 reg-crisv32.o, and reg-crisv32.c to make rules.
7038 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
7039 recognized targets.
7040
48d93c75
UW
70412005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
7042
7043 * linux-low.c (fetch_register): Ensure buffer size is a multiple
7044 of sizeof (PTRACE_XFER_TYPE).
7045 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
7046
e013ee27
OF
70472005-05-12 Orjan Friberg <orjanf@axis.com>
7048
889bf7c5 7049 * target.h (struct target_ops): Add insert_watchpoint,
e013ee27
OF
7050 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
7051 pointers for hardware watchpoint support.
7052 * linux-low.h (struct linux_target_ops): Ditto.
7053 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
7054 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
7055 to linux_target_ops.
7056 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
7057 reply packet.
7058 * server.c (main): Recognize 'Z' and 'z' packets.
7059
b0ded00b
UW
70602005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
7061
7062 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
7063 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
7064 (the_low_target): Add new members.
7065
8643e2ad
DJ
70662005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
7067
7068 * proc-service.c (ps_lgetregs): Search all_processes instead of
7069 all_threads.
7070
fc620387
DJ
70712005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
7072
7073 * server.c (start_inferior): Change return type to int.
7074 (attach_inferior): Change sigptr to int *.
7075 (handle_v_cont, handle_v_requests): Change signal to int *.
7076 (main): Change signal to int.
7077
70782005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
7cfbc4a0
KI
7079
7080 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
7081 * configure.srv: Add m32r*-*-linux*.
7082 * linux-m32r-low.c: New file.
7083
e0e76420
DJ
70842005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
7085
7086 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
7087
a1928bad
DJ
70882005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
7089
7090 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
7091 Take unsigned long arguments for PIDs.
7092 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
7093 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
7094 (wait_for_sigstop, linux_resume_one_process)
7095 (regsets_fetch_inferior_registers, linux_send_signal)
7096 (linux_read_auxv): Likewise. Update the types of variables holding
7097 PIDs. Update format string specifiers.
7098 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
7099 * remote-utils.c (prepare_resume_reply): Likewise.
7100 * server.c (cont_thread, general_thread, step_thread)
7101 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
7102 unsigned long.
7103 (handle_query): Update format specifiers.
7104 (handle_v_cont, main): Use strtoul for thread IDs.
7105 * server.h (struct inferior_list_entry): Use unsigned long for ID.
7106 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
7107 (general_thread, step_thread, thread_from_wait)
7108 (old_thread_from_wait): Update.
7109 * target.h (struct thread_resume): Use unsigned long for THREAD.
7110 (struct target_ops): Use unsigned long for arguments to attach and
7111 thread_alive.
7112
dcdb98d2
DJ
71132005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
7114
7115 * acinclude.m4: Include bfd/bfd.m4 directly.
7116 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
7117 <agriffis@toolchain.org>.
7118 * aclocal.m4, configure: Regenerated.
7119
bec39cab
AC
71202005-01-07 Andrew Cagney <cagney@gnu.org>
7121
7122 * configure.ac: Rename configure.in, require autoconf 2.59.
7123 * configure: Re-generate.
7124
434c4c77
DJ
71252004-12-08 Daniel Jacobowitz <dan@debian.org>
7126
7127 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
7128 LIBS when finished.
7129 * aclocal.m4: Regenerated.
7130 * configure: Regenerated.
7131
db1d3e1b
AS
71322004-11-21 Andreas Schwab <schwab@suse.de>
7133
7134 * linux-m68k-low.c (m68k_num_gregs): Define.
7135 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
7136 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
7137 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
7138 (m68k_breakpoint_at): New. Add to the_low_target.
7139
7140 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
7141 srv_linux_thread_db to yes.
7142
43360365
JB
71432004-10-20 Joel Brobecker <brobecker@gnat.com>
7144
7145 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
7146 (ARCH_SET_FS): Likewise.
7147 (ARCH_GET_FS): Likewise.
7148 (ARCH_GET_GS): Likewise.
7149
fd500816
DJ
71502004-10-16 Daniel Jacobowitz <dan@debian.org>
7151
7152 * linux-i386-low.c (ps_get_thread_area): New.
7153 * linux-x86-64-low.c (ps_get_thread_area): New.
7154 * linux-low.c: Include <sys/syscall.h>.
7155 (linux_kill_one_process): Don't kill the first thread here.
7156 (linux_kill): Kill the first thread here.
7157 (kill_lwp): New function.
7158 (send_sigstop, linux_send_signal): Use it.
7159 * proc-service.c: Clean up #ifdefs.
7160 (fpregset_info): Delete.
7161 (ps_lgetregs): Update and enable implementation.
7162 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
7163 implementations.
7164 * remote-utils.c (struct sym_cache, symbol_cache): New.
7165 (input_interrupt): Print a clearer message.
7166 (async_io_enabled): New variable.
7167 (enable_async_io, disable_async_io): Use it. Update comments.
7168 (look_up_one_symbol): Use the symbol cache.
7169 * thread-db.c (thread_db_look_up_symbols): New function.
7170 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
7171
f6de3c42
DJ
71722004-10-16 Daniel Jacobowitz <dan@debian.org>
7173
7174 * configure.in: Test for -rdynamic.
7175 * configure: Regenerated.
7176 * Makefile (INTERNAL_LDFLAGS): New.
7177 (gdbserver, gdbreplay): Use it.
7178
2c0fc042
AC
71792004-09-02 Andrew Cagney <cagney@gnu.org>
7180
7181 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
7182
075b3282
DJ
71832004-03-23 Daniel Jacobowitz <drow@mvista.com>
7184
7185 * linux-low.c (linux_wait): Clear all_processes list also.
7186
fa6a77dc
DJ
71872004-03-12 Daniel Jacobowitz <drow@mvista.com>
7188
7189 * linux-low.c: Include <errno.h>. Remove extern declaration of
7190 errno.
7191
6d782a97
DJ
71922004-03-12 Daniel Jacobowitz <drow@mvista.com>
7193
7194 * gdbreplay.c, server.h, utils.c: Update copyright years.
7195
3a7fb99b
DJ
71962004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
7197
7198 * server.c (main): Print child status or termination signal from
7199 variable 'signal', not 'sig'.
7200
c3e735a6
DJ
72012004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
7202
7203 * linux-low.c (linux_read_memory): Change return type to
7204 int. Check for and return error from ptrace().
7205 * target.c (read_inferior_memory): Change return type to int. Pass
7206 back return status from the_target->read_memory().
7207 * target.h (struct target_ops): Adapt *read_memory() prototype.
7208 Update comment.
7209 (read_inferior_memory): Adapt prototype.
7210 * server.c (main): Return an error packet if
7211 read_inferior_memory() returns an error.
7212
a59d1c82
DJ
72132004-03-04 Daniel Jacobowitz <drow@mvista.com>
7214
7215 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
7216 Unify with other clean targets.
7217
dc3f8883
DJ
72182004-02-29 Daniel Jacobowitz <drow@mvista.com>
7219
7220 * server.c (handle_v_cont): Call set_desired_inferior.
7221
89a208da
DJ
72222004-02-29 Daniel Jacobowitz <drow@mvista.com>
7223
7224 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
7225
62ea82f5
DJ
72262004-02-29 Daniel Jacobowitz <drow@mvista.com>
7227
7228 * linux-low.c (linux_wait): Unblock async I/O.
7229 (linux_resume): Block and enable async I/O.
7230 * remote-utils.c (block_async_io, unblock_async_io): New functions.
7231 * server.h (block_async_io, unblock_async_io): Add prototypes.
7232
6910d122
DJ
72332004-02-29 Daniel Jacobowitz <drow@mvista.com>
7234
7235 * remote-utils.c (remote_open): Print a status notice after
7236 opening a TCP port.
7237 * server.c (attach_inferior): Print a status notice after
7238 attaching.
7239
72402004-02-29 Daniel Jacobowitz <drow@mvista.com>
d677d77d
DJ
7241
7242 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
7243
c89dc5d4
DJ
72442004-02-26 Daniel Jacobowitz <drow@mvista.com>
7245
7246 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
7247 error packet.
7248 * server.c, target.h: Update copyright years.
7249
4b8dad4a
RM
72502004-02-25 Roland McGrath <roland@redhat.com>
7251
7252 * target.h (struct target_ops): New member `read_auxv'.
7253 * server.c (handle_query): Handle qPart:auxv:read: query using that.
7254 * linux-low.c (linux_read_auxv): New function.
7255 (linux_target_ops): Initialize `read_auxv' member to that.
7256
d7446758
JB
72572004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
7258
7259 Committed by Jim Blandy <jimb@redhat.com>.
7260
7261 * linux-s390-low.c (s390_num_regs): Update.
4b8dad4a 7262 (s390_regmap): Remove control registers. Use __s390x__ predefine
d7446758
JB
7263 instead of GPR_SIZE to distiguish s390 and s390x targets.
7264
5544ad89
DJ
72652004-01-31 Daniel Jacobowitz <drow@mvista.com>
7266
7267 * linux-low.c: Update copyright year.
7268 (check_removed_breakpoint): Clear pending_is_breakpoint.
7269 (linux_set_resume_request, linux_queue_one_thread)
7270 (resume_status_pending_p): New functions.
7271 (linux_continue_one_thread): Use process->resume.
7272 (linux_resume): Only resume threads if there are no pending events.
7273 * linux-low.h (struct process_info): Add resume request
7274 pointer.
7275
2a68b70e
DJ
72762004-01-30 Daniel Jacobowitz <drow@mvista.com>
7277
7278 * regcache.c (new_register_cache): Clear the allocated register
7279 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
7280
64386c31
DJ
72812003-10-13 Daniel Jacobowitz <drow@mvista.com>
7282
7283 * linux-low.c (linux_resume): Take a struct thread_resume *
7284 argument.
7285 (linux_wait): Update call.
7286 (resume_ptr): New static variable.
7287 (linux_continue_one_thread): Renamed from
7288 linux_continue_one_process. Use resume_ptr.
7289 (linux_resume): Use linux_continue_one_thread.
7290 * server.c (handle_v_cont, handle_v_requests): New functions.
7291 (myresume): New function.
7292 (main): Handle 'v' case.
7293 * target.h (struct thread_resume): New type.
7294 (struct target_ops): Change argument of "resume" to struct
7295 thread_resume *.
7296 (myresume): Delete macro.
7297
c938e9b0
L
72982003-08-08 H.J. Lu <hongjiu.lu@intel.com>
7299
7300 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
7301 (uninstall): Support DESTDIR.
7302
7f313d07
BC
7303Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
7304
7305 * configure.srv: Add xscale*linux copy of arm*linux entry.
7306
3b2fc2ea
DJ
73072003-07-24 Daniel Jacobowitz <drow@mvista.com>
7308
7309 * linux-arm-low.c (arm_reinsert_addr): New function.
7310 (the_low_target): Add arm_reinsert_addr.
7311
1c0a559e
MK
73122003-07-08 Mark Kettenis <kettenis@gnu.org>
7313
7314 * mem-break.c: Remove whitespace at end of file.
7315
43d5792c
DJ
73162003-06-28 Daniel Jacobowitz <drow@mvista.com>
7317
7318 * configure.in: Check whether we need to prototype strerror.
7319 * server.h: Optionally prototype strerror.
7320 * gdbreplay.c (perror_with_name): Use strerror.
7321 * linux-low.c (linux_attach_lwp): Use strerror.
7322 * utils.c (perror_with_name): Use strerror.
7323 * config.in, configure: Regenerated.
7324
c8a86edf
DJ
73252003-06-28 Daniel Jacobowitz <drow@mvista.com>
7326
7327 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
7328 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
7329
73d37363
DJ
73302003-06-20 Daniel Jacobowitz <drow@mvista.com>
7331
7332 * Makefile.in (SFILES): Update.
7333 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
7334 low-sun3.c: Remove files.
7335
6ad8ae5c
DJ
73362003-06-17 Daniel Jacobowitz <drow@mvista.com>
7337
7338 * linux-low.c: Move comment to linux_thread_alive where it belonged.
7339 (linux_detach_one_process, linux_detach): New functions.
7340 (linux_target_ops): Add linux_detach.
7341 * server.c (main): Handle 'D' packet.
7342 * target.h (struct target_ops): Add "detach" member.
7343 (detach_inferior): Define.
7344
1581182a
MK
73452003-06-13 Mark Kettenis <kettenis@gnu.org>
7346
7347 From Kelley Cook <kelleycook@wideopenwest.com>:
7348 * configure.srv: Accept i[34567]86 variants.
7349
e5379b03
DJ
73502003-06-05 Daniel Jacobowitz <drow@mvista.com>
7351
7352 * linux-low.c (linux_wait_for_event): Correct comment typos.
7353 (linux_resume_one_process): Call check_removed_breakpoint.
7354 (linux_send_signal): New function.
7355 (linux_target_ops): Add linux_send_signal.
7356 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
7357 of kill.
7358 * target.h (struct target_ops): Add send_signal.
7359
2ff29de4
JB
73602003-05-29 Jim Blandy <jimb@redhat.com>
7361
7362 * linux-low.c (usr_store_inferior_registers): Transfer buf in
7363 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
7364 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
7365 away part of the register's value.
7366
254787d4
DJ
73672003-03-26 Daniel Jacobowitz <drow@mvista.com>
7368
7369 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
7370 (linux_wait_for_event, linux_init_signals): Likewise.
7371
94e10508
DJ
73722003-03-17 Daniel Jacobowitz <drow@mvista.com>
7373
7374 * configure.in: Check for stdlib.h.
7375 * configure: Regenerated.
7376 * config.in: Regenerated.
7377
4c0711e0
DJ
73782003-01-04 Andreas Schwab <schwab@suse.de>
7379
7380 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
7381
ef66e766
AC
73822003-01-02 Andrew Cagney <ac131313@redhat.com>
7383
7384 * Makefile.in: Remove obsolete code.
7385
a1358604
DJ
73862002-11-20 Daniel Jacobowitz <drow@mvista.com>
7387
7388 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
7389 defined(PT_FPR0_HI).
7390
23ce3b1c
DJ
73912002-11-17 Stuart Hughes <seh@zee2.com>
7392
7393 * linux-arm-low.c (arm_num_regs): Increase.
7394 (arm_regmap): Include status register.
7395
73962002-11-17 Daniel Jacobowitz <drow@mvista.com>
7397
7398 * linux-low.c (register_addr): Remove incorrect -1 check.
7399
a9fa9f7d
DJ
74002002-08-29 Daniel Jacobowitz <drow@mvista.com>
7401
7402 * linux-low.c (linux_create_inferior): Call setpgid. Return
7403 the new PID.
7404 (unstopped_p, linux_signal_pid): Remove.
7405 (linux_target_ops): Remove linux_signal_pid.
7406 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
7407 global instead of target method.
7408 * target.h (struct target_ops): Remove signal_pid. Update comment
7409 for create_inferior.
7410 * server.c (signal_pid): New variable.
7411 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
4b8dad4a 7412 gdbserver. Set the child to be the foreground process group.
a9fa9f7d
DJ
7413 (attach_inferior): Set signal_pid.
7414
17574093
DJ
74152002-08-23 Daniel Jacobowitz <drow@mvista.com>
7416
7417 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
7418
74192002-08-20 Jim Blandy <jimb@redhat.com>
7420
7421 * Makefile.in (LDFLAGS): Allow the configure script to establish a
7422 default for this.
7423
74242002-08-01 Andrew Cagney <cagney@redhat.com>
7425
7426 * Makefile.in: Make chill references obsolete.
7427
74282002-07-24 Kevin Buettner <kevinb@redhat.com>
7429
7430 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
7431 * configure: Regenerate.
7432 * config.in: Regenerate.
7433
74342002-07-09 David O'Brien <obrien@FreeBSD.org>
7435
7436 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
7437 (perror_with_name, remote_close, remote_open, expect, play): Static.
7438
74392002-07-04 Michal Ludvig <mludvig@suse.cz>
7440
4b8dad4a 7441 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17574093
DJ
7442 byte offsets instead of an array of indexes.
7443 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
7444
74452002-06-13 Daniel Jacobowitz <drow@mvista.com>
7446
7447 * regcache.c: Add comment.
7448
74492002-06-11 Daniel Jacobowitz <drow@mvista.com>
7450
7451 * thread-db.c: New file.
7452 * proc-service.c: New file.
7453 * acinclude.m4: New file.
7454 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
7455 proc-service.o, and thread-db.o.
7456 (linux-low.o): Add USE_THREAD_DB.
7457 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
7458 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
7459 * aclocal.m4: Regenerated.
7460 * config.in: Regenerated.
7461 * configure: Regenerated.
7462 * configure.in: Check for proc_service.h, sys/procfs.h,
7463 thread_db.h, and linux/elf.h headrs.
7464 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
7465 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
7466 Check for -lthread_db and thread support.
7467 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
7468 PowerPC, and SuperH.
7469 * i387-fp.c: Constify arguments.
7470 * i387-fp.h: Likewise.
7471 * inferiors.c: (struct thread_info): Renamed from
7472 `struct inferior_info'. Remove PID member. Use generic inferior
7473 list header. All uses updated.
7474 (inferiors, signal_pid): Removed.
7475 (all_threads): New variable.
7476 (get_thread): Define.
7477 (add_inferior_to_list): New function.
7478 (for_each_inferior): New function.
7479 (change_inferior_id): New function.
7480 (add_inferior): Removed.
7481 (remove_inferior): New function.
7482 (add_thread): New function.
7483 (free_one_thread): New function.
7484 (remove_thread): New function.
7485 (clear_inferiors): Use for_each_inferior and free_one_thread.
7486 (find_inferior): New function.
7487 (find_inferior_id): New function.
7488 (inferior_target_data): Update argument type.
7489 (set_inferior_target_data): Likewise.
7490 (inferior_regcache_data): Likewise.
7491 (set_inferior_regcache_data): Likewise.
7492 * linux-low.c (linux_bp_reinsert): Remove.
7493 (all_processes, stopping_threads, using_thrads)
7494 (struct pending_signals, debug_threads, pid_of): New.
7495 (inferior_pid): Replace with macro.
7496 (struct inferior_linux_data): Remove.
7497 (get_stop_pc, add_process): New functions.
7498 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
7499 Use add_process and add_thread.
7500 (linux_attach_lwp): New function, based on old linux_attach. Use
7501 add_process and add_thread. Set stop_expected for new threads.
7502 (linux_attach): New function.
7503 (linux_kill_one_process): New function.
7504 (linux_kill): Kill all LWPs.
7505 (linux_thread_alive): Use find_inferior_id.
7506 (check_removed_breakpoints, status_pending_p): New functions.
7507 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
7508 Update. Use WNOHANG. Wait for cloned processes also. Update process
7509 struct for the found process.
7510 (linux_wait_for_event): New function.
7511 (linux_wait): Use it. Support LWPs.
7512 (send_sigstop, wait_for_sigstop, stop_all_processes)
7513 (linux_resume_one_process, linux_continue_one_process): New functions.
7514 (linux_resume): Support LWPs.
7515 (REGISTER_RAW_SIZE): Remove.
7516 (fetch_register): Use register_size instead. Call supply_register.
7517 (usr_store_inferior_registers): Likewise. Call collect_register.
7518 Fix recursive case.
7519 (regsets_fetch_inferior_registers): Improve error message.
7520 (regsets_store_inferior_registers): Add debugging.
7521 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
7522 (unstopped_p, linux_signal_pid): New functions.
7523 (linux_target_ops): Add linux_signal_pid.
7524 (linux_init_signals): New function.
7525 (initialize_low): Call it. Initialize using_threads.
7526 * regcache.c (inferior_regcache_data): Add valid
7527 flag.
7528 (get_regcache): Fetch registers lazily. Add fetch argument
7529 and update all callers.
7530 (regcache_invalidate_one, regcache_invalidate): New
7531 functions.
7532 (new_register_cache): Renamed from create_register_cache.
7533 Return the new regcache.
7534 (free_register_cache): Change argument to a void *.
7535 (registers_to_string, registers_from_string): Call get_regcache
7536 with fetch flag set.
7537 (register_data): Make static. Pass fetch flag to get_regcache.
7538 (supply_register): Call get_regcache with fetch flag clear.
7539 (collect_register): Call get_regcache with fetch flag set.
7540 (collect_register_as_string): New function.
7541 * regcache.h: Update.
7542 * remote-utils.c (putpkt): Flush after debug output and use
7543 stderr.
7544 Handle input interrupts while waiting for an ACK.
7545 (input_interrupt): Use signal_pid method.
7546 (getpkt): Flush after debug output and use stderr.
7547 (outreg): Use collect_register_as_string.
7548 (new_thread_notify, dead_thread_notify): New functions.
7549 (prepare_resume_reply): Check using_threads. Set thread_from_wait
7550 and general_thread.
7551 (look_up_one_symbol): Flush after debug output.
7552 * server.c (step_thread, server_waiting): New variables.
7553 (start_inferior): Don't use signal_pid. Update call to mywait.
7554 (attach_inferior): Update call to mywait.
7555 (handle_query): Handle qfThreadInfo and qsThreadInfo.
7556 (main): Don't fetch/store registers explicitly. Use
7557 set_desired_inferior. Support proposed ``Hs'' packet. Update
7558 calls to mywait.
7559 * server.h: Update.
7560 (struct inferior_list, struct_inferior_list_entry): New.
7561 * target.c (set_desired_inferior): New.
7562 (write_inferior_memory): Constify.
7563 (mywait): New function.
7564 * target.h: Update.
7565 (struct target_ops): New signal_pid method.
7566 (mywait): Removed macro, added prototype.
7567
7568 * linux-low.h (regset_func): Removed.
7569 (regset_fill_func, regset_store_func): New.
7570 (enum regset_type): New.
7571 (struct regset_info): Add type field. Use new operation types.
7572 (struct linux_target_ops): stop_pc renamed to get_pc.
7573 Add decr_pc_after_break and breakpoint_at.
7574 (get_process, get_thread_proess, get_process_thread)
7575 (strut process_info, all_processes, linux_attach_lwp)
7576 (thread_db_init): New.
7577
7578 * linux-arm-low.c (arm_get_pc, arm_set_pc,
7579 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
7580 (the_low_target): Add new members.
7581 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
7582 (i386_store_fpxregset): Constify.
7583 (target_regsets): Add new kind identifier.
7584 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
7585 (i386_set_pc): Add debugging.
7586 (i386_breakpoint_at): New function.
7587 (the_low_target): Add new members.
7588 * linux-mips-low.c (mips_get_pc, mips_set_pc)
7589 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
7590 (mips_breakpoint_at): New.
7591 (the_low_target): Add new members.
7592 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
7593 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
7594 (the_low_target): Add new members.
7595 * linux-sh-low.c (sh_get_pc, sh_set_pc)
7596 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
7597 (the_low_target): Add new members.
7598 * linux-x86-64-low.c (target_regsets): Add new kind
7599 identifier.
7600
76012002-05-15 Daniel Jacobowitz <drow@mvista.com>
7602
7603 From Martin Pool <mbp@samba.org>:
7604 * server.c (gdbserver_usage): New function.
7605 (main): Call it.
7606
76072002-05-14 Daniel Jacobowitz <drow@mvista.com>
7608
7609 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
7610 stop_at -> stop_pc.
7611
76122002-05-04 Andrew Cagney <ac131313@redhat.com>
7613
7614 * Makefile.in: Remove obsolete code.
7615
76162002-04-24 Michal Ludvig <mludvig@suse.cz>
7617
7618 * linux-low.c (regsets_fetch_inferior_registers),
7619 (regsets_store_inferior_registers): Removed cast to int from
7620 ptrace() calls.
7621 * regcache.h: Added declaration of struct inferior_info.
7622
76232002-04-20 Daniel Jacobowitz <drow@mvista.com>
7624
7625 * inferiors.c (struct inferior_info): Add regcache_data.
7626 (add_inferior): Call create_register_cache.
7627 (clear_inferiors): Call free_register_cache.
7628 (inferior_regcache_data, set_inferior_regcache_data): New functions.
7629 * regcache.c (struct inferior_regcache_data): New.
7630 (registers): Remove.
7631 (get_regcache): New function.
7632 (create_register_cache, free_register_cache): New functions.
7633 (set_register_cache): Don't initialize the register cache here.
7634 (registers_to_string, registers_from_string, register_data): Call
7635 get_regcache.
7636 * regcache.h: Add prototypes.
7637 * server.h: Likewise.
7638
76392002-04-20 Daniel Jacobowitz <drow@mvista.com>
7640
7641 * mem-break.c: New file.
7642 * mem-break.h: New file.
7643 * Makefile.in: Add mem-break.o rule; update server.h
7644 dependencies.
7645 * inferiors.c (struct inferior_info): Add target_data
7646 member.
7647 (clear_inferiors): Free target_data member if set.
7648 (inferior_target_data, set_inferior_target_data): New functions.
7649 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
7650 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
7651 * linux-low.c (linux_bp_reinsert): New variable.
7652 (struct inferior_linux_data): New.
7653 (linux_create_inferior): Use set_inferior_target_data.
7654 (linux_attach): Likewise. Call add_inferior.
7655 (linux_wait_for_one_inferior): New function.
7656 (linux_wait): Call it.
7657 (linux_write_memory): Add const.
7658 (initialize_low): Call set_breakpoint_data.
7659 * linux-low.h (struct linux_target_ops): Add breakpoint
7660 handling members.
7661 * server.c (attach_inferior): Remove extra add_inferior
7662 call.
7663 * server.h: Include mem-break.h. Update inferior.c
7664 prototypes.
7665 * target.c (read_inferior_memory)
7666 (write_inferior_memory): New functions.
7667 * target.h (read_inferior_memory)
7668 (write_inferior_memory): Change macros to prototypes.
7669 (struct target_ops): Update comments. Add const to write_memory
7670 definition.
7671
76722002-04-11 Daniel Jacobowitz <drow@mvista.com>
7673
7674 * linux-low.c (usr_store_inferior_registers): Support
7675 registers which are allowed to fail to store.
7676 * linux-low.h (linux_target_ops): Likewise.
7677 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
7678 (ppc_cannot_store_register): FPSCR may not be storable.
7679
76802002-04-09 Daniel Jacobowitz <drow@mvista.com>
7681
7682 * server.h: Include <string.h> if HAVE_STRING_H.
7683 * ChangeLog: Correct paths in last ChangeLog entry.
7684
76852002-04-09 Daniel Jacobowitz <drow@mvista.com>
7686
7687 * linux-low.h: Remove obsolete prototypes.
7688 (struct linux_target_ops): New.
7689 (extern the_low_target): New.
7690 * linux-low.c (num_regs, regmap): Remove declarations.
7691 (register_addr): Use the_low_target explicitly.
7692 (fetch_register): Likewise.
7693 (usr_fetch_inferior_registers): Likewise.
7694 (usr_store_inferior_registers): Likewise.
7695 * linux-arm-low.c (num_regs): Remove.
7696 (arm_num_regs): Define.
7697 (arm_regmap): Renamed from regmap, made static.
7698 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
7699 made static.
7700 (arm_cannot_store_register): Renamed from cannot_store_register,
7701 made static.
7702 (the_low_target): New.
7703 * linux-i386-low.c (num_regs): Remove.
7704 (i386_num_regs): Define.
7705 (i386_regmap): Renamed from regmap, made static.
7706 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
7707 made static.
7708 (i386_cannot_store_register): Renamed from cannot_store_register,
7709 made static.
7710 (the_low_target): New.
7711 * linux-ia64-low.c (num_regs): Remove.
7712 (ia64_num_regs): Define.
7713 (ia64_regmap): Renamed from regmap, made static.
7714 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
7715 made static.
7716 (ia64_cannot_store_register): Renamed from cannot_store_register,
7717 made static.
7718 (the_low_target): New.
7719 * linux-m68k-low.c (num_regs): Remove.
7720 (m68k_num_regs): Define.
7721 (m68k_regmap): Renamed from regmap, made static.
7722 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
7723 made static.
7724 (m68k_cannot_store_register): Renamed from cannot_store_register,
7725 made static.
7726 (the_low_target): New.
7727 * linux-mips-low.c (num_regs): Remove.
7728 (mips_num_regs): Define.
7729 (mips_regmap): Renamed from regmap, made static.
7730 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
7731 made static.
7732 (mips_cannot_store_register): Renamed from cannot_store_register,
7733 made static.
7734 (the_low_target): New.
7735 * linux-ppc-low.c (num_regs): Remove.
7736 (ppc_num_regs): Define.
7737 (ppc_regmap): Renamed from regmap, made static.
7738 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
7739 made static.
7740 (ppc_cannot_store_register): Renamed from cannot_store_register,
7741 made static.
7742 (the_low_target): New.
7743 * linux-s390-low.c (num_regs): Remove.
7744 (s390_num_regs): Define.
7745 (s390_regmap): Renamed from regmap, made static.
7746 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
7747 made static.
7748 (s390_cannot_store_register): Renamed from cannot_store_register,
7749 made static.
7750 (the_low_target): New.
7751 * linux-sh-low.c (num_regs): Remove.
7752 (sh_num_regs): Define.
7753 (sh_regmap): Renamed from regmap, made static.
7754 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
7755 made static.
7756 (sh_cannot_store_register): Renamed from cannot_store_register,
7757 made static.
7758 (the_low_target): New.
7759 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
7760 (the_low_target): New.
7761
77622002-04-09 Daniel Jacobowitz <drow@mvista.com>
7763
7764 * Makefile.in: Add stamp-h target.
7765 * configure.in: Create stamp-h.
7766 * configure: Regenerated.
7767
77682002-04-09 Daniel Jacobowitz <drow@mvista.com>
7769
7770 * inferiors.c: New file.
7771 * target.c: New file.
7772 * target.h: New file.
7773 * Makefile.in: Add target.o and inferiors.o. Update
7774 dependencies.
7775 * linux-low.c (inferior_pid): New static variable,
7776 moved from server.c.
7777 (linux_create_inferior): Renamed from create_inferior.
7778 Call add_inferior. Return 0 on success instead of a PID.
7779 (linux_attach): Renamed from myattach.
7780 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
7781 (linux_thread_alive): Renamed from mythread_alive.
7782 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
7783 child dies.
7784 (linux_resume): Renamed from myresume. Add missing ``return 0''.
7785 (regsets_store_inferior_registers): Correct error message.
7786 Add missing ``return 0''.
7787 (linux_fetch_registers): Renamed from fetch_inferior_registers.
7788 (linux_store_registers): Renamed from store_inferior_registers.
7789 (linux_read_memory): Renamed from read_inferior_memory.
7790 (linux_write_memory): Renamed from write_inferior_memory.
7791 (linux_target_ops): New structure.
7792 (initialize_low): Call set_target_ops ().
7793 * remote-utils.c (unhexify): New function.
7794 (hexify): New function.
7795 (input_interrupt): Send signals to ``signal_pid''.
7796 * server.c (inferior_pid): Remove.
7797 (start_inferior): Update create_inferior call.
7798 (attach_inferior): Call add_inferior.
7799 (handle_query): New function.
7800 (main): Call handle_query for `q' packets.
7801 * server.h: Include "target.h". Remove obsolete prototypes.
7802 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
7803
78042002-04-09 Daniel Jacobowitz <drow@mvista.com>
7805
7806 * Makefile.in: Add WARN_CFLAGS. Update configury
7807 dependencies.
7808 * configure.in: Check for <string.h>
7809 * configure: Regenerate.
7810 * config.in: Regenerate.
7811 * gdbreplay.c: Include needed system headers.
7812 (remote_open): Remove strchr prototype.
7813 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
7814 * regcache.c (supply_register): Change buf argument to const void *.
7815 (supply_register_by_name): Likewise.
7816 (collect_register): Change buf argument to void *.
7817 (collect_register_by_name): Likewise.
7818 * regcache.h: Add missing prototypes.
7819 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
7820 * server.c (handle_query): New function.
7821 (attached): New static variable, moved out of main.
7822 (main): Quiet longjmp clobber warnings.
7823 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
7824 * utils.c (error): Remove NORETURN.
7825 (fatal): Likewise.