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