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