From: Sergio Durigan Junior <sergiodj@redhat.com>
[deliverable/binutils-gdb.git] / gdb / gdbserver / ChangeLog
... / ...
CommitLineData
12013-03-13 Joel Brobecker <brobecker@adacore.com>
2
3 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
4 Remove extraneous NULL element.
5
62013-03-13 Yao Qi <yao@codesourcery.com>
7
8 * tracepoint.c (traceframe_read_tsv): Look for the last matched
9 'V' block in trace frame.
10
112013-03-11 Markus Metzger <markus.t.metzger@intel.com>
12
13 * target.h (struct target_ops): Add btrace ops.
14 (target_supports_btrace): New macro.
15 (target_enable_btrace): New macro.
16 (target_disable_btrace): New macro.
17 (target_read_btrace): New macro.
18 * gdbthread.h (struct thread_info): Add btrace field.
19 * server.c: Include btrace-common.h.
20 (handle_btrace_general_set): New function.
21 (handle_btrace_enable): New function.
22 (handle_btrace_disable): New function.
23 (handle_general_set): Call handle_btrace_general_set.
24 (handle_qxfer_btrace): New function.
25 (struct qxfer qxfer_packets[]): Add btrace entry.
26 * inferiors.c (remove_thread): Disable btrace.
27 * linux-low: Include linux-btrace.h.
28 (linux_low_enable_btrace): New function.
29 (linux_low_read_btrace): New function.
30 (linux_target_ops): Add btrace ops.
31 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
32 Add srv_linux_btrace=yes.
33 (x86_64-*-linux*): Add linux-btrace.o.
34 Add srv_linux_btrace=yes.
35 * configure.ac: Define HAVE_LINUX_BTRACE.
36 * config.in: Regenerated.
37 * configure: Regenerated.
38
392013-03-11 Markus Metzger <markus.t.metzger@intel.com>
40
41 * server.c (handle_qxfer): Preserve error message if -3 is
42 returned.
43 (qxfer): Document the -3 return value.
44
452013-03-11 Markus Metzger <markus.t.metzger@intel.com>
46
47 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
48 (linux_btrace_h): New variable.
49 (linux-btrace.o): New rule.
50
512013-03-08 Stan Shebs <stan@codesourcery.com>
52 Hafiz Abid Qadeer <abidh@codesourcery.com>
53
54 * tracepoint.c (trace_buffer_size): New global.
55 (DEFAULT_TRACE_BUFFER_SIZE): New define.
56 (init_trace_buffer): Change to one-argument function. Allocate
57 trace buffer memory.
58 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
59 handle QTBuffer:size packet.
60 (cmd_bigqtbuffer_size): New function.
61 (initialize_tracepoint): Call init_trace_buffer with
62 DEFAULT_TRACE_BUFFER_SIZE.
63 * server.c (handle_query): Add QTBuffer:size in the
64 supported packets.
65
662013-03-07 Yao Qi <yao@codesourcery.com>
67
68 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
69 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
70 of -1.
71 (cmd_qtsp): Adjust condition. Do post increment.
72 Set cur_action and cur_step_action back to 0.
73
742013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
75
76 PR server/15236
77 * linux-low.c (linux_write_memory): Return early success if LEN is
78 zero.
79
802013-03-05 Corinna Vinschen <vinschen@redhat.de>
81
82 * configure.srv: Add x86_64-*-cygwin* as target.
83
842013-02-28 Tom Tromey <tromey@redhat.com>
85
86 * configure.ac: Invoke AC_SYS_LARGEFILE.
87 * configure, config.in: Rebuild.
88
892013-02-28 Corinna Vinschen <vinschen@redhat.com>
90
91 * win32-low.c: Throughout, fix format strings and casts of
92 printf-like functions to avoid type related warnings on all
93 platforms.
94 (get_child_debug_event): Print dwDebugEventCode as hex since
95 that's how it's usually documented.
96
972013-02-28 Yao Qi <yao@codesourcery.com>
98
99 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
100 pulongest.
101
1022013-02-27 Jiong Wang <jiwang@tilera.com>
103
104 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
105 (reg-tilegx32.c): New rule.
106 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
107 * linux-tile-low.c (tile_arch_setup): New function. Invoke
108 different register info initializer according to elf class.
109 (init_registers_tilgx32): New function. The tilegx32 register info
110 initializer.
111 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
112 (tile_store_gregset): Likewise.
113
1142013-02-27 Yao Qi <yao@codesourcery.com>
115
116 * server.c (process_point_options): Print debug message when
117 debug_threads is true.
118
1192013-02-26 Yao Qi <yao@codesourcery.com>
120
121 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
122
1232013-02-19 Pedro Alves <palves@redhat.com>
124 Kai Tietz <ktietz@redhat.com>
125
126 PR gdb/15161
127
128 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
129 instead of strtoul to extract address from packet.
130 (process_serial_event) <'z'>: Likewise.
131
1322013-02-18 Yao Qi <yao@codesourcery.com>
133
134 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
135
1362013-02-14 Pedro Alves <palves@redhat.com>
137
138 Plug memory leak.
139
140 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
141 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
142
1432013-02-14 Pedro Alves <palves@redhat.com>
144
145 * tracepoint.c (cmd_qtdpsrc): Use savestring.
146
1472013-02-14 Pedro Alves <palves@redhat.com>
148
149 * tracepoint.c (save_string): Delete.
150 (add_tracepoint_action): Use savestring instead of save_string.
151
1522013-02-12 Pedro Alves <palves@redhat.com>
153
154 * linux-xtensa-low.c: Ditto.
155 * xtensa-xtregs.c: Ditto.
156
1572013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
158
159 * thread-db.c (thread_db_get_tls_address): NULL pointer check
160 thread_db.
161
1622013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
163
164 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
165 aarch64_num_wp_regs and aarch64_num_bp_regs to
166 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
167
1682013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
169
170 * linux-aarch64-low.c (ps_get_thread_area): Replace
171 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
172
1732013-02-04 Jim MacArthur <jim.macarthur@arm.com>
174 Marcus Shawcroft <marcus.shawcroft@arm.com>
175 Nigel Stephens <nigel.stephens@arm.com>
176 Yufeng Zhang <yufeng.zhang@arm.com>
177
178 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
179 (aarch64.c, aarch64-without-fpu.c): New targets.
180 * configure.srv (aarch64*-*-linux*): New.
181 * linux-aarch64-low.c: New file.
182
1832013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
184
185 * linux-low.c (handle_extended_wait, linux_create_inferior)
186 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
187 (dequeue_one_deferred_signal, linux_resume_one_thread)
188 (fetch_register, linux_write_memory, linux_enable_event_reporting)
189 (linux_tracefork_grandchild, linux_test_for_tracefork)
190 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
191 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
192 where the argument is 0.
193
1942013-01-25 Yao Qi <yao@codesourcery.com>
195
196 * event-loop.c: Include "queue.h".
197 (gdb_event_p): New typedef.
198 (struct gdb_event) <next_event>: Remove.
199 (event_queue): Change to QUEUE(gdb_event_p).
200 (async_queue_event): Remove.
201 (gdb_event_xfree): New.
202 (initialize_event_loop): New.
203 (process_event): Use API from QUEUE.
204 (wait_for_event): Likewise.
205 * server.c (main): Call initialize_event_loop.
206 * server.h (initialize_event_loop): Declare.
207
2082013-01-18 Yao Qi <yao@codesourcery.com>
209
210 * ax.h (struct eval_agent_expr_context): New.
211 (gdb_eval_agent_expr): Update declaration.
212 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
213 TFRAME. Add new argument CTX.
214 * server.h (struct eval_agent_expr_context): Declare.
215 (agent_mem_read, agent_tsv_read): Update declaration.
216 (agent_mem_read_string): Likewise.
217 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
218 (add_traceframe_block): Add new argument TPOINT.
219 Increase TPOINT->traceframe_usage.
220 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
221 eval_tracepoint_agent_expr.
222 (condition_true_at_tracepoint): Likewise.
223 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
224 (agent_mem_read_string, agent_tsv_read): Likewise.
225
2262013-01-16 Yao Qi <yao@codesourcery.com>
227
228 * linux-low.c (linux_resume_one_lwp): Don't check
229 'lwp->bp_reinsert != 0'.
230
2312013-01-07 Joel Brobecker <brobecker@adacore.com>
232 Pedro Alves <palves@redhat.com>
233
234 * lynx-low.c (ptrace_request_to_str): Define a temporary
235 macro and use it to simplify this function's implementation.
236
2372013-01-07 Joel Brobecker <brobecker@adacore.com>
238
239 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
240 sets errno.
241
2422013-01-07 Joel Brobecker <brobecker@adacore.com>
243
244 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
245
2462013-01-07 Joel Brobecker <brobecker@adacore.com>
247
248 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
249
2502013-01-07 Joel Brobecker <brobecker@adacore.com>
251
252 * lynx-low.c (lynx_resume): Use the resume_info parameter
253 to determine the ptid for the lynx_ptrace call, unless
254 it is equal to minus_one_ptid, in which case we use the
255 ptid of the current_inferior.
256 (lynx_wait_1): After having received a thread create/exit
257 event, resume the inferior's execution using the signaling
258 thread's ptid, rather than the old ptid.
259
2602013-01-07 Joel Brobecker <brobecker@adacore.com>
261
262 * lynx-low.c (lynx_resume): Delete variable ret.
263
2642013-01-01 Joel Brobecker <brobecker@adacore.com>
265
266 * gdbreplay.c (gdbreplay_version): Update copyright year.
267 * server.c (gdbserver_version): Likewise.
268
2692012-12-17 Joel Brobecker <brobecker@adacore.com>
270
271 * lynx-low.c (lynx_wait_1): Add debug trace before adding
272 new thread.
273
2742012-12-17 Joel Brobecker <brobecker@adacore.com>
275
276 * lynx-low.c (ptrace_request_to_str): Add handling for
277 PTRACE_GETTRACESIG.
278
2792012-12-17 Joel Brobecker <brobecker@adacore.com>
280
281 * lynx-low.c (lynx_attach): Delete variable new_process.
282
2832012-12-17 Joel Brobecker <brobecker@adacore.com>
284
285 * lynx-low.c (lynx_create_inferior): Delete variable
286 new_process.
287
2882012-12-17 Joel Brobecker <brobecker@adacore.com>
289
290 * lynx-low.c (ptrace_request_to_str): Do not handle
291 PTRACE_GETTHREADLIST if this macro does not exist.
292
2932012-12-15 Yao Qi <yao@codesourcery.com>
294
295 * Makefile.in (OBS): Add notif.o.
296 * notif.c, notif.h: New.
297 * server.c: Include "notif.h".
298 (struct vstop_notif) <next>: Remove.
299 <base>: New field.
300 (queue_stop_reply): Update.
301 (push_event, send_next_stop_reply): Remove.
302 (discard_queued_stop_replies): Update.
303 (notif_stop): New variable.
304 (handle_v_stopped): Remove.
305 (handle_v_requests): Don't call handle_v_stopped. Call
306 handle_ack_notif instead.
307 (queue_stop_reply_callback): Call notif_event_enque instead
308 of queue_stop_reply.
309 (handle_status): Don't call send_next_stop_reply, call
310 notif_write_event instead.
311 (kill_inferior_callback): Likewise.
312 (detach_or_kill_inferior_callback): Likewise.
313 (main): Call initialize_notif.
314 (process_serial_event): Call QUEUE_is_empty.
315 (handle_target_event): Call notif_push instead of push event.
316 * server.h (push_event): Remove declaration.
317
3182012-12-10 Tom Tromey <tromey@redhat.com>
319
320 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
321 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
322 macros.
323 (.c.o): Rewrite.
324 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
325 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
326 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
327 (amd64-linux-ipa.o, ax.o): Rewrite.
328 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
329 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
330 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
331 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
332 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
333 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
334 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
335 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
336 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
337 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
338 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
339 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
340 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
341 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
342 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
343 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
344 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
345 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
346 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
347 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
348 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
349 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
350 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
351 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
352 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
353 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
354 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
355 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
356 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
357 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
358 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
359 (reg-tilegx.o): Remove.
360 (all_object_files): New macro.
361 Include .deps files.
362 * aclocal.m4, configure: Rebuild.
363 * acinclude.m4: Include depstand.m4, lead-dot.m4.
364 * configure.ac: Invoke ZW_CREATE_DEPDIR,
365 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
366
3672012-12-05 Tom Tromey <tromey@redhat.com>
368
369 PR gdb/14917:
370 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
371
3722012-11-28 Markus Metzger <markus.t.metzger@intel.com>
373
374 * configure.ac: Check for linux/perf_event.h.
375 * config.in: Regenerated.
376 * configure: Regenerated.
377
3782012-11-26 Maxime Villard <rustyBSD@gmx.fr>
379
380 * hostio.c (handle_readlink): Decrease buffer size
381 parameter passed to readlink by one byte.
382
3832012-11-26 Yao Qi <yao@codesourcery.com>
384
385 * configure.ac (build_warnings): Append '-Wempty-body'.
386 * configure: Regenerated.
387 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
388 body.
389
3902012-11-15 Pierre Muller <muller@sourceware.org>
391
392 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
393 * config.in: Regenerate.
394 * configure: Regenerate.
395 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
396 Use "gdb_wait.h" header instead of <sys/wait.h> header.
397 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
398 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
399 header.
400 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
401 instead of <sys/wait.h> header.
402 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
403
4042012-11-13 Markus Metzger <markus.t.metzger@intel.com>
405
406 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
407 (various make rules): Remove -DGDBSERVER
408
4092012-11-09 Yao Qi <yao@codesourcery.com>
410
411 * spu-low.c (current_ptid): Move it to ..
412 * gdbthread.h: ... here. New.
413 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
414 * server.c (myresume, process_serial_event): Likewise.
415 * thread-db.c (thread_db_find_new_threads): Likewise.
416 * tracepoint.c (run_inferior_command): Likewise.
417
4182012-10-01 Andrew Burgess <aburgess@broadcom.com>
419
420 * server.c (handle_search_memory_1): Include access length in
421 warning message.
422
4232012-09-05 Michael Brandt <michael.brandt@axis.com>
424
425 * linux-crisv32-low.c: Fix compile errors.
426
4272012-09-04 Yao Qi <yao@codesourcery.com>
428
429 * tracepoint.c (cmd_qtsv): Adjust debug message.
430 Don't check CUR_TPOINT.
431
4322012-08-28 Yao Qi <yao@codesourcery.com>
433
434 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
435 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
436 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
437 Remove declarations of xmalloc, xreallloc, xstrdup and
438 freeargv.
439 * Makefile.in (libiberty_h): New.
440 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
441 (linux-bfin-low.o): Append dependency 'libiberty.h'.
442
4432012-08-23 Yao Qi <yao@codesourcery.com>
444
445 * server.h: Remove declaration of 'xsnprintf'.
446
4472012-08-22 Keith Seitz <keiths@redhat.com>
448
449 * server.h: Include build-gnulib-gbserver/config.h.
450 * gdbreplay.c: Likewise.
451
4522012-08-08 Doug Evans <dje@google.com>
453
454 * Makefile.in (SFILES): Add gdb_vecs.c.
455 (OBS): Add gdb_vecs.o.
456 (gdb_vecs_h, host_defs_h): New variables.
457 (thread-db.o): Add $(gdb_vecs_h) dependency.
458 (gdb_vecs.o): New rule.
459 * thread-db.c: #include "gdb_vecs.h".
460 (thread_db_load_search): Use a vector to iterate over path elements.
461 Handle text appearing after "$pdir".
462
463 * configure.ac: Add check for strstr.
464 * config.in: Regenerate.
465 * configure: Regenerate.
466
4672012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
468
469 * hostio.c (handle_pread): If pread fails, fall back to attempting
470 lseek/read.
471 (handle_pwrite): Likewise for pwrite.
472
4732012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
474
475 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
476 between unsupported TYPE and unimplementable ADDR/LEN combination.
477 (arm_insert_point): Act on new return value.
478
4792012-07-31 Pedro Alves <palves@redhat.com>
480
481 * server.c (process_point_options): Only skip tokens if we find
482 one that is unrecognized. Don't treat 'X' specially while
483 skipping unrecognized tokens.
484
4852012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
486
487 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
488 to 4-byte-align HW breakpoint addresses for Thumb.
489
4902012-07-27 Yao Qi <yao@codesourcery.com>
491
492 PR remote/14161.
493
494 * server.h: Declare gdb_agent_about_to_close.
495 * target.c (kill_inferior): Include "agent.h".
496 New. Send command 'kill'.
497 * target.h (kill_inferior): Removed macro.
498 * tracepoint.c (gdb_agent_about_to_close): New.
499 (gdb_agent_helper_thread): Handle command 'close'.
500 Wait endlessly until the inferior stops.
501 Install gdb_agent_remove_socket to atexit hook.
502 (agent_socket_name): New static variable.
503 (gdb_agent_socket_init): Replace local variable 'name' with
504 'agent_socket_name'.
505 (gdb_agent_remove_socket): New.
506
5072012-07-27 Yao Qi <yao@codesourcery.com>
508
509 * server.c (process_point_options): Stop at 'X' when parsing.
510
5112012-07-19 Michael Eager <eager@eagercon.com>
512
513 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
514 to hw_execute.
515 * linux-x86-low.c (x86_insert_point, x86_remove_point):
516 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
517 hardware breakpoint.
518
5192012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
520
521 * gdbserver/linux-low.c (initialize_low): Call
522 linux_ptrace_init_warnings.
523
5242012-07-02 Doug Evans <dje@google.com>
525
526 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
527 pointer to int.
528
5292012-07-02 Stan Shebs <stan@codesourcery.com>
530
531 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
532 (ax.o): Add it to build rule.
533 (ax-ipa.o): Ditto.
534 (OBS): Add format.o.
535 (IPA_OBS): Add format.o.
536 * server.c (handle_query): Claim support for breakpoint commands.
537 (process_point_options): Add command case.
538 (process_serial_event): Leave running if there are printfs in
539 effect.
540 * mem-break.h (any_persistent_commands): Declare.
541 (add_breakpoint_commands): Declare.
542 (gdb_no_commands_at_breakpoint): Declare.
543 (run_breakpoint_commands): Declare.
544 * mem-break.c (struct point_command_list): New struct.
545 (struct breakpoint): New field command_list.
546 (any_persistent_commands): New function.
547 (add_commands_to_breakpoint): New function.
548 (add_breakpoint_commands): New function.
549 (gdb_no_commands_at_breakpoint): New function.
550 (run_breakpoint_commands): New function.
551 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
552 locally.
553 * ax.c: Include format.h.
554 (ax_printf): New function.
555 (gdb_eval_agent_expr): Add printf opcode.
556
5572012-06-13 Yao Qi <yao@codesourcery.com>
558
559 * server.c (start_inferior): Remove duplicated writes to fields
560 'last_resume_kind' and 'last_status' of 'current_inferior'.
561
5622012-06-12 Yao Qi <yao@codesourcery.com>
563 Pedro Alves <palves@redhat.com>
564
565 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
566 comment.
567 * server.c (handle_v_cont): Extend comment.
568
5692012-06-11 Yao Qi <yao@codesourcery.com>
570
571 * linux-low.c (linux_attach): Add 'static'.
572
5732012-06-06 Yao Qi <yao@codesourcery.com>
574
575 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
576
5772012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
578
579 Fix gcc -flto compilation warning.
580 * server.c (main): Make variable multi_mode and attach volatile.
581
5822012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
583
584 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
585 if the platform doesn't know about it.
586
5872012-05-30 Jeff Kenton <jkenton@tilera.com>
588
589 * Makefile.in (SFILES): Add linux-tile-low.c.
590 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
591 * configure.srv: Handle tilegx-*-linux*.
592 * linux-tile-low.c: New file.
593
5942012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
595
596 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
597
5982012-05-24 Pedro Alves <palves@redhat.com>
599
600 PR gdb/7205
601
602 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
603
6042012-05-24 Pedro Alves <palves@redhat.com>
605
606 PR gdb/7205
607
608 Replace target_signal with gdb_signal throughout.
609
6102012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
611
612 * linux-low.c (linux_store_registers): Avoid the copying sequence
613 when no data has been retrieved by ptrace.
614
6152012-05-22 Will Deacon <will.deacon@arm.com>
616
617 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
618 Include asm/ptrace.h.
619 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
620 already defined.
621
6222012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
623
624 * linux-low.c (linux_store_registers): Don't re-retrieve data
625 with ptrace that has already been obtained from /proc. Always
626 copy any data retrieved with ptrace to the buffer supplied.
627
6282012-05-11 Yao Qi <yao@codesourcery.com>
629 Pedro Alves <palves@redhat.com>
630
631 * linux-low.c (enum stopping_threads_kind): New.
632 (stopping_threads): Change type to `enum stopping_threads_kind'.
633 (handle_extended_wait): If stopping and suspending threads, leave
634 the new_lwp suspended too.
635 (linux_wait_for_event): Adjust.
636 (stop_all_lwps): Set `stopping_threads' to
637 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
638 whether we're suspending threads or just stopping them. Assert no
639 recursion happens.
640
6412012-04-29 Yao Qi <yao@codesourcery.com>
642
643 * server.h: Move some code to ...
644 * gdbthread.h: ... here. New.
645 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
646 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
647 (nto-low.o, win32-low.o): Likewise.
648 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
649 * regcache.c, remote-utils.c, server.c: Likewise.
650 * target.c, tracepoint.c, win32-low.c: Likewise.
651
6522012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
653
654 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
655 (PTRACE_ARG4_TYPE): Likewise.
656 (PTRACE_XFER_TYPE): Likewise.
657 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
658 ptrace to PTRACE_ARG3_TYPE.
659 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
660 (PTRACE_ARG4_TYPE): Likewise.
661 (PTRACE_XFER_TYPE): Likewise.
662 (linux_detach_one_lwp): Cast fourth argument of
663 ptrace to long then PTRACE_ARG4_TYPE.
664 (regsets_fetch_inferior_registers): Cast third argument of
665 ptrace to long then PTRACE_ARG3_TYPE.
666 (regsets_store_inferior_registers): Likewise.
667
6682012-04-20 Pedro Alves <palves@redhat.com>
669
670 * configure: Regenerate.
671
6722012-04-19 Pedro Alves <palves@redhat.com>
673
674 * Makefile.in (GNULIB_BUILDDIR): New.
675 (LIBGNU, INCGNU, GNULIB_H): Adjust.
676 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
677 (all, install-only, uninstall, clean-info, all-lib, clean): No
678 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
679 (maintainer-clean realclean distclean): Use subdir_do.
680 (subdir_do): New.
681 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
682 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
683 * acinclude.m4: Include acx_configure_dir.m4.
684 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
685 calls. Call AC_PROG_RANLIB. Configure gnulib using
686 ACX_CONFIGURE_DIR.
687 (GNULIB): New.
688 (GNULIB_STDINT_H): Adjust.
689 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
690 * gdbreplay.c: Include build-gnulib/config.h.
691 * server.h: Likewise.
692 * aclocal.m4: Regenerate.
693 * config.in: Regenerate.
694 * configure: Regenerate.
695
6962012-04-19 Pedro Alves <palves@redhat.com>
697
698 * Makefile.in (LIBGNU, INCGNU): Adjust.
699 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
700 (all, install-only, uninstall, clean-info, all-lib, clean)
701 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
702 * configure.ac: Adjust AC_OUTPUT output.
703 * aclocal.m4: Regenerate.
704 * configure: Regenerate.
705
7062012-04-19 Pedro Alves <palves@redhat.com>
707
708 * Makefile.in (generated_files): New.
709 (server_h): Remove the explicit dependency on config.h, and depend
710 on $generated_files.
711
7122012-04-19 Pedro Alves <palves@redhat.com>
713
714 * Makefile.in (INCGNU): Add -Ignulib.
715
7162012-04-19 Pedro Alves <palves@redhat.com>
717
718 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
719 (INCGNU): ... this, and spell out -I here.
720 (GNULIB_LIB): Rename to ...
721 (LIBGNU): ... this.
722 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
723
7242012-04-19 Pedro Alves <palves@redhat.com>
725
726 * config.in: Regenerate.
727
7282012-04-19 Pedro Alves <palves@redhat.com>
729
730 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
731 * server.h (memmem): Remove declaration.
732 * config.in: Regenerate.
733 * configure: Regenerate.
734
7352012-04-19 Yao Qi <yao@codesourcery.com>
736
737 * Makefile.in (SFILES): Add common/vec.c.
738 (OBS): Add vec.o.
739 (vec.o): New rule.
740
7412012-04-19 Yao Qi <yao@codesourcery.com>
742
743 * remote-utils.c (prepare_resume_reply): Replace with macro
744 target_core_of_thread.
745 * server.c (handle_qxfer_threads_proper): Likewise.
746 * target.h (traget_core_of_thread): New macro.
747
7482012-04-18 Pedro Alves <palves@redhat.com>
749
750 * aclocal.m4: Regenerate.
751 * configure: Regenerate.
752
7532012-04-16 Yao Qi <yao@codesourcery.com>
754
755 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
756 duplicated on address.
757
7582012-04-16 Yao Qi <yao@codesourcery.com>
759
760 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
761 (struct tracepoint_action_ops) <send>: New field.
762 (m_tracepoint_action_send, r_tracepoint_action_send): New.
763 (agent_expr_send, x_tracepoint_action_send): New.
764 (l_tracepoint_action_send): New.
765 (cmd_qtdp): Download and install tracepoint
766 according to `use_agent'.
767 (run_inferior_command): Add one more parameter `len'.
768 Update callers.
769 (tracepoint_send_agent): New.
770 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
771
7722012-04-16 Yao Qi <yao@codesourcery.com>
773
774 * tracepoint.c (download_tracepoints): Moved to ...
775 (cmd_qtstart): ... here.
776
7772012-04-14 Yao Qi <yao@codesourcery.com>
778
779 * tracepoint.c: Include inttypes.h.
780 (struct collect_memory_action): Use sized types.
781 (struct tracepoint): Likewise.
782 (cmd_qtdp, stop_tracing): Update print specifiers.
783 (cmd_qtp, response_tracepoint): Likewise.
784 (collect_data_at_tracepoint): Likewise.
785 (collect_data_at_step): Likewise.
786
7872012-04-14 Yao Qi <yao@codesourcery.com>
788
789 Import gnulib module inttypes.
790 * aclocal.m4, config.in, configure: Regenerated.
791
7922012-04-14 Yao Qi <yao@codesourcery.com>
793
794 * Makefile.in (maintainer-clean, realclean, distclean): Remove
795 Makefile and config.status at last.
796
7972012-04-13 Yao Qi <yao@codesourcery.com>
798
799 * tracepoint.c: Include stdint.h unconditionally.
800
8012012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
802
803 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
804 on BFD_HAVE_SYS_PROCFS_TYPE.
805 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
806 * configure: Regenerate.
807 * config.in: Likewise.
808
8092012-04-13 H.J. Lu <hongjiu.lu@intel.com>
810
811 * Makefile.in (clean): Also remove x32.c x32-linux.c
812 x32-avx.c x32-avx-linux.c.
813 (x32.o): New target.
814 (x32.c): Likewise.
815 (x32-linux.o): Likewise.
816 (x32-linux.c): Likewise.
817 (x32-avx.o): Likewise.
818 (x32-avx.c): Likewise.
819 (x32-avx-linux.o): Likewise.
820 (x32-avx-linux.c): Likewise.
821
822 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
823 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
824 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
825 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
826 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
827 i386/x32-avx-linux.xml.
828
829 * linux-x86-low.c (init_registers_x32_linux): New prototype.
830 (init_registers_x32_avx_linux): Likwise.
831 (x86_linux_update_xmltarget): Call init_registers_x32_linux
832 or init_registers_x32_avx_linux if linux_is_elf64 is false.
833
8342012-04-13 Pedro Alves <palves@redhat.com>
835
836 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
837 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
838 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
839 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
840 the sub-make.
841
8422012-04-12 H.J. Lu <hongjiu.lu@intel.com>
843
844 * linux-x86-low.c (compat_x32_clock_t): New.
845 (compat_x32_siginfo_t): Likewise.
846 (compat_x32_siginfo_from_siginfo): Likewise.
847 (siginfo_from_compat_x32_siginfo): Likewise.
848 (linux_is_elf64): Likewise.
849 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
850 and siginfo_from_compat_x32_siginfo for x32.
851 (x86_arch_setup): Set linux_is_elf64.
852
8532012-04-12 H.J. Lu <hongjiu.lu@intel.com>
854
855 PR gdb/13969
856 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
857 e_machine field.
858 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
859 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
860 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
861 compatible with process.
862
8632012-04-12 Yao Qi <yao@codesourcery.com>
864
865 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
866 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
867 (install-only, install-info, clean): Handle sub dir gnulib.
868 (all-lib, am--refresh): New targets.
869 (memmem.o): Remove target.
870 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
871 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
872 (AC_REPLACE_FUNCS): Remove memmem.
873 Invoke gl_INIT and AM_INIT_AUTOMAKE.
874 (AC_OUTPUT): Generate Makefile in gnulib/.
875 * aclocal.m4, config.in, configure: Regenerated.
876
8772012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
878
879 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
880
8812012-04-05 Pedro Alves <palves@redhat.com>
882
883 -Werror=strict-aliasing
884
885 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
886 pointer.
887
8882012-04-04 Pedro Alves <palves@redhat.com>
889
890 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
891 (sparc_store_gregset_from_stack, sparc_store_gregset)
892 (sparc_breakpoint_at): Fix formatting.
893
8942012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
895
896 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
897 are available.
898 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
899 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
900 * config.in: Regenerate.
901 * configure: Likewise.
902
9032012-03-29 Pedro Alves <palves@redhat.com>
904
905 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
906 Correct ptrace arguments.
907
9082012-03-28 Pedro Alves <palves@redhat.com>
909
910 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
911 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
912 (IA64_FR1_REGNUM): New defines.
913 (ia64_fetch_register): New.
914 (the_low_target): Install it.
915 * linux-low.h (struct linux_target_ops) <fetch_register>: New
916 field.
917 * linux-low.c (linux_fetch_registers): Try the
918 the_low_target.fetch_register hook first.
919
920 * linux-arm-low.c (the_low_target): Adjust.
921 * linux-bfin-low.c (the_low_target): Adjust.
922 * linux-cris-low.c (the_low_target): Adjust.
923 * linux-crisv32-low.c (the_low_target): Adjust.
924 * linux-m32r-low.c (the_low_target): Adjust.
925 * linux-m68k-low.c (the_low_target): Adjust.
926 * linux-mips-low.c (the_low_target): Adjust.
927 * linux-ppc-low.c (the_low_target): Adjust.
928 * linux-s390-low.c (the_low_target): Adjust.
929 * linux-sh-low.c (the_low_target): Adjust.
930 * linux-sparc-low.c (the_low_target): Adjust.
931 * linux-tic6x-low.c (the_low_target): Adjust.
932 * linux-x86-low.c (the_low_target): Adjust.
933 * linux-xtensa-low.c (the_low_target): Adjust.
934
9352012-03-26 Pedro Alves <palves@redhat.com>
936
937 * server.c (handle_qxfer_libraries): Don't bail early if
938 the_target->qxfer_libraries_svr4 is not NULL.
939
9402012-03-26 Pedro Alves <palves@redhat.com>
941
942 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
943
9442012-03-23 Pedro Alves <palves@redhat.com>
945
946 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
947 "library-list-svr4" element's start tag when the the DSO list is
948 empty.
949
9502012-03-23 Pedro Alves <palves@redhat.com>
951
952 * linux-low.c (read_one_ptr): Read the inferior's pointer through
953 a variable whose type size is the same as the inferior's pointer
954 size.
955
9562012-03-21 Thomas Schwinge <thomas@codesourcery.com>
957
958 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
959 struct siginfo.
960 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
961 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
962 * linux-low.h: Include <signal.h>.
963 (struct siginfo): Remove forward declaration.
964 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
965 struct siginfo.
966
9672012-03-21 Mike Frysinger <vapier@gentoo.org>
968
969 * .gitignore: Ignore more files.
970
9712012-03-19 Pedro Alves <palves@redhat.com>
972 Jan Kratochvil <jan.kratochvil@redhat.com>
973
974 * server.c (cont_thread, general_thread): Add describing comments.
975 (start_inferior): Clear `cont_thread'.
976 (handle_v_cont): Don't set `cont_thread' if resuming all threads
977 of a process.
978
9792012-03-15 Yao Qi <yao@codesourcery.com>
980
981 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
982 handling to ...
983 (cmd_qtdp): ... here.
984
9852012-03-15 Yao Qi <yao@codesourcery.com>
986
987 * tracepoint.c (struct tracepoint_action_ops): New.
988 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
989 (m_tracepoint_action_download): New.
990 (r_tracepoint_action_download): New.
991 (x_tracepoint_action_download): New.
992 (l_tracepoint_action_download): New.
993 (add_tracepoint_action): Install `action->ops' according type.
994 (download_tracepoint_1): Move code `download' function pointer
995 of various tracepoint_action_ops.
996
9972012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
998
999 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
1000 linux_ptrace_attach_warnings.
1001
10022012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
1003
1004 * Makefile.in (linux-ptrace.o): New.
1005 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
1006 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
1007 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
1008 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
1009 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
1010 of these targets.
1011 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
1012
10132012-03-08 Yao Qi <yao@codesourcery.com>
1014 Pedro Alves <palves@redhat.com>
1015
1016 Fix PR server/13392.
1017 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
1018 offset of JMP insn.
1019 * tracepoint.c (remove_tracepoint): New.
1020 (cmd_qtdp): Call remove_tracepoint when failed to install.
1021
10222012-03-07 Pedro Alves <palves@redhat.com>
1023
1024 * linux-low.c (get_detach_signal): New.
1025 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
1026 Pass on pending signals to PTRACE_DETACH. Check the result of the
1027 ptrace call.
1028 * server.c (program_signals, program_signals_p): New.
1029 (handle_general_set): Handle QProgramSignals.
1030 * server.h (program_signals, program_signals_p): Declare.
1031
10322012-03-05 Pedro Alves <palves@redhat.com>
1033 Jan Kratochvil <jan.kratochvil@redhat.com>
1034
1035 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
1036 New comment why.
1037
10382012-03-03 Yao Qi <yao@codesourcery.com>
1039
1040 * tracepoint.c (tracepoint_look_up_symbols): Update call to
1041 agent_look_up_symbols.
1042
10432012-03-03 Yao Qi <yao@codesourcery.com>
1044
1045 * Makefile.in (linux-low.o): Keep dependence on agent.h.
1046 (linux-x86-low.o): Likewise.
1047 * server.h: Remove in_process_agent_loaded.
1048 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
1049 common/agent.c.
1050 Update callers.
1051
10522012-03-03 Yao Qi <yao@codesourcery.com>
1053
1054 * tracepoint.c (gdb_agent_capability): New global.
1055 (in_process_agent_loaded_ust): Renamed to
1056 `in_process_agent_supports_ust'.
1057 Update callers.
1058 (in_process_agent_supports_ust): Call agent_capability_check.
1059 (clear_installed_tracepoints): Assert that agent supports
1060 agent.
1061
10622012-03-03 Yao Qi <yao@codesourcery.com>
1063
1064 * linux-low.c (linux_supports_agent): New.
1065 (linux_target_ops): Initialize field `supports_agent' with
1066 linux_supports_agent.
1067 * target.h (struct target_ops) <supports_agent>: New.
1068 (target_supports_agent): New macro.
1069 * server.c (handle_general_set): Handle packet 'QAgent'.
1070 (handle_query): Send `QAgent+'.
1071 * Makefile.in (server.o): Depends on agent.h.
1072
10732012-03-03 Yao Qi <yao@codesourcery.com>
1074
1075 * Makefile.in (OBS): Add agent.o.
1076 Add new rule for agent.o.
1077 Track dependence of tracepoint.c on agent.h.
1078 * tracepoint.c (run_inferior_command_1):
1079 (run_inferior_command): Call agent_run_command.
1080 (gdb_ust_connect_sync_socket): Deleted. Move it to
1081 common/agent.c.
1082 (resume_thread, stop_thread): Likewise.
1083 (gdb_ust_socket_init): Renamed to ...
1084 (gdb_agent_socket_init): ... New.
1085 (gdb_ust_thread): Renamed to ...
1086 (gdb_agent_helper_thread): ... New.
1087 (gdb_ust_init): Move some code to ...
1088 (gdb_agent_init): ... here. New.
1089 [HAVE_UST]: Call gdb_ust_init.
1090 (initialize_tracepoint_ftlib): Call gdb_agent_init.
1091 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
1092 * config.in, configure: Regenerated.
1093
10942012-03-02 Pedro Alves <palves@redhat.com>
1095
1096 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
1097 * linux-low.c (struct simple_pid_list): New.
1098 (stopped_pids): New a struct simple_pid_list pointer.
1099 (add_to_pid_list, pull_pid_from_list): New.
1100 (handle_extended_wait): Don't assume the first signal new children
1101 report is SIGSTOP. Adjust call to pull_pid_from_list.
1102 (linux_wait_for_lwp): Adjust.
1103
11042012-03-02 Yao Qi <yao@codesourcery.com>
1105
1106 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
1107 debug log.
1108
11092012-03-02 Yao Qi <yao@codesourcery.com>
1110
1111 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
1112 `stop_pc' and `tpoint'. Update caller.
1113
11142012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
1115
1116 * linux-low.h (linux_target_ops): Add regset_bitmap member.
1117 * linux-low.c (use_linux_regsets): New macro.
1118 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
1119 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
1120 (linux_register_in_regsets): New function.
1121 (usr_fetch_inferior_registers): Skip registers covered by
1122 regsets.
1123 (usr_store_inferior_registers): Likewise.
1124 (usr_fetch_inferior_registers): New macro.
1125 (usr_store_inferior_registers): Likewise.
1126 (linux_fetch_registers): Handle mixed regset/non-regset targets.
1127 (linux_store_registers): Likewise.
1128 * linux-mips-low.c (init_registers_mips_dsp_linux): New
1129 prototype.
1130 (init_registers_mips64_dsp_linux): Likewise.
1131 (init_registers_mips_linux): New macro.
1132 (init_registers_mips_dsp_linux): Likewise.
1133 (mips_dsp_num_regs): Likewise.
1134 (DSP_BASE, DSP_CONTROL): New fallback macros.
1135 (mips_base_regs): New macro.
1136 (mips_regmap): Use it. Fix the size.
1137 (mips_dsp_regmap): New variable.
1138 (mips_dsp_regset_bitmap): Likewise.
1139 (mips_arch_setup): New function.
1140 (mips_cannot_fetch_register): Use the_low_target.regmap rather
1141 than mips_regmap.
1142 (mips_cannot_store_register): Likewise.
1143 (the_low_target): Update .arch_setup, .num_regs and .regmap
1144 initializers. Add .regset_bitmap initializer.
1145 * linux-arm-low.c (the_low_target): Add .regset_bitmap
1146 initializer.
1147 * linux-bfin-low.c (the_low_target): Likewise.
1148 * linux-cris-low.c (the_low_target): Likewise.
1149 * linux-crisv32-low.c (the_low_target): Likewise.
1150 * linux-ia64-low.c (the_low_target): Likewise.
1151 * linux-m32r-low.c (the_low_target): Likewise.
1152 * linux-m68k-low.c (the_low_target): Likewise.
1153 * linux-ppc-low.c (the_low_target): Likewise.
1154 * linux-s390-low.c (the_low_target): Likewise.
1155 * linux-sh-low.c (the_low_target): Likewise.
1156 * linux-sparc-low.c (the_low_target): Likewise.
1157 * linux-tic6x-low.c (the_low_target): Likewise.
1158 * linux-x86-low.c (the_low_target): Likewise.
1159 * linux-xtensa-low.c (the_low_target): Likewise.
1160 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
1161 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
1162 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
1163 srv_xmlfiles.
1164 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
1165 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
1166
11672012-02-29 Yao Qi <yao@codesourcery.com>
1168 Pedro Alves <palves@redhat.com>
1169
1170 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
1171 `step_over_finished' is true.
1172
11732012-02-27 Pedro Alves <palves@redhat.com>
1174
1175 * linux-low.c (pid_is_stopped): Delete, moved to common/.
1176 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
1177
11782012-02-27 Pedro Alves <palves@redhat.com>
1179
1180 PR server/9684
1181 * linux-low.c (pid_is_stopped): New.
1182 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
1183
11842012-02-25 Luis Machado <lgustavo@codesourcery.com>
1185
1186 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
1187 of conditions.
1188
11892012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
1190
1191 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
1192
11932012-02-24 Luis Machado <lgustavo@codesourcery>
1194
1195 * server.c (handle_query): Advertise support for target-side
1196 breakpoint condition evaluation.
1197 (process_point_options): New function.
1198 (process_serial_event): When inserting a breakpoint, check for
1199 a target-side condition that should be evaluated.
1200
1201 * mem-break.c: Include regcache.h and ax.h.
1202 (point_cond_list_t): New data structure.
1203 (breakpoint) <cond_list>: New field.
1204 (find_gdb_breakpoint_at): Make non-static.
1205 (delete_gdb_breakpoint_at): Clear any target-side
1206 conditions.
1207 (clear_gdb_breakpoint_conditions): New function.
1208 (add_condition_to_breakpoint): Likewise.
1209 (add_breakpoint_condition): Likewise.
1210 (gdb_condition_true_at_breakpoint): Likewise.
1211 (gdb_breakpoint_here): Return result directly instead
1212 of going through a local variable.
1213
1214 * mem-break.h (find_gdb_breakpoint_at): New prototype.
1215 (clear_gdb_breakpoint_conditions): Likewise.
1216 (add_breakpoint_condition): Likewise.
1217 (gdb_condition_true_at_breakpoint): Likewise.
1218
1219 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
1220 (need_step_over_p): Take target-side breakpoint condition into
1221 consideration.
1222
12232012-02-24 Luis Machado <lgustavo@codesourcery>
1224
1225 * server.h: Include tracepoint.h.
1226 (agent_mem_read, agent_get_trace_state_variable_value,
1227 agent_set_trace_state_variable_value,
1228 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
1229 get_set_tsv_func_addr): New prototypes.
1230
1231 * ax.h: New include file.
1232 * ax.c: New source file.
1233
1234 * tracepoint.c: Include ax.h.
1235 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
1236 agent_expr, eval_result_type): Move to ax.h.
1237 (parse_agent_expr): Rename to ...
1238 (gdb_parse_agent_expr): ... this, make it non-static and move
1239 to ax.h.
1240 (unparse_agent_expr) Rename to ...
1241 (gdb_unparse_agent_expr): ... this, make it non-static and move
1242 to ax.h.
1243 (eval_agent_expr): Rename to ...
1244 (eval_tracepoint_agent_expr): ... this.
1245 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
1246 forward declarations.
1247 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
1248 (agent_get_trace_state_variable_value): New function.
1249 (agent_set_trace_state_variable_value): New function.
1250 (cmd_qtdp): Call gdb_parse_agent_expr (...).
1251 (response_tracepoint): Call gdb_unparse_agent_expr (...).
1252 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
1253 (condition_true_at_tracepoint): Likewise.
1254 (parse_agent_expr): Rename to ...
1255 (gdb_parse_agent_expr): ... this and move to ax.c.
1256 (unparse_agent_expr): Rename to ...
1257 (gdb_unparse_agent_expr): ... this and move to ax.c.
1258 (gdb_agent_op_name): Move to ax.c.
1259 (eval_agent_expr): Rename to ...
1260 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
1261 and move to ax.c.
1262 (eval_tracepoint_agent_expr): New function.
1263 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
1264 non-static.
1265 (current_insn_ptr, emit_error, struct bytecode_address): Move to
1266 ax.c.
1267 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
1268 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
1269 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
1270 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
1271 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
1272 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
1273 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
1274 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
1275 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
1276 (compile_bytecodes): Remove forward declaration.
1277 (is_goto_target): Move to ax.c.
1278 (compile_bytecodes): Move to ax.c and call
1279 agent_get_trace_state_variable_value (...) and
1280 agent_set_trace_state_variable_value (...).
1281
1282 * Makefile.in: Update ax.c and IPA dependencies.
1283
12842012-02-24 Pedro Alves <palves@redhat.com>
1285
1286 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
1287 (cmd_bigqtbuffer_circular): ... this. Only handle
1288 'QTBuffer:circular:'.
1289 (handle_tracepoint_general_set): Adjust.
1290
12912012-02-16 Yao Qi <yao@codesourcery.com>
1292
1293 * inferiors.c: Move code to ...
1294 * dll.c: .... here. New.
1295 * server.h: Declare clear_dlls.
1296 * Makefile.in (SFILES): Add dll.c.
1297 (OBS): Add dll.o
1298 (dll.o): New rule.
1299
13002012-02-11 Yao Qi <yao@codesourcery.com>
1301
1302 * server.c: (handle_monitor_command): Add a new parameter
1303 `own_buf'.
1304 (handle_query): Update caller.
1305
13062012-02-09 Joel Brobecker <brobecker@adacore.com>
1307
1308 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
1309 * configure, config.in: Regenerate.
1310 * hostio.c: Provide an alternate implementation if HAVE_READLINK
1311 is not defined.
1312
13132012-02-02 Pedro Alves <palves@redhat.com>
1314
1315 Try SIGKILL first, then PTRACE_KILL.
1316 * linux-low.c (linux_kill_one_lwp): New.
1317 (linux_kill_one_lwp): Rename to ...
1318 (kill_one_lwp_callback): ... this. Use the new
1319 linux_kill_one_lwp.
1320
13212012-02-02 Pedro Alves <palves@redhat.com>
1322
1323 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
1324 inferior.
1325
13262012-01-27 Pedro Alves <palves@redhat.com>
1327
1328 * linux-low.c (linux_child_pid_to_exec_file): Delete.
1329 (elf_64_file_p): Make static.
1330 (linux_pid_exe_is_elf_64_file): New.
1331 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
1332 Delete declarations.
1333 (linux_pid_exe_is_elf_64_file): Declare.
1334 * linux-x86-low.c (x86_arch_setup): Use
1335 linux_pid_exe_is_elf_64_file.
1336
13372012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
1338
1339 * linux-low.c (linux_wait_for_event_1): Rename to ...
1340 (linux_wait_for_event): ... here and merge it with former
1341 linux_wait_for_event - new variable wait_ptid, use it.
1342 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
1343
13442012-01-23 Pedro Alves <palves@redhat.com>
1345
1346 * server.c (main): Avoid yet another case of infinite loop while
1347 detaching/killing after a longjmp.
1348
13492012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
1350
1351 Code cleanup.
1352 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
1353
13542012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
1355
1356 * hostio.c (handle_readlink): New function.
1357 (handle_vFile): Call it to handle "vFile:readlink" packets.
1358
13592012-01-20 Pedro Alves <palves@redhat.com>
1360 Ulrich Weigand <ulrich.weigand@linaro.org>
1361
1362 * server.c (handle_v_requests): Only support vAttach and vRun to
1363 start multiple processes when in extended protocol mode.
1364
13652012-01-17 Pedro Alves <palves@redhat.com>
1366
1367 * tracepoint.c (initialize_tracepoint): Use mmap instead of
1368 memalign plus mprotect to allocate the scratch buffer.
1369
13702012-01-13 Pedro Alves <palves@redhat.com>
1371
1372 * server.c (attach_inferior): Clear `cont_thread'.
1373
13742012-01-13 Pedro Alves <palves@redhat.com>
1375
1376 * server.c (main): Avoid infinite loop while detaching/killing
1377 after a longjmp.
1378
13792012-01-09 Doug Evans <dje@google.com>
1380
1381 * server.c (start_inferior): Set last_ptid in --wrapper case.
1382
13832012-01-06 Yao Qi <yao@codesourcery.com>
1384
1385 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
1386 defined.
1387 [IN_PROCESS_AGENT] (debug_agent): New global variable.
1388
13892012-01-04 Yao Qi <yao@codesourcery.com>
1390
1391 * tracepoint.c (cmd_qtdp): Print debug message
1392 for static tracepoint.
1393
13942012-01-04 Yao Qi <yao@codesourcery.com>
1395
1396 * tracepoint.c (trace_vdebug): Differentiate debug message
1397 between gdbserver and IPA.
1398
13992012-01-03 Yao Qi <yao@codesourcery.com>
1400
1401 * tracepoint.c (tracepoint_was_hit): Don't collect for
1402 static tracepoint.
1403
14042012-01-02 Joel Brobecker <brobecker@adacore.com>
1405
1406 * terminal.h: Reformat copyright header.
1407
14082012-01-02 Joel Brobecker <brobecker@adacore.com>
1409
1410 * server.c (gdbserver_version): Update copyright year.
1411 * gdbreplay.c (gdbreplay_version): Likewise.
1412
14132011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
1414
1415 * linux-low.c (linux_create_inferior): Put empty if clause for write.
1416
1417 Revert:
1418 2011-12-18 Hui Zhu <teawater@gmail.com>
1419 * linux-low.c (linux_create_inferior): Save return value to ret.
1420
14212011-12-18 Hui Zhu <teawater@gmail.com>
1422
1423 * linux-low.c (linux_create_inferior): Save return value to ret.
1424
14252011-12-16 Doug Evans <dje@google.com>
1426
1427 * linux-low.c (linux_create_inferior): If stdio connection,
1428 redirect stdin from /dev/null, stdout to stderr.
1429 * remote-utils.c (remote_is_stdio): New static global.
1430 (remote_connection_is_stdio): New function.
1431 (remote_prepare): Handle stdio connection.
1432 (remote_open): Ditto.
1433 (remote_close): Don't close stdin for stdio connections.
1434 (read_prim,write_prim): New functions. Replace all calls to
1435 read/write to these.
1436 * server.c (main): Watch for "-" argument. Move call to
1437 remote_prepare before start_inferior.
1438 * server.h (STDIO_CONNECTION_NAME): New macro.
1439 (remote_connection_is_stdio): Declare.
1440
1441 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
1442 in debugging output.
1443
14442011-12-15 Yao Qi <yao@codesourcery.com>
1445
1446 * tracepoint.c: Include sys/syscall.h.
1447 (gdb_ust_thread): Remove preprocessor conditional.
1448
14492011-12-14 Pedro Alves <pedro@codesourcery.com>
1450
1451 * linux-low.c (linux_detach_one_lwp): Call
1452 the_low_target.prepare_to_resume before detaching.
1453
14542011-12-14 Yao Qi <yao@codesourcery.com>
1455
1456 * tracepoint.c (gdb_ust_thread): Don't ignore return value
1457 of write.
1458
14592011-12-14 Yao Qi <yao@codesourcery.com>
1460
1461 * i386-low.c (i386_low_stopped_data_address): Initialize local
1462 variable `control'.
1463
14642011-12-13 Pedro Alves <pedro@codesourcery.com>
1465
1466 PR remote/13492
1467
1468 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
1469 DR_CONTROL unless necessary. Extend comments.
1470 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
1471 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
1472
14732011-12-13 Yao Qi <yao@codesourcery.com>
1474
1475 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
1476 macros.
1477 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
1478
14792011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
1480
1481 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
1482 Print new debug message for such case.
1483
14842011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
1485
1486 Fix overlapping memcpy.
1487 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
1488 the read_inferior_memory transfer.
1489 (delete_fast_tracepoint_jump): New variable buf. Use it for the
1490 write_inferior_memory transfer.
1491 (set_fast_tracepoint_jump): New variable buf. Use it for the
1492 read_inferior_memory and write_inferior_memory transfers.
1493 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
1494 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
1495 Use it for the write_inferior_memory transfer.
1496 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
1497 buffers.
1498
14992011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
1500
1501 * linux-low.c (fetch_register, store_register): Make code
1502 consistent, fix formatting.
1503
15042011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
1505
1506 * linux-low.c (usr_store_inferior_registers): Factor out code
1507 to handle individual registers into...
1508 (store_register): ... this new function.
1509
15102011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
1511
1512 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
1513 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
1514 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
1515 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
1516 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
1517 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
1518 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
1519 (srv_xmlfiles): Add new XML files.
1520
1521 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
1522 and <sys/uio.h>.
1523 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
1524 (init_registers_s390_linux32v1): Add prototype.
1525 (init_registers_s390_linux32v2): Likewise.
1526 (init_registers_s390_linux64v1): Likewise.
1527 (init_registers_s390_linux64v2): Likewise.
1528 (init_registers_s390x_linux64v1): Likewise.
1529 (init_registers_s390x_linux64v2): Likewise.
1530 (s390_num_regs): Increment to 52.
1531 (s390_regmap): Add orig_r2 register.
1532 (s390_num_regs_3264): Increment to 68.
1533 (s390_regmap_3264): Add orig_r2 register.
1534 (s390_collect_ptrace_register): Handle orig_r2 register.
1535 (s390_supply_ptrace_register): Likewise.
1536 (s390_fill_last_break): New function.
1537 (s390_store_last_break): Likewise.
1538 (s390_fill_system_call): New function.
1539 (s390_store_system_call): Likewise.
1540 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
1541 register sets.
1542 (s390_check_regset): New function.
1543 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
1544 NT_S390_SYSTEM_CALL regsets and use appropriate description.
1545 Update target_regsets for available register sets.
1546
15472011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
1548 Jan Kratochvil <jan.kratochvil@redhat.com>
1549
1550 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
1551 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
1552 New.
1553 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
1554 * linux-low.h (struct process_info_private): New member r_debug.
1555 * server.c (handle_qxfer_libraries): Call
1556 the_target->qxfer_libraries_svr4.
1557 (handle_qxfer_libraries_svr4): New function.
1558 (qxfer_packets): New entry "libraries-svr4".
1559 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
1560 * target.h (struct target_ops): New member qxfer_libraries_svr4.
1561 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
1562 PACKET_qXfer_libraries_svr4.
1563
15642011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
1565
1566 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
1567 PSW address/mask between 8-byte and 16-byte formats.
1568 (s390_supply_ptrace_register): Likewise.
1569 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
1570 basic addressing mode bit.
1571
15722011-11-24 Stan Shebs <stan@codesourcery.com>
1573
1574 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
1575
15762011-11-17 Stan Shebs <stan@codesourcery.com>
1577
1578 * tracepoint.c (struct tracepoint): New field traceframe_usage.
1579 (tracing_start_time): New global.
1580 (tracing_stop_time): New global.
1581 (tracing_user_name): New global.
1582 (tracing_notes): New global.
1583 (tracing_stop_note): New global.
1584 (cmd_qtstart): Set traceframe_usage, start_time.
1585 (stop_tracing): Set stop_time.
1586 (cmd_qtstatus): Report additional status.
1587 (cmd_qtp): New function.
1588 (handle_tracepoint_query): Call it.
1589 (cmd_qtnotes): New function.
1590 (handle_tracepoint_general_set): Call it.
1591 (get_timestamp): Rename from tsv_get_timestamp.
1592
15932011-11-14 Stan Shebs <stan@codesourcery.com>
1594 Kwok Cheung Yeung <kcy@codesourcery.com>
1595
1596 * linux-x86-low.c (small_jump_insn): New.
1597 (i386_install_fast_tracepoint_jump_pad): Add arguments for
1598 trampoline and error message, build a trampoline and issue a small
1599 jump instruction to it.
1600 (x86_install_fast_tracepoint_jump_pad): Add arguments for
1601 trampoline and error message.
1602 (x86_get_min_fast_tracepoint_insn_len): New.
1603 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
1604 * linux-low.h (struct linux_target_ops): Add arguments to
1605 install_fast_tracepoint_jump_pad operation, add new operation.
1606 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
1607 arguments.
1608 (linux_get_min_fast_tracepoint_insn_len): New function.
1609 (linux_target_op): Add new operation.
1610 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
1611 (gdb_trampoline_buffer_end): Ditto.
1612 (gdb_trampoline_buffer_error): Ditto.
1613 (struct ipa_sym_addresses): Add fields for new IPA variables.
1614 (symbol_list): Add entries for new IPA variables.
1615 (struct tracepoint): Add fields to hold the address range of the
1616 trampoline used by the tracepoint.
1617 (trampoline_buffer_head): New static variable.
1618 (trampoline_buffer_tail): Ditto.
1619 (claim_trampoline_space): New function.
1620 (have_fast_tracepoint_trampoline_buffer): New function.
1621 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
1622 structure.
1623 (install_fast_tracepoint): Ditto, also add error buffer argument.
1624 (cmd_qtminftpilen): New function.
1625 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
1626 (fast_tracepoint_from_trampoline_address): New function.
1627 (fast_tracepoint_collecting): Handle trampoline as part of jump
1628 pad space.
1629 (set_trampoline_buffer_space): New function.
1630 (initialize_tracepoint): Initialize new IPA variables.
1631 * target.h (struct target_ops): Add arguments to
1632 install_fast_tracepoint_jump_pad operation, add new
1633 get_min_fast_tracepoint_insn_len operation.
1634 (target_get_min_fast_tracepoint_insn_len): New.
1635 (install_fast_tracepoint_jump_pad): Add arguments.
1636 * server.h (IPA_BUFSIZ): Define.
1637 * linux-i386-ipa.c: Include extra header files.
1638 (initialize_fast_tracepoint_trampoline_buffer): New function.
1639 (initialize_low_tracepoint): Call it.
1640 * server.h (set_trampoline_buffer_space): Declare.
1641 (claim_trampoline_space): Ditto.
1642 (have_fast_tracepoint_trampoline_buffer): Ditto.
1643
16442011-11-14 Yao Qi <yao@codesourcery.com>
1645
1646 * server.c (handle_query): Handle InstallInTrace for qSupported.
1647 * tracepoint.c (add_tracepoint): Sort list.
1648 (install_tracepoint, download_tracepoint): New.
1649 (cmd_qtdp): Call them to install and download tracepoints.
1650 (sort_tracepoints): Removed.
1651 (cmd_qtstart): Update.
1652
16532011-11-14 Yao Qi <yao@codesourcery.com>
1654
1655 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
1656 * mem-break.h: Declare.
1657 * tracepoint.c (cmd_qtstart): Move some code to ...
1658 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
1659 New.
1660 (download_tracepoints): Move some code to ...
1661 (download_tracepoint_1): ... here. New.
1662
16632011-11-08 Yao Qi <yao@codesourcery.com>
1664
1665 * remote-utils.c (relocate_instruction): A comment fix.
1666
16672011-11-07 Joel Brobecker <brobecker@adacore.com>
1668
1669 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
1670 (i386_dr_low_get_control, i386_dr_low_get_status): Use
1671 dr_status_mirror and dr_control_mirror from debug_reg_state.
1672 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
1673 (i386_initial_stuff): Remove use of deleted globals.
1674 (i386_get_thread_context, i386_set_thread_context,
1675 i386_thread_added): Use dr_status_mirror and dr_control_mirror
1676 from debug_reg_state.
1677
16782011-11-05 Yao Qi <yao@codesourcery.com>
1679
1680 * tracepoint.c (gdb_collect): Loop over tracepoints of same
1681 address as TPOINT's.
1682
16832011-11-02 Stan Shebs <stan@codesourcery.com>
1684
1685 * tracepoint.c (agent_mem_read_string): New function.
1686 (eval_agent_expr): Call it for tracenz.
1687 * server.c (handle_query): Report support for tracenz.
1688
16892011-11-02 Yao Qi <yao@codesourcery.com>
1690
1691 * tracepoint.c (cmd_qtstart): Remove unused local variables.
1692
16932011-11-02 Yao Qi <yao@codesourcery.com>
1694
1695 * target.h: Fix a typo in comment.
1696
16972011-10-31 Pedro Alves <pedro@codesourcery.com>
1698
1699 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
1700 clobber the breakpoints' shadows with fast tracepoint jumps.
1701 * mem-break.h (check_mem_write): Add `myaddr' parameter.
1702 * target.c (write_inferior_memory): Also pass MYADDR down to
1703 check_mem_write.
1704
17052011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
1706
1707 * configure.ac: Check support for personality routine.
1708 * configure: Regenerate.
1709 * config.in: Likewise.
1710 * linux-low.c: Include <sys/personality.h>.
1711 Define ADDR_NO_RANDOMIZE if necessary.
1712 (linux_create_inferior): Disable address space randomization when
1713 forking inferior, if requested.
1714 (linux_supports_disable_randomization): New function.
1715 (linux_target_ops): Install it.
1716 * server.h (disable_randomization): Declare.
1717 * server.c (disable_randomization): New global variable.
1718 (handle_general_set): Handle QDisableRandomization.
1719 (handle_query): Likewise for qSupported.
1720 (main): Support --disable-randomization and --no-disable-randomization
1721 command line arguments.
1722 * target.h (struct target_ops): Add supports_disable_randomization.
1723 (target_supports_disable_randomization): New macro.
1724
17252011-09-29 Mike Frysinger <vapier@gentoo.org>
1726
1727 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
1728 ifdef check.
1729 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
1730 [!PT_GETDSBT] (target_loadmap): New definition.
1731 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
1732 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
1733 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
1734 and PT_GETDSBT to LINUX_LOADMAP.
1735 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
1736 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
1737
17382011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
1739
1740 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
1741 (arm_linux_hwbp_cap): New static variable.
1742 (arm_linux_get_hwbp_cap): Replace by ...
1743 (arm_linux_init_hwbp_cap): ... this new function.
1744 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
1745 (arm_linux_get_hw_watchpoint_count): Likewise.
1746 (arm_linux_get_hw_watchpoint_max_length): Likewise.
1747 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
1748 (arm_prepare_to_resume): Use perror_with_name instead of error.
1749
17502011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
1751
1752 * linux-arm-low.c: Include <signal.h>.
1753 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
1754 (struct arm_linux_hwbp_cap): New data type.
1755 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
1756 (struct arm_linux_hw_breakpoint): New data type.
1757 (MAX_BPTS, MAX_WPTS): Define.
1758 (struct arch_process_info, struct arch_lwp_info): New data types.
1759 (arm_linux_get_hwbp_cap): New function.
1760 (arm_linux_get_hw_breakpoint_count): Likewise.
1761 (arm_linux_get_hw_watchpoint_count): Likewise.
1762 (arm_linux_get_hw_watchpoint_max_length): Likewise.
1763 (arm_hwbp_control_initialize): Likewise.
1764 (arm_hwbp_control_is_enabled): Likewise.
1765 (arm_hwbp_control_is_initialized): Likewise.
1766 (arm_hwbp_control_disable): Likewise.
1767 (arm_linux_hw_breakpoint_equal): Likewise.
1768 (arm_linux_hw_point_initialize): Likewise.
1769 (struct update_registers_data): New data structure.
1770 (update_registers_callback: New function.
1771 (arm_insert_point): Likewise.
1772 (arm_remove_point): Likewise.
1773 (arm_stopped_by_watchpoint): Likewise.
1774 (arm_stopped_data_address): Likewise.
1775 (arm_new_process): Likewise.
1776 (arm_new_thread): Likewise.
1777 (arm_prepare_to_resume): Likewise.
1778 (the_low_target): Register arm_insert_point, arm_remove_point,
1779 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
1780 arm_new_thread, and arm_prepare_to_resume.
1781
17822011-09-15 Stan Shebs <stan@codesourcery.com>
1783
1784 * server.h (struct emit_ops): Add compare-goto fields.
1785 * tracepoint.c (gdb_agent_op_sizes): New table.
1786 (emit_eq_goto): New function.
1787 (emit_ne_goto): New function.
1788 (emit_lt_goto): New function.
1789 (emit_le_goto): New function.
1790 (emit_gt_goto): New function.
1791 (emit_ge_goto): New function.
1792 (is_goto_target): New function.
1793 (compile_bytecodes): Recognize special cases of compare-goto
1794 combinations and call specialized emitters for them.
1795 * linux-x86-low.c (amd64_emit_eq_goto): New function.
1796 (amd64_emit_ne_goto): New function.
1797 (amd64_emit_lt_goto): New function.
1798 (amd64_emit_le_goto): New function.
1799 (amd64_emit_gt_goto): New function.
1800 (amd64_emit_ge_goto): New function.
1801 (amd64_emit_ops): Add the new functions.
1802 (i386_emit_eq_goto): New function.
1803 (i386_emit_ne_goto): New function.
1804 (i386_emit_lt_goto): New function.
1805 (i386_emit_le_goto): New function.
1806 (i386_emit_gt_goto): New function.
1807 (i386_emit_ge_goto): New function.
1808 (i386_emit_ops): Add the new functions.
1809
18102011-09-08 Stan Shebs <stan@codesourcery.com>
1811
1812 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
1813 (i386_emit_epilogue): Restore %ebx.
1814
18152011-08-31 Jie Zhang <jzhang918@gmail.com>
1816
1817 * server.c (step_thread): Remove definition.
1818 (process_serial_event): Don't handle Hs.
1819 * server.h (step_thread): Remove declaration.
1820 * target.c (set_desired_inferior): Remove use of step_thread.
1821
18222011-08-24 Luis Machado <lgustavo@codesourcery.com>
1823
1824 * linux-low.c: Include linux-procfs.h.
1825 (linux_attach_lwp_1): Update comments.
1826 (linux_attach): Scan for existing threads when attaching to a
1827 process that is the tgid.
1828 * Makefile.in: Update dependencies.
1829
18302011-08-24 Luis Machado <lgustavo@codesourcery.com>
1831
1832 * configure.srv: Add linux-procfs.o dependencies.
1833
18342011-08-14 Yao Qi <yao@codesourcery.com>
1835
1836 * target.h (struct target_ops): Fix indent.
1837 * win32-low.c (win32_target_ops): Fix comment.
1838
18392011-08-14 Andrew Jenner <andrew@codesourcery.com>
1840 Yao Qi <yao@codesourcery.com>
1841
1842 * Makefile.in (clean): Remove tic6x-*.c files.
1843 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
1844 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
1845 (tic6x-c64xp-linux.c): Likewise.
1846 * configure.srv: Add support for tic6x-*-uclinux.
1847 * linux-tic6x-low.c: New.
1848 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
1849
18502011-08-14 Andrew Stubbs <ams@codesourcery.com>
1851 Yao Qi <yao@codesourcery.com>
1852
1853 * target.h (struct target_ops): Add read_loadmap.
1854 * linux-low.c (struct target_loadseg): New type.
1855 (struct target_loadmap): New type.
1856 (linux_read_loadmap): New function.
1857 (linux_target_ops): Add linux_read_loadmap.
1858 * server.c (handle_query): Support qXfer:fdpic:read packet.
1859 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
1860 to NULL.
1861
18622011-08-05 Eli Zaretskii <eliz@gnu.org>
1863
1864 * win32-low.c: Include <stdint.h>.
1865
18662011-07-22 Pedro Alves <pedro@codesourcery.com>
1867
1868 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
1869 to the inferior here.
1870 (i386_remove_aligned_watchpoint): Ditto.
1871 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
1872 fit part of the watchpoint in the debug registers.
1873 (i386_update_inferior_debug_regs): New.
1874 (i386_low_insert_watchpoint): Work on a local mirror of the debug
1875 registers, and only update the inferior on success.
1876 (i386_low_remove_watchpoint): Ditto.
1877
18782011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
1879
1880 * linux-low.c (compare_ints, unique, list_threads, show_process,
1881 linux_core_of_thread): Delete.
1882 (linux_target_ops): Change linux_core_of_thread to
1883 linux_common_core_of_thread.
1884 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
1885 * utils.c (malloc_failure): Change type of argument.
1886 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
1887 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
1888 common/linux-osdata.c, common/ptid.c and common/buffer.c.
1889 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
1890 (IPA_OBJS): Add common-utils-ipa.o.
1891 (ptid_h, linux_osdata_h): New macros.
1892 (server_h): Add common/common-utils.h, common/xml-utils.h,
1893 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
1894 common/ptid.h.
1895 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
1896 ptid.o, buffer.o): New rules.
1897 (linux-low.o): Add common/linux-osdata.h as a dependency.
1898 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
1899 * configure.ac: Add AC_HEADER_DIRENT check.
1900 * config.in: Regenerate.
1901 * configure: Regenerate.
1902 * remote-utils.c (xml_escape_text): Delete.
1903 (buffer_grow, buffer_free, buffer_init, buffer_finish,
1904 buffer_xml_printf): Move to common/buffer.c.
1905 * server.c (main): Remove call to initialize_inferiors.
1906 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
1907 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
1908 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
1909 internal_error, gdb_assert, gdb_assert_fail): Delete.
1910 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
1911 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
1912 common/buffer.h.
1913 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
1914 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
1915 initialize_inferiors): Delete.
1916
19172011-07-20 Pedro Alves <pedro@codesourcery.com>
1918
1919 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
1920 symbol error.
1921
19222011-05-31 Pedro Alves <pedro@codesourcery.com>
1923
1924 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
1925 assertion.
1926 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
1927
19282011-05-26 Yao Qi <yao@codesourcery.com>
1929
1930 * Makefile.in (thread-db.o): Track dependence to
1931 common/gdb_thread_db.h.
1932 * thread-db.c: include gdb_thread_db.h from right place.
1933
19342011-05-16 Adrian Cornish <gnu@bluedreamer.com>
1935
1936 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
1937 __FILE__ and __LINE__ to internal_error.
1938
19392011-05-13 Doug Evans <dje@google.com>
1940
1941 * thread-db.c (try_thread_db_load_from_sdir): New function.
1942 (try_thread_db_load_from_dir): New function.
1943 (thread_db_load_search): Handle $sdir, ignore $pdir.
1944 Remove trying of system directories if search of
1945 libthread-db-search-path fails, that is now done via $sdir.
1946
19472011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
1948
1949 * server.c (handle_query): Add EnableDisableTracepoints to the list
1950 of supported features.
1951 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
1952 tracepoints.
1953 (cmd_qtenable_disable): New.
1954 (cmd_qtstart): Install tracepoints even if disabled.
1955 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
1956 receiving a QTEnable or QTDisable packet.
1957 (gdb_collect): Skip data collection if fast tracepoint is disabled.
1958 (ust_marker_to_static_tracepoint): Do not ignore disabled static
1959 tracepoints.
1960 (gdb_probe): Skip data collection if static tracepoint is disabled.
1961
19622011-05-10 Doug Evans <dje@google.com>
1963
1964 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
1965
19662011-05-04 Doug Evans <dje@google.com>
1967
1968 * linux-low.c (linux_join): Skip process lookup.
1969 * spu-low.c (spu_join): Ditto.
1970 * server.c (join_inferiors_callback): Delete.
1971 (process_serial_event): For 'D' packet (detach) call join_inferior
1972 directly.
1973
19742011-05-04 Joseph Myers <joseph@codesourcery.com>
1975
1976 * README: Don't mention xscale*-*-linux*.
1977 * configure.srv (xscale*-*-linux*): Don't handle target.
1978
19792011-04-27 Nathan Froyd <froydnj@codesourcery.com>
1980
1981 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
1982 casting pointers.
1983 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
1984 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
1985 (i386_emit_void_call_2): Likewise.
1986
19872011-04-26 Yao Qi <yao@codesourcery.com>
1988
1989 * linux-low.c: Move common macros to linux-ptrace.h.
1990 Include linux-ptrace.h.
1991 * Makefile.in (linux_ptrace_h): New.
1992 (linux-low.o): Depends on linux-ptrace.h.
1993
19942011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
1995
1996 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
1997 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
1998 (remote_prepare): New function with most of the TCP code from ...
1999 (remote_open): ... here. Detect PORT here unconditionally. Move also
2000 setting transport_is_reliable.
2001 * server.c (run_once): New variable.
2002 (gdbserver_usage): Document it.
2003 (main): Set run_once for `--once'. Call remote_prepare. Exit after
2004 the first run if RUN_ONCE.
2005 * server.h (run_once, remote_prepare): New declarations.
2006
20072011-04-19 Tom Tromey <tromey@redhat.com>
2008
2009 * win32-low.c (handle_load_dll): Remove duplicate "the".
2010
20112011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
2012
2013 Remove support for old Cygwin 1.5 versions.
2014 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
2015 function to avoid warning.
2016 (win32_add_one_solib): Use cygwin_conv_path function to avoid
2017 warning.
2018
20192011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
2020
2021 * gdbserver/server.h (Macro _): Define it if not available.
2022
20232011-03-14 Michael Snyder <msnyder@vmware.com>
2024
2025 * hostio.c (handle_close): Remove unnecessary null test.
2026
20272011-03-10 Joel Brobecker <brobecker@adacore.com>
2028
2029 * Makefile.in (maintainer-clean realclean distclean): Remove
2030 "make ... subdir_do" command.
2031
20322011-03-10 Michael Snyder <msnyder@vmware.com>
2033
2034 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
2035
2036 * server.c (handle_v_run): Free alloced buffer on early return.
2037
20382011-03-09 Yao Qi <yao@codesourcery.com>
2039
2040 Revert:
2041 2011-03-04 Yao Qi <yao@codesourcery.com>
2042
2043 * Makefile.in: Remove GNU make feature --directory.
2044
2045 2011-03-05 Yao Qi <yao@codesourcery.com>
2046
2047 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
2048 (subdir_do): New make target. Copied from gdb/Makefile.
2049 (maintainer-clean, realclean, distclean, clean): Call corresponding
2050 make targets in common/Makefile.
2051
2052 2011-02-11 Yao Qi <yao@codesourcery.com>
2053
2054 * configure.ac: Call AC_PROG_RANLIB.
2055 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
2056 * configure: Regenerate.
2057
20582011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
2059
2060 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
2061
20622011-03-06 Yao Qi <yao@codesourcery.com>
2063
2064 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
2065
20662011-03-05 Yao Qi <yao@codesourcery.com>
2067
2068 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
2069 (subdir_do): New make target. Copied from gdb/Makefile.
2070 (maintainer-clean, realclean, distclean, clean): Call corresponding
2071 make targets in common/Makefile.
2072
20732011-03-04 Yao Qi <yao@codesourcery.com>
2074
2075 * Makefile.in: Remove GNU make feature --directory.
2076
20772011-03-04 Michael Snyder <msnyder@vmware.com>
2078
2079 * server.c (queue_stop_reply): Call xmalloc not malloc.
2080
20812011-03-02 Michael Snyder <msnyder@vmware.com>
2082
2083 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
2084
20852011-02-28 Michael Snyder <msnyder@vmware.com>
2086
2087 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
2088 (cmd_qtframe): Ditto.
2089 (cmd_qtbuffer): Ditto.
2090 (cmd_bigqtbuffer): Ditto.
2091
2092 * utils.c (decimal2str): Initialize 'width' to nine, then
2093 don't mess with it.
2094
20952011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
2096
2097 * hostio.c (require_data): Free *data, not data.
2098
20992011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
2100
2101 * hostio.c (require_data): Use free, not xfree.
2102
21032011-02-27 Michael Snyder <msnyder@vmware.com>
2104
2105 * server.c (handle_query): Discard unused value.
2106
2107 * hostio.c (require_data): Free malloc memory before returning
2108 error.
2109
21102011-02-26 Michael Snyder <msnyder@vmware.com>
2111
2112 * linux-low.c (list_threads): Call closedir for dirent.
2113
21142011-02-27 Michael Snyder <msnyder@vmware.com>
2115
2116 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
2117 a case statement falls through.
2118
2119 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
2120
2121 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
2122 in comparison.
2123
21242011-02-26 Michael Snyder <msnyder@vmware.com>
2125
2126 * utils.c (decimal2str): Eliminate dead code and dead param.
2127 (pulongest): Drop dead param from call to decimal2str.
2128 (plongest): Ditto.
2129
21302011-02-24 Joel Brobecker <brobecker@adacore.com>
2131
2132 Revert the following patch (not approved yet):
2133 2011-02-21 Hui Zhu <teawater@gmail.com>
2134 * tracepoint.c (tp_printf): New function.
2135 (eval_agent_expr): Handle gdb_agent_op_printf.
2136
21372011-02-21 Hui Zhu <teawater@gmail.com>
2138
2139 * tracepoint.c (tp_printf): New function.
2140 (eval_agent_expr): Handle gdb_agent_op_printf.
2141
21422011-02-18 Tom Tromey <tromey@redhat.com>
2143
2144 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
2145 (tracepoint.o): Likewise.
2146 * tracepoint.c (enum gdb_agent_op): Use ax.def.
2147 (gdb_agent_op_names): Likewise.
2148
21492011-02-18 Tom Tromey <tromey@redhat.com>
2150
2151 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
2152 gdb_agent_op_rot>: New constants.
2153 (gdb_agent_op_names): Add pick and roll.
2154 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
2155 cases.
2156
21572011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
2158
2159 * aclocal.m4: Regenerated with aclocal-1.11.1.
2160
21612011-02-14 Pedro Alves <pedro@codesourcery.com>
2162
2163 * server.c (handle_qxfer_traceframe_info): New.
2164 (qxfer_packets): Register "traceframe-info".
2165 (handle_query): Report support for qXfer:traceframe-info:read+.
2166 * tracepoint.c (match_blocktype): New.
2167 (traceframe_find_block_type): Rename to ...
2168 (traceframe_walk_blocks): ... this. Add callback filter argument,
2169 and use it.
2170 (traceframe_find_block_type): New, reimplemented on top of
2171 traceframe_walk_blocks.
2172 (build_traceframe_info_xml): New.
2173 (traceframe_read_info): New.
2174 * server.h (traceframe_read_info): Declare.
2175
21762011-02-11 Yao Qi <yao@codesourcery.com>
2177
2178 * configure.ac: Call AC_PROG_RANLIB.
2179 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
2180 * configure: Regenerate.
2181
21822011-02-07 Pedro Alves <pedro@codesourcery.com>
2183
2184 * server.c (gdb_read_memory): Change return semantics to allow
2185 partial transfers.
2186 (handle_search_memory_1): Adjust.
2187 (process_serial_event) <'m' packet>: Handle partial transfers.
2188 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
2189
21902011-01-28 Pedro Alves <pedro@codesourcery.com>
2191
2192 * regcache.c (init_register_cache): Initialize
2193 regcache->register_status.
2194 (free_register_cache): Release regcache->register_status.
2195 (regcache_cpy): Copy register_status.
2196 (registers_to_string): Print 'x's for unavailable registers.
2197 (supply_register): Mark the register's status valid or
2198 unavailable, depending on whether a buffer was passed in or not.
2199 (supply_register_zeroed): New.
2200 (supply_regblock): Mark the registers' status valid or
2201 unavailable, depending on whether a buffer was passed in or not.
2202 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
2203 (struct regcache): New `register_status' field.
2204 (supply_register_zeroed): Declare.
2205 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
2206 supply_register_zeroed, rather than passing a NULL buffer to
2207 supply_register.
2208 * tracepoint.c (fetch_traceframe_registers): Update comment.
2209
22102011-01-28 Pedro Alves <pedro@codesourcery.com>
2211
2212 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
2213 buffer explicit.
2214
22152011-01-25 Pedro Alves <pedro@codesourcery.com>
2216
2217 * server.h (decode_xfer_write): Change prototype.
2218 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
2219 and don't extract the annex here.
2220 * server.c (decode_xfer_read): Remove `annex' parameter,
2221 and don't extract the annex here.
2222 (decode_xfer): New.
2223 (struct qxfer): New.
2224 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
2225 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
2226 (handle_qxfer_statictrace): New functions, abstracted out from
2227 handle_query, and made to use the struct qxfer interface.
2228 (handle_threads_qxfer_proper): Rename to ...
2229 (handle_qxfer_threads_proper): ... this.
2230 (handle_threads_qxfer): Rename to ...
2231 (handle_qxfer_threads): ... this. Adjust.
2232 (qxfer_packets): New array.
2233 (handle_qxfer): New function.
2234 (handle_query): Use handle_qxfer.
2235
22362011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
2237
2238 * gdbreplay.c: Shorten lines of >= 80 columns.
2239 * linux-low.c: Ditto.
2240 * linux-ppc-low.c: Ditto.
2241 * linux-s390-low.c: Ditto.
2242 * linux-sparc-low.c: Ditto.
2243 * linux-x86-low.c: Ditto.
2244 * linux-xtensa-low.c: Ditto.
2245 * mem-break.c: Ditto.
2246 * nto-low.c: Ditto.
2247 * regcache.h: Ditto.
2248 * remote-utils.c: Ditto.
2249 * server.c: Ditto.
2250 * server.h: Ditto.
2251 * thread-db.c: Ditto.
2252 * tracepoint.c: Ditto.
2253 * utils.c: Ditto.
2254 * win32-low.h: Ditto.
2255
22562011-01-05 Joel Brobecker <brobecker@adacore.com>
2257
2258 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
2259 update.
2260
22612011-01-01 Joel Brobecker <brobecker@adacore.com>
2262
2263 * server.c (gdbserver_version): Update copyright year in version
2264 output.
2265 * gdbreplay.c (gdbreplay_version): Ditto.
2266
22672010-12-29 Jie Zhang <jie.zhang@analog.com>
2268
2269 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
2270 * linux-bfin-low.c: New file.
2271 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
2272 PT_DATA_ADDR for BFIN targets.
2273 * Makefile.in (SFILES): Add linux-bfin-low.c.
2274 (clean): Remove reg-bfin.c.
2275 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
2276 * README: Mention supported Blackfin targets.
2277
22782010-12-23 Mike Frysinger <vapier@gentoo.org>
2279
2280 * .gitignore: New file.
2281
22822010-11-16 Mike Frysinger <vapier@gentoo.org>
2283
2284 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
2285
22862010-10-22 Jie Zhang <jie@codesourcery.com>
2287
2288 * Makefile.in: Add FLAGS_TO_PASS variable.
2289 (install): Remove dependency of install-only and recursively
2290 invoke make for install-only.
2291
22922010-10-04 Doug Evans <dje@google.com>
2293
2294 * Makefile.in (uninstall): Use $(DESTDIR).
2295
22962010-09-24 Pedro Alves <pedro@codesourcery.com>
2297
2298 PR gdb/11842
2299
2300 * linux-x86-low.c (compat_siginfo_from_siginfo)
2301 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
2302 si_code is < 0. Check for si_code == SI_TIMER before checking for
2303 si_code < 0.
2304
23052010-09-13 Joel Brobecker <brobecker@adacore.com>
2306
2307 * lynx-i386-low.c: New file.
2308 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
2309
23102010-09-13 Joel Brobecker <brobecker@adacore.com>
2311
2312 * lynx-low.c (ptrace_request_to_str): Remove handling for
2313 request values that have been removed in LynxOS 5.x.
2314
23152010-09-13 Joel Brobecker <brobecker@adacore.com>
2316
2317 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
2318 <ptrace.h>
2319
23202010-09-09 Nathan Sidwell <nathan@codesourcery.com>
2321
2322 * configure.ac: Add --enable-inprocess-agent option.
2323 * configure: Rebuilt.
2324
23252010-09-06 Yao Qi <yao@codesourcery.com>
2326
2327 * linux-low.c (linux_kill): Remove unused variable.
2328 (linux_stabilize_threads): Likewise.
2329 * server.c (start_inferior): Likewise.
2330 (queue_stop_reply_callback): Likewise.
2331 * tracepoint.c (do_action_at_tracepoint): Likewise.
2332
23332010-09-06 Yao Qi <yao@codesourcery.com>
2334
2335 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
2336 on return.
2337
23382010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
2339
2340 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
2341
23422010-09-06 Pedro Alves <pedro@codesourcery.com>
2343
2344 * Makefile.in (install-only): Replace $IPA_DEPFILES with
2345 "$(IPA_DEPFILES)".
2346
23472010-09-01 Joel Brobecker <brobecker@adacore.com>
2348
2349 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
2350 gdbserver/lynx-ppc-low.c: New files.
2351 * Makefile.in (lynx_low_h): New variable.
2352 (lynx-low.o, lynx-ppc-low.o): New rules.
2353 * configure.ac: On LynxOS, link with -lnetinet.
2354 * configure.srv: Add handling of powerpc-*-lynxos* targets.
2355 * configure: regenerate.
2356
23572010-09-01 Joel Brobecker <brobecker@adacore.com>
2358
2359 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
2360 * configure.ac: Add check for vasprintf and vsnprintf.
2361 * configure, config.in: Regenerate.
2362 * server.h (vasprintf, vsnprintf): Add conditional declarations.
2363
23642010-09-01 Joel Brobecker <brobecker@adacore.com>
2365
2366 * gdbreplay.c: Move include of alloca.h up, next to include of
2367 malloc.h.
2368 * server.h: Add include of malloc.h.
2369 * mem-break.c: Remove include of malloc.h.
2370 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
2371
23722010-09-01 Joel Brobecker <brobecker@adacore.com>
2373
2374 * Makefile.in (memmem.o): Build with -Wno-error.
2375
23762010-09-01 Joel Brobecker <brobecker@adacore.com>
2377
2378 * utils.c (xsnprintf): Make non-static.
2379 * server.h: Add xsnprintf declaration.
2380 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
2381 replace calls to snprintf by calls to xsnprintf throughout.
2382
23832010-09-01 Joel Brobecker <brobecker@adacore.com>
2384
2385 * configure.ac: Add configure check for alloca.
2386 * configure, config.in: Regenerate.
2387 * server.h: Include alloca.h if it exists.
2388 * gdbreplay.c: Include alloca.h if it exists.
2389
23902010-08-28 Pedro Alves <pedro@codesourcery.com>
2391
2392 * linux-low.c (__SIGRTMIN): Define if not already defined.
2393 (linux_create_inferior): Check for __ANDROID__ rather than
2394 __SIGRTMIN.
2395 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
2396 are already deferred.
2397 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
2398 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
2399 stopped and already has a pending signal to report.
2400 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
2401 a pending signal to report or is moving out of a jump pad.
2402 (linux_init_signals): Check for __ANDROID__ rather than
2403 __SIGRTMIN.
2404
24052010-08-28 Pedro Alves <pedro@codesourcery.com>
2406
2407 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
2408 debug_threads check. Avoid a linear search when not doing debug
2409 output.
2410
24112010-08-27 Pedro Alves <pedro@codesourcery.com>
2412
2413 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
2414 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
2415 (struct file_handler) <fd>: Change type to gdb_fildes_t.
2416 (process_event): Change local fd's type to gdb_fildes_t.
2417 (create_file_handler): Adjust prototype.
2418 (delete_file_handler): Adjust prototype.
2419 (handle_file_event): Adjust prototype. Use pfildes.
2420 (create_file_event): Adjsut prototype.
2421 * remote-utils.c (remote_desc, listen_desc): Change type to
2422 gdb_fildes_t.
2423 * server.h: New gdb_fildes_t typedef.
2424 [USE_WIN32API]: Include winsock2.h.
2425 (delete_file_handler, add_file_handler): Adjust prototypes.
2426 (pfildes): Declare.
2427 * utils.c (pfildes): New.
2428
24292010-08-27 Pedro Alves <pedro@codesourcery.com>
2430
2431 * configure.ac (build_warnings): Add -Wno-char-subscripts.
2432 * configure: Regenerate.
2433
24342010-08-27 Pedro Alves <pedro@codesourcery.com>
2435
2436 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
2437 (linux_done_accessing_memory): ... this.
2438 (linux_target_ops): Adjust.
2439 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
2440 * nto-low.c (nto_target_ops): Adjust comment.
2441 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
2442 * spu-low.c (spu_target_ops): Adjust comment.
2443 * target.h (target_ops): Rename unprepare_to_access_memory field
2444 to done_accessing_memory.
2445 (unprepare_to_access_memory): Rename to ...
2446 (done_accessing_memory): ... this.
2447
24482010-08-26 Pedro Alves <pedro@codesourcery.com>
2449
2450 * linux-low.c (linux_prepare_to_access_memory): New.
2451 (linux_unprepare_to_access_memory): New.
2452 (linux_target_ops): Install them.
2453 * server.c (read_memory): Rename to ...
2454 (gdb_read_memory): ... this. Use
2455 prepare_to_access_memory/prepare_to_access_memory.
2456 (write_memory): Rename to ...
2457 (gdb_write_memory): ... this. Use
2458 prepare_to_access_memory/prepare_to_access_memory.
2459 (handle_search_memory_1): Adjust.
2460 (process_serial_event): Adjust.
2461 * target.h (struct target_ops): New fields
2462 prepare_to_access_memory and unprepare_to_access_memory.
2463 (prepare_to_access_memory, unprepare_to_access_memory): New.
2464 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
2465 prepare_to_access_memory/prepare_to_access_memory.
2466 * nto-low.c (nto_target_ops): Adjust.
2467 * spu-low.c (spu_target_ops): Adjust.
2468 * win32-low.c (win32_target_ops): Adjust.
2469
24702010-08-26 Pedro Alves <pedro@codesourcery.com>
2471
2472 * Makefile.in (WARN_CFLAGS): Get it from configure.
2473 (WERROR_CFLAGS): New.
2474 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
2475 * configure.ac: Introduce --enable-werror, which adds -Werror to
2476 the compiler command line. Enabled by default. Disable with
2477 --disable-werror. Add -Wdeclaration-after-statement
2478 Wpointer-arith and -Wformat-nonliteral to warning flags.
2479 * configure: Regenerate.
2480
24812010-08-26 Pedro Alves <pedro@codesourcery.com>
2482
2483 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
2484
24852010-08-26 Pedro Alves <pedro@codesourcery.com>
2486
2487 * gdbreplay.c (remote_error): New.
2488 (gdbchar): New.
2489 (expect): Use gdbchar. Check for error reading from GDB.
2490 Clarify sync error output.
2491 (play): Check for errors writing to GDB.
2492 * linux-low.c (sigchld_handler): Really ignore `write' errors.
2493 * remote-utils.c (getpkt): Check for errors writing to the remote
2494 descriptor.
2495
24962010-08-25 Pedro Alves <pedro@codesourcery.com>
2497
2498 * linux-low.c (linux_wait_1): Move non-debugging code out of
2499 `debug_threads' control.
2500
25012010-08-25 Pedro Alves <pedro@codesourcery.com>
2502
2503 * linux-low.c (linux_wait_1): Don't set last_status here.
2504 * server.c (push_event, queue_stop_reply_callback): Assert we're
2505 not pushing a TARGET_WAITKIND_IGNORE event.
2506 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
2507 (myresume, handle_target_event): Set the thread's last_resume_kind
2508 and last_status from the target returned status.
2509
25102010-08-25 Pedro Alves <pedro@codesourcery.com>
2511
2512 PR threads/10729
2513
2514 * linux-x86-low.c (update_debug_registers_callback): New.
2515 (i386_dr_low_set_addr): Use it.
2516 (i386_dr_low_get_addr): New.
2517 (i386_dr_low_set_control): Use update_debug_registers_callback.
2518 (i386_dr_low_get_control): New.
2519 (i386_dr_low_get_status): Adjust.
2520 * linux-low.c (linux_stop_lwp): New.
2521 * linux-low.h (linux_stop_lwp): Declare.
2522
2523 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
2524 argument instead of a i386_debug_reg_state.
2525 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
2526 a i386_debug_reg_state.
2527 (i386_insert_aligned_watchpoint): Adjust.
2528 (i386_remove_aligned_watchpoint): Adjust.
2529 (i386_low_stopped_data_address): Read the debug registers from the
2530 inferior instead of from the mirrors.
2531 * i386-low.h (struct i386_debug_reg_state): Extend comment.
2532 (i386_dr_low_get_addr): Declare.
2533 (i386_dr_low_get_control): Declare.
2534 (i386_dr_low_get_status): Change prototype.
2535
2536 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
2537 (i386_dr_low_get_addr): New.
2538 (i386_dr_low_get_control): New.
2539 (i386_dr_low_get_status): Adjust prototype. Return
2540 dr_status_mirror.
2541 (i386_initial_stuff): Clear dr_status_mirror and
2542 dr_control_mirror.
2543 (i386_get_thread_context): Adjust.
2544 (i386_set_thread_context): Adjust.
2545 (i386_thread_added): Adjust.
2546
25472010-08-24 Pedro Alves <pedro@codesourcery.com>
2548
2549 * linux-low.h (linux_thread_area): Delete declaration.
2550
25512010-08-11 Thomas Schwinge <thomas@codesourcery.com>
2552
2553 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
2554 after its termination.
2555
25562010-08-09 Pedro Alves <pedro@codesourcery.com>
2557
2558 * linux-low.c (gdb_wants_lwp_stopped): Delete.
2559 (gdb_wants_all_stopped): Delete.
2560 (linux_wait_1): Don't call them.
2561 * server.c (handle_v_cont): Tag all threads as want-stopped.
2562 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
2563 stopped as "client-wants-stopped".
2564
25652010-07-31 Pedro Alves <pedro@codesourcery.com>
2566
2567 * Makefile.in (signals_h): New.
2568 (server_h): Depend on it.
2569 (server.o): Don't depend on $(signals_def).
2570 (signals.o): Depend on $(signals_def).
2571
25722010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
2573
2574 * Makefile.in (signals_def): New.
2575 (server_h): Append include/gdb/signals.h and signals_def.
2576 (server.o): Append signals_def.
2577
25782010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
2579
2580 * server.c (handle_target_event): Use target_signal_to_host for
2581 resume_info.sig initialization.
2582 * target.h (struct thread_resume) <sig>: New comment.
2583
25842010-07-20 Ozkan Sezer <sezeroz@gmail.com>
2585
2586 * server.c (handle_query): strcpy() the returned string from paddress()
2587 instead of sprintf().
2588 * utils.c (paddress): Return phex_nz().
2589
25902010-07-07 Joel Brobecker <brobecker@adacore.com>
2591
2592 * server.c (handle_v_cont): Call mourn_inferior if process
2593 just exited.
2594 (myresume): Likewise.
2595
25962010-07-01 Pedro Alves <pedro@codesourcery.com>
2597
2598 Static tracepoints, and integration with UST.
2599
2600 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
2601 * mem-break.c (uninsert_all_breakpoints)
2602 (reinsert_all_breakpoints): New.
2603 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
2604 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
2605 (gdb_agent_ust_loaded, helper_thread_id)
2606 (gdb_agent_helper_thread_id): New macros.
2607 (struct ipa_sym_addresses): Add addr_ust_loaded,
2608 addr_helper_thread_id, addr_cmd_buf.
2609 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
2610 (in_process_agent_loaded_ust): New.
2611 (write_e_ust_not_loaded): New.
2612 (maybe_write_ipa_ust_not_loaded): New.
2613 (struct collect_static_trace_data_action): New.
2614 (enum tracepoint_type) <static_tracepoint>: New.
2615 (struct tracepoint) <handle>: Mention static tracepoints.
2616 (struct static_tracepoint_ctx): New.
2617 (CMD_BUF_SIZE): New.
2618 (add_tracepoint_action): Handle static tracepoint actions.
2619 (unprobe_marker_at): New.
2620 (clear_installed_tracepoints): Handle static tracepoints.
2621 (cmd_qtdp): Handle static tracepoints.
2622 (probe_marker_at): New.
2623 (cmd_qtstart): Handle static tracepoints.
2624 (response_tracepoint): Handle static tracepoints.
2625 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
2626 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
2627 (get_context_regcache): Handle static tracepoints.
2628 (do_action_at_tracepoint): Handle static tracepoint actions.
2629 (traceframe_find_block_type): Handle static trace data blocks.
2630 (traceframe_read_sdata): New.
2631 (download_tracepoints): Download static tracepoint actions.
2632 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
2633 (GDB_PROBE_NAME): New.
2634 (ust_ops): New.
2635 (GET_UST_SYM): New.
2636 (USTF): New.
2637 (dlsym_ust): New.
2638 (ust_marker_to_static_tracepoint): New.
2639 (gdb_probe): New.
2640 (collect_ust_data_at_tracepoint): New.
2641 (gdb_ust_probe): New.
2642 (UNIX_PATH_MAX, SOCK_DIR): New.
2643 (gdb_ust_connect_sync_socket): New.
2644 (resume_thread, stop_thread): New.
2645 (run_inferior_command): New.
2646 (init_named_socket): New.
2647 (gdb_ust_socket_init): New.
2648 (cstr_to_hexstr): New.
2649 (next_st): New.
2650 (first_marker, next_marker): New.
2651 (response_ust_marker): New.
2652 (cmd_qtfstm, cmd_qtsstm): New.
2653 (unprobe_marker_at, probe_marker_at): New.
2654 (cmd_qtstmat, gdb_ust_thread): New.
2655 (gdb_ust_init): New.
2656 (initialize_tracepoint_ftlib): Call gdb_ust_init.
2657 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
2658 (ST_REGENTRY): New.
2659 (x86_64_st_collect_regmap): New.
2660 (X86_64_NUM_ST_COLLECT_GREGS): New.
2661 (AMD64_RIP_REGNUM): New.
2662 (supply_static_tracepoint_registers): New.
2663 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
2664 (ST_REGENTRY): New.
2665 (i386_st_collect_regmap): New.
2666 (i386_NUM_ST_COLLECT_GREGS): New.
2667 (supply_static_tracepoint_registers): New.
2668 * server.c (handle_query): Handle qXfer:statictrace:read.
2669 <qSupported>: Report support for StaticTracepoints, and
2670 qXfer:statictrace:read features.
2671 * server.h (traceframe_read_sdata)
2672 (supply_static_tracepoint_registers): Declare.
2673 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
2674 (unpack_varlen_hex): Include in IPA build.
2675 * Makefile.in (ustlibs, ustinc): New.
2676 (IPA_OBJS): Add remote-utils-ipa.o.
2677 ($(IPA_LIB)): Link -ldl and -lpthread.
2678 (UST_CFLAGS): New.
2679 (IPAGENT_CFLAGS): Add UST_CFLAGS.
2680 * config.in, configure: Regenerate.
2681
26822010-06-20 Ian Lance Taylor <iant@google.com>
2683 Pedro Alves <pedro@codesourcery.com>
2684
2685 * linux-x86-low.c (always_true): Delete.
2686 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
2687 trying to fool the compiler with always_true.
2688
26892010-06-20 Pedro Alves <pedro@codesourcery.com>
2690
2691 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
2692 conditions in gdbserver.
2693
26942010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
2695
2696 * spu-low.c (spu_read_memory): Wrap around local store limit.
2697 (spu_write_memory): Likewise.
2698
26992010-06-15 Pedro Alves <pedro@codesourcery.com>
2700
2701 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
2702 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
2703 LONGEST uses.
2704 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
2705 uses.
2706 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
2707 uses with LONGEST uses.
2708
27092010-06-14 Stan Shebs <stan@codesourcery.com>
2710 Pedro Alves <pedro@codesourcery.com>
2711
2712 Bytecode compiler.
2713
2714 * linux-x86-low.c: Include limits.h.
2715 (add_insns): New.
2716 (always_true): New.
2717 (EMIT_ASM): New.
2718 (EMIT_ASM32): New.
2719 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
2720 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
2721 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
2722 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
2723 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
2724 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
2725 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
2726 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
2727 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
2728 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
2729 (amd64_emit_void_call_2): New.
2730 (amd64_emit_ops): New.
2731 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
2732 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
2733 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
2734 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
2735 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
2736 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
2737 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
2738 (i386_emit_call, i386_emit_reg, i386_emit_pop)
2739 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
2740 (i386_emit_stack_adjust, i386_emit_int_call_1)
2741 (i386_emit_void_call_2): New.
2742 (i386_emit_ops): New.
2743 (x86_emit_ops): New.
2744 (the_low_target): Install x86_emit_ops.
2745 * server.h (struct emit_ops): New.
2746 (get_raw_reg_func_addr): Declare.
2747 (current_insn_ptr, emit_error): Declare.
2748 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
2749 (set_trace_state_variable_value): New defines.
2750 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
2751 addr_get_trace_state_variable_value and
2752 addr_set_trace_state_variable_value.
2753 (symbol_list): New fields for get_raw_reg,
2754 get_trace_state_variable_value and set_trace_state_variable_value.
2755 (condfn): New typedef.
2756 (struct tracepoint): New field `compiled_cond'.
2757 (do_action_at_tracepoint): Clear compiled_cond.
2758 (get_trace_state_variable_value, set_trace_state_variable_value):
2759 Export in the IPA.
2760 (condition_true_at_tracepoint): If there's a compiled condition,
2761 run that.
2762 (current_insn_ptr, emit_error): New globals.
2763 (struct bytecode_address): New.
2764 (get_raw_reg_func_addr): New.
2765 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
2766 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
2767 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
2768 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
2769 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
2770 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
2771 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
2772 (compile_tracepoint_condition, compile_bytecodes): New.
2773 * target.h (emit_ops): Forward declare.
2774 (struct target_ops): New field emit_ops.
2775 (target_emit_ops): New.
2776 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
2777 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
2778 * linux-low.c (linux_emit_ops): New.
2779 (linux_target_ops): Install it.
2780 * linux-low.h (struct linux_target_ops): New field emit_ops.
2781
27822010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
2783
2784 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
2785 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
2786
27872010-06-01 Pedro Alves <pedro@codesourcery.com>
2788 Stan Shebs <stan@codesourcery.com>
2789
2790 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
2791 (all): Depend on $(extra_libraries).
2792 (install-only): Install the IPA.
2793 (IPA_OBJS, IPA_LIB): New.
2794 (clean): Remove the IPA lib.
2795 (IPAGENT_CFLAGS): New.
2796 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
2797 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
2798 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
2799 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
2800 * configure.ac: Check for atomic builtins support in the compiler.
2801 (IPA_DEPFILES, extra_libraries): Define.
2802 * configure.srv (ipa_obj): Add description.
2803 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
2804 (i[34567]86-*-linux*): Set ipa_obj.
2805 (x86_64-*-linux*): Set ipa_obj.
2806 * linux-low.c (stabilizing_threads): New.
2807 (supports_fast_tracepoints): New.
2808 (linux_detach): Stabilize threads before detaching.
2809 (handle_tracepoints): Handle internal tracing breakpoints. Assert
2810 the lwp is either not stabilizing, or is moving out of a jump pad.
2811 (linux_fast_tracepoint_collecting): New.
2812 (maybe_move_out_of_jump_pad): New.
2813 (enqueue_one_deferred_signal): New.
2814 (dequeue_one_deferred_signal): New.
2815 (linux_wait_for_event_1): If moving out of a jump pad, defer
2816 pending signals to later.
2817 (linux_stabilize_threads): New.
2818 (linux_wait_1): Check if threads need moving out of jump pads, and
2819 do it if so.
2820 (stuck_in_jump_pad_callback): New.
2821 (move_out_of_jump_pad_callback): New.
2822 (lwp_running): New.
2823 (linux_resume_one_lwp): Handle moving out of jump pads.
2824 (linux_set_resume_request): Dequeue deferred signals.
2825 (need_step_over_p): Also step over fast tracepoint jumps.
2826 (start_step_over): Also uninsert fast tracepoint jumps.
2827 (finish_step_over): Also reinsert fast tracepoint jumps.
2828 (linux_install_fast_tracepoint_jump): New.
2829 (linux_target_ops): Install linux_stabilize_threads and
2830 linux_install_fast_tracepoint_jump_pad.
2831 * linux-low.h (linux_target_ops) <get_thread_area,
2832 install_fast_tracepoint_jump_pad>: New fields.
2833 (struct lwp_info) <collecting_fast_tracepoint,
2834 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
2835 (linux_get_thread_area): Declare.
2836 * linux-x86-low.c (jump_insn): New.
2837 (x86_get_thread_area): New.
2838 (append_insns): New.
2839 (push_opcode): New.
2840 (amd64_install_fast_tracepoint_jump_pad): New.
2841 (i386_install_fast_tracepoint_jump_pad): New.
2842 (x86_install_fast_tracepoint_jump_pad): New.
2843 (the_low_target): Install x86_get_thread_area and
2844 x86_install_fast_tracepoint_jump_pad.
2845 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
2846 (struct fast_tracepoint_jump): New.
2847 (fast_tracepoint_jump_insn): New.
2848 (fast_tracepoint_jump_shadow): New.
2849 (find_fast_tracepoint_jump_at): New.
2850 (fast_tracepoint_jump_here): New.
2851 (delete_fast_tracepoint_jump): New.
2852 (set_fast_tracepoint_jump): New.
2853 (uninsert_fast_tracepoint_jumps_at): New.
2854 (reinsert_fast_tracepoint_jumps_at): New.
2855 (set_breakpoint_at): Use write_inferior_memory.
2856 (uninsert_raw_breakpoint): Use write_inferior_memory.
2857 (check_mem_read): Mask out fast tracepoint jumps.
2858 (check_mem_write): Mask out fast tracepoint jumps.
2859 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
2860 (set_fast_tracepoint_jump): Declare.
2861 (delete_fast_tracepoint_jump)
2862 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
2863 (reinsert_fast_tracepoint_jumps_at): Declare.
2864 * regcache.c: Don't compile many functions when building the
2865 in-process agent library.
2866 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
2867 the register buffer in the heap.
2868 (free_register_cache): If the register buffer isn't owned by the
2869 regcache, don't free it.
2870 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
2871 pre-existing register caches.
2872 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
2873 type.
2874 (convert_ascii_to_int): : Constify `from' parameter type.
2875 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
2876 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
2877 the needed buffer in-place.
2878 (relocate_instruction): New.
2879 * server.c (handle_query) <qSymbols>: If the target supports
2880 tracepoints, give it a chance of looking up symbols. Report
2881 support for fast tracepoints.
2882 (handle_status): Stabilize threads.
2883 (process_serial_event): Adjust.
2884 * server.h (struct fast_tracepoint_jump): Forward declare.
2885 (struct process_info) <fast_tracepoint_jumps>: New field.
2886 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
2887 (decode_X_packet, decode_M_packet): Adjust.
2888 (relocate_instruction): Declare.
2889 (in_process_agent_loaded): Declare.
2890 (tracepoint_look_up_symbols): Declare.
2891 (struct fast_tpoint_collect_status): Declare.
2892 (fast_tracepoint_collecting): Declare.
2893 (force_unlock_trace_buffer): Declare.
2894 (handle_tracepoint_bkpts): Declare.
2895 (initialize_low_tracepoint)
2896 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
2897 * target.h (struct target_ops) <stabilize_threads,
2898 install_fast_tracepoint_jump_pad>: New fields.
2899 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
2900 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
2901 [HAVE_STDINT_H]: Include stdint.h.
2902 (trace_debug_1): Rename to ...
2903 (trace_vdebug): ... this.
2904 (trace_debug): Rename to ...
2905 (trace_debug_1): ... this. Add `level' parameter.
2906 (trace_debug): New.
2907 (ATTR_USED, ATTR_NOINLINE): New.
2908 (IP_AGENT_EXPORT): New.
2909 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
2910 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
2911 (about_to_request_buffer_space, trace_buffer_is_full)
2912 (stopping_tracepoint, expr_eval_result, error_tracepoint)
2913 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
2914 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
2915 (traceframe_write_count, traceframes_created)
2916 (trace_state_variables)
2917 New renaming defines.
2918 (struct ipa_sym_addresses): New.
2919 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
2920 (symbol_list): New.
2921 (ipa_sym_addrs): New.
2922 (all_tracepoint_symbols_looked_up): New.
2923 (in_process_agent_loaded): New.
2924 (write_e_ipa_not_loaded): New.
2925 (maybe_write_ipa_not_loaded): New.
2926 (tracepoint_look_up_symbols): New.
2927 (debug_threads) [IN_PROCESS_AGENT]: New.
2928 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
2929 (UNKNOWN_SIDE_EFFECTS): New.
2930 (stop_tracing): New.
2931 (flush_trace_buffer): New.
2932 (stop_tracing_bkpt): New.
2933 (flush_trace_buffer_bkpt): New.
2934 (read_inferior_integer): New.
2935 (read_inferior_uinteger): New.
2936 (read_inferior_data_pointer): New.
2937 (write_inferior_data_pointer): New.
2938 (write_inferior_integer): New.
2939 (write_inferior_uinteger): New.
2940 (struct collect_static_trace_data_action): Delete.
2941 (enum tracepoint_type): New.
2942 (struct tracepoint) <type>: New field `type'.
2943 <actions_str, step_actions, step_actions_str>: Only include in
2944 GDBserver.
2945 <orig_size, obj_addr_on_target, adjusted_insn_addr>
2946 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
2947 (tracepoints): Use IP_AGENT_EXPORT.
2948 (last_tracepoint): Don't include in the IPA.
2949 (stopping_tracepoint): Use IP_AGENT_EXPORT.
2950 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
2951 (alloced_trace_state_variables): New.
2952 (trace_state_variables): Use IP_AGENT_EXPORT.
2953 (traceframe_t): Delete unused variable.
2954 (circular_trace_buffer): Don't include in the IPA.
2955 (trace_buffer_start): Delete.
2956 (struct trace_buffer_control): New.
2957 (trace_buffer_free): Delete.
2958 (struct ipa_trace_buffer_control): New.
2959 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
2960 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
2961 New.
2962 (trace_buffer_ctrl): New.
2963 (TRACE_BUFFER_CTRL_CURR): New.
2964 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
2965 Reimplement as macros.
2966 (trace_buffer_wrap): Delete.
2967 (traceframe_write_count, traceframe_read_count)
2968 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
2969 (struct tracepoint_hit_ctx) <type>: New field.
2970 (struct fast_tracepoint_ctx): New.
2971 (memory_barrier): New.
2972 (cmpxchg): New.
2973 (record_tracepoint_error): Update atomically in the IPA.
2974 (clear_inferior_trace_buffer): New.
2975 (about_to_request_buffer_space): New.
2976 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
2977 updating the same buffer.
2978 (add_tracepoint): Default the tracepoint's type to trap
2979 tracepoint, and orig_size to -1.
2980 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
2981 internal variables.
2982 (create_trace_state_variable): New parameter `gdb'. Handle it.
2983 (clear_installed_tracepoints): Clear fast tracepoint jumps.
2984 (cmd_qtdp): Handle fast tracepoints.
2985 (cmd_qtdv): Adjust.
2986 (max_jump_pad_size): New.
2987 (gdb_jump_pad_head): New.
2988 (get_jump_space_head): New.
2989 (claim_jump_space): New.
2990 (sort_tracepoints): New.
2991 (MAX_JUMP_SIZE): New.
2992 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
2993 IPA.
2994 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
2995 support. Upload fast traceframes, and delete internal IPA
2996 breakpoints.
2997 (stop_tracing_handler): New.
2998 (flush_trace_buffer_handler): New.
2999 (cmd_qtstop): Upload fast tracepoints.
3000 (response_tracepoint): Handle fast tracepoints.
3001 (tracepoint_finished_step): Upload fast traceframes. Set the
3002 tracepoint hit context's tracepoint type.
3003 (handle_tracepoint_bkpts): New.
3004 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
3005 type. Add comment about fast tracepoints.
3006 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
3007 non-existing action_str field.
3008 (get_context_regcache): Handle fast tracepoints.
3009 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
3010 to the regcache.
3011 (fast_tracepoint_from_jump_pad_address): New.
3012 (fast_tracepoint_from_ipa_tpoint_address): New.
3013 (collecting_t): New.
3014 (force_unlock_trace_buffer): New.
3015 (fast_tracepoint_collecting): New.
3016 (collecting): New.
3017 (gdb_collect): New.
3018 (write_inferior_data_ptr): New.
3019 (target_tp_heap): New.
3020 (target_malloc): New.
3021 (download_agent_expr): New.
3022 (UALIGN): New.
3023 (download_tracepoints): New.
3024 (download_trace_state_variables): New.
3025 (upload_fast_traceframes): New.
3026 (IPA_FIRST_TRACEFRAME): New.
3027 (IPA_NEXT_TRACEFRAME_1): New.
3028 (IPA_NEXT_TRACEFRAME): New.
3029 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
3030 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
3031 (gdb_jump_pad_buffer_end): New.
3032 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
3033 (initialize_tracepoint): Adjust.
3034 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
3035 buffer. Initialize the low module.
3036 * utils.c (PREFIX, TOOLNAME): New.
3037 (malloc_failure): Use PREFIX.
3038 (error): In the IPA, an error causes an exit.
3039 (fatal, warning): Use PREFIX.
3040 (internal_error): Use TOOLNAME.
3041 (NUMCELLS): Increase to 10.
3042 * configure, config.in: Regenerate.
3043
30442010-06-01 Pedro Alves <pedro@codesourcery.com>
3045
3046 * server.c (handle_query) <qSupported>: Do two passes over the
3047 qSupported string to avoid nesting strtok.
3048
30492010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
3050
3051 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
3052 (CDEPS): New.
3053 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
3054 -Wl,--dynamic-list.
3055 * configure: Regenerate.
3056 * proc-service.list: New.
3057
30582010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
3059
3060 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
3061 New comment.
3062
30632010-05-26 Ozkan Sezer <sezeroz@gmail.com>
3064
3065 * gdbreplay.c (remote_open): Check error return from socket() call by
3066 its equality to -1 not by it being negative.
3067 * remote-utils.c (remote_open): Likewise.
3068
30692010-05-23 Pedro Alves <pedro@codesourcery.com>
3070
3071 * config.h: Regenerate.
3072
30732010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
3074
3075 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
3076 doesn't provide PTRACE_GET_THREAD_AREA.
3077
30782010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
3079
3080 * linux-m68k-low.c: Include <asm/ptrace.h>
3081 (ps_get_thread_area): Implement.
3082
30832010-05-03 Doug Evans <dje@google.com>
3084
3085 * event-loop.c (struct callback_event): New struct.
3086 (callback_list): New global.
3087 (append_callback_event, delete_callback_event): New functions.
3088 (process_callback): New function.
3089 (start_event_loop): Call it.
3090 * remote-utils.c (NOT_SCHEDULED): Define.
3091 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
3092 moved out of readchar.
3093 (readchar): Rewrite. Call reschedule before returning.
3094 (reset_readchar): New function.
3095 (remote_close): Call it.
3096 (process_remaining, reschedule): New functions.
3097 * server.h (callback_handler_func): New typedef.
3098 (append_callback_event, delete_callback_event): Declare.
3099
31002010-05-03 Pedro Alves <pedro@codesourcery.com>
3101
3102 * proc-service.c (ps_pglobal_lookup): Use
3103 thread_db_look_up_one_symbol.
3104 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
3105 parameter. Use it instead of all_symbols_looked_up.
3106 * server.h (struct process_info) <all_symbols_looked_up>: Delete
3107 field.
3108 (all_symbols_looked_up): Don't declare.
3109 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
3110 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
3111 field.
3112 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
3113 Set all_symbols_looked_up here.
3114 (thread_db_look_up_one_symbol): New.
3115 (thread_db_get_tls_address): Adjust.
3116 (thread_db_load_search, try_thread_db_load_1): Always allocate the
3117 thread_db object on the heap, and tentatively set it in the
3118 process structure.
3119 (thread_db_init): Don't set all_symbols_looked_up here.
3120 * linux-low.h (thread_db_look_up_one_symbol): Declare.
3121
31222010-05-03 Pedro Alves <pedro@codesourcery.com>
3123
3124 * linux-low.c (linux_kill, linux_detach): Adjust.
3125 (status_pending_p_callback): Remove redundant statement. Check
3126 for !TARGET_WAITIKIND_IGNORE, instead of
3127 TARGET_WAITKIND_STOPPED.
3128 (handle_tracepoints): Make sure LWP is locked. Adjust.
3129 (linux_wait_for_event_1): Adjust.
3130 (linux_cancel_breakpoints): New.
3131 (unsuspend_one_lwp): New.
3132 (unsuspend_all_lwps): New.
3133 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
3134 (send_sigstop_callback): Change return type to int, add new
3135 `except' parameter and handle it.
3136 (suspend_and_send_sigstop_callback): New.
3137 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
3138 pass them down. If SUSPEND, also increment the lwp's suspend
3139 count.
3140 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
3141 (need_step_over_p): Don't consider suspended LWPs.
3142 (start_step_over): Adjust.
3143 (proceed_one_lwp): Change return type to int, add new `except'
3144 parameter and handle it.
3145 (unsuspend_and_proceed_one_lwp): New.
3146 (proceed_all_lwps): Use find_inferior instead of
3147 for_each_inferior.
3148 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
3149 also decrement the suspend count of LWPs. Pass `except' down,
3150 instead of hacking its suspend count.
3151 (linux_pause_all): Add `freeze' parameter. Adjust.
3152 (linux_unpause_all): New.
3153 (linux_target_ops): Install linux_unpause_all.
3154 * server.c (handle_status): Adjust.
3155 * target.h (struct target_ops): New fields `unpause_all' and
3156 `cancel_breakpoints'. Add new parameter to `pause_all'.
3157 (pause_all): Add new `freeze' parameter.
3158 (unpause_all): New.
3159 (cancel_breakpoints): New.
3160 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
3161 cancel breakpoints.
3162 (cmd_qtstart): Pause threads.
3163 (stop_tracing): Pause threads, and cancel breakpoints.
3164 * win32-low.c (win32_target_ops): Adjust.
3165
31662010-05-03 Pedro Alves <pedro@codesourcery.com>
3167
3168 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
3169 the inferior right away from here...
3170 (linux_wait_1): ... to here, and adjust to check the thread's
3171 last_resume_kind instead of the lwp's step or stop_expected flags.
3172
31732010-05-02 Pedro Alves <pedro@codesourcery.com>
3174
3175 * README: Use consistent `GDB' and `GDBserver' spellings.
3176
31772010-05-02 Pedro Alves <pedro@codesourcery.com>
3178
3179 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
3180 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
3181 (linux_detach_one_lwp): Assume the lwp is stopped.
3182 (any_thread_of): Delete.
3183 (linux_detach): Stop all lwps here. Don't blindly delete all
3184 breakpoints.
3185 (delete_lwp_callback): New.
3186 (linux_mourn): Delete all lwps of the process that is gone.
3187 (linux_wait_1): Don't delete the last lwp of the process here.
3188 * mem-break.h (mark_breakpoints_out): Declare.
3189 * mem-break.c (mark_breakpoints_out): New.
3190 (free_all_breakpoints): Use it.
3191 * server.c (handle_target_event): If the process is gone, mark
3192 breakpoints out.
3193 * thread-db.c (struct thread_db) <create_bp>: New field.
3194 (thread_db_enable_reporting): Fix prototype. Store a thread event
3195 breakpoint reference in the thread_db struct.
3196 (thread_db_load_search): Clear the thread_db object.
3197 (try_thread_db_load_1): Ditto.
3198 (switch_to_process): New.
3199 (disable_thread_event_reporting): Use it.
3200 (remove_thread_event_breakpoints): New.
3201 (thread_db_detach, thread_db_mourn): Use it.
3202
32032010-05-01 Pedro Alves <pedro@codesourcery.com>
3204
3205 * linux-low.c (linux_enable_event_reporting): New.
3206 (linux_wait_for_event_1, handle_extended_wait): Use it.
3207
32082010-04-30 Pedro Alves <pedro@codesourcery.com>
3209
3210 * linux-low.c (linux_kill_one_lwp, linux_kill)
3211 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
3212 (send_sigstop): Take an lwp_info as parameter instead. Queue a
3213 SIGSTOP even if the LWP is stopped.
3214 (send_sigstop_callback): New.
3215 (stop_all_lwps): Use send_sigstop_callback instead.
3216 (linux_resume_one_thread): Adjust.
3217 (proceed_one_lwp): Still proceed an LWP that the client has
3218 requested to stop, if we haven't reported it as stopped yet. Make
3219 sure that LWPs the client want stopped, have a pending SIGSTOP.
3220
32212010-04-26 Doug Evans <dje@google.com>
3222
3223 * server.c (handle_general_set): Make static.
3224
3225 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
3226 Print received char after testing for error/eof instead of before.
3227 (input_interrupt): Tweak comment.
3228
32292010-04-23 Doug Evans <dje@google.com>
3230
3231 * server.c (start_inferior): Print inferior argv if --debug.
3232
32332010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
3234
3235 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
3236 * nto-x86-low.c: Include server.h
3237
32382010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
3239
3240 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
3241 be consistent with other sources of this directory.
3242 (init_registers_amd64): Correct name of source file of this function
3243 in the comment.
3244
32452010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
3246
3247 * configure.srv (x86_64-*-mingw*): New configuration for Windows
3248 64-bit executables.
3249
32502010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
3251
3252 * win32-i386-low.c: Add 64-bit support.
3253 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
3254 (init_registers_amd64): Declare.
3255 (mappings): Add 64-bit version of array.
3256 (init_windows_x86): New function.
3257 (the_low_target): Change init_arch field to init_windows_x86.
3258
32592010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
3260
3261 * win32-low.c: Adapt to support also 64-bit architecture.
3262 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
3263 (get_image_name): Use SIZE_T type for local variable `done'.
3264 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
3265 (toolhelp_get_dll_name): Idem.
3266 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
3267 Use uintptr_t typecast to avoid warning.
3268 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
3269 (handle_exception): Use phex_nz to avoid warning.
3270 (win32_wait): Remove unused local variable `process'.
3271
32722010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
3273
3274 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
3275 `amd64-avx.o'.
3276
32772010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
3278
3279 * configure.ac: Use `ws2_32' library for srv_mingw.
3280 * configure: Regenerate.
3281 * gdbreplay.c: Include winsock2.h instead of winsock.h.
3282 * remote-utils.c: Likewise.
3283
32842010-04-17 H.J. Lu <hongjiu.lu@intel.com>
3285
3286 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
3287 if __x86_64__ is defined.
3288
32892010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
3290
3291 * configure: Regenerate.
3292
32932010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
3294
3295 * server.c (handle_query): Handle 'qGetTIBAddr' query.
3296 * target.h (target_ops): New get_tib_address field.
3297 * win32-low.h (win32_thread_info): Add thread_local_base field.
3298 * win32-low.c (child_add_thread): Add tlb argument.
3299 Set thread_local_base field to TLB.
3300 (get_child_debug_event): Adapt to child_add_thread change.
3301 (win32_get_tib_address): New function.
3302 (win32_target_ops): Set get_tib_address field to
3303 win32_get_tib_address.
3304 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
3305
33062010-04-12 Pedro Alves <pedro@codesourcery.com>
3307
3308 * linux-low.c (linux_mourn): Also remove the process.
3309 * server.c (handle_target_event): Don't remove the process here.
3310 * nto-low.c (nto_mourn): New.
3311 (nto_target_ops): Install it.
3312 * spu-low.c (spu_mourn): New.
3313 (spu_target_ops): Install it.
3314 * win32-low.c (win32_mourn): New.
3315 (win32_target_ops): Install it.
3316
33172010-04-12 Pedro Alves <pedro@codesourcery.com>
3318
3319 * server.h (buffer_xml_printf): Remove redundant `;'.
3320
33212010-04-12 Pedro Alves <pedro@codesourcery.com>
3322
3323 * regcache.c (set_register_cache): Invalidate regcaches before
3324 changing the register cache layout.
3325 (regcache_invalidate_one): Allow a NULL regcache.
3326 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
3327 regcaches before changing the register cache layout or the target
3328 regsets.
3329
33302010-04-12 H.J. Lu <hongjiu.lu@intel.com>
3331
3332 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
3333 variable warning on Linux/x86-64.
3334
33352010-04-11 Pedro Alves <pedro@codesourcery.com>
3336
3337 GDBserver disconnected tracing support.
3338
3339 * linux-low.c (linux_remove_process): Delete.
3340 (add_lwp): Don't set last_resume_kind here.
3341 (linux_kill): Use `mourn'.
3342 (linux_detach): Use `thread_db_detach', and `mourn'.
3343 (linux_mourn): New.
3344 (linux_attach_lwp_1): Adjust comment.
3345 (linux_attach): last_resume_kind moved the thread_info; adjust.
3346 (status_pending_p_callback): Adjust.
3347 (linux_wait_for_event_1): Adjust.
3348 (count_events_callback, select_singlestep_lwp_callback)
3349 (select_event_lwp_callback, cancel_breakpoints_callback)
3350 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
3351 (proceed_one_lwp): Adjust.
3352 (linux_async): Add debug output.
3353 (linux_thread_stopped): New.
3354 (linux_pause_all): New.
3355 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
3356 linux_pause_all.
3357 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
3358 (thread_db_free): Delete declaration.
3359 (thread_db_detach, thread_db_mourn): Declare.
3360 * thread-db.c (thread_db_init): Use thread_db_mourn.
3361 (thread_db_free): Delete, split in two.
3362 (disable_thread_event_reporting): New.
3363 (thread_db_detach): New.
3364 (thread_db_mourn): New.
3365
3366 * server.h (struct thread_info) <last_resume_kind>: New field.
3367 <attached>: Add comment.
3368 <gdb_detached>: New field.
3369 (handler_func): Change return type to int.
3370 (handle_serial_event, handle_target_event): Ditto.
3371 (gdb_connected): Declare.
3372 (tracing): Delete.
3373 (disconnected_tracing): Declare.
3374 (stop_tracing): Declare.
3375
3376 * server.c (handle_query) <qSupported>: Report support for
3377 disconnected tracing.
3378 (queue_stop_reply_callback): Account for running threads.
3379 (gdb_wants_thread_stopped): New.
3380 (gdb_wants_all_threads_stopped): New.
3381 (gdb_reattached_process): New.
3382 (handle_status): Clear the `gdb_detached' flag of all processes.
3383 In all-stop, stop all threads.
3384 (main): Be sure to leave tfind mode. Handle disconnected tracing.
3385 (process_serial_event): If the remote connection breaks, or if an
3386 exit was forced with "monitor exit", force an event loop exit.
3387 Handle disconnected tracing on detach.
3388 (handle_serial_event): Adjust.
3389 (handle_target_event): If GDB isn't connected, forward events back
3390 to the inferior, unless the last process exited, in which case,
3391 exit gdbserver. Adjust interface.
3392
3393 * remote-utils.c (remote_open): Don't block in accept. Instead
3394 register an event loop source on the listen socket file
3395 descriptor. Refactor bits into ...
3396 (listen_desc): ... this new global.
3397 (gdb_connected): ... this new function.
3398 (enable_async_notification): ... this new function.
3399 (handle_accept_event): ... this new function.
3400 (remote_close): Clear remote_desc.
3401
3402 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
3403
3404 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
3405 New fields.
3406 (mourn_inferior): Define.
3407 (target_process_qsupported): Avoid the dangling else problem.
3408 (thread_stopped): Define.
3409 (pause_all): Define.
3410 (target_waitstatus_to_string): Declare.
3411 * target.c (target_waitstatus_to_string): New.
3412
3413 * tracepoint.c (tracing): Make extern.
3414 (disconnected_tracing): New.
3415 (stop_tracing): Make extern. Handle tracing stops due to GDB
3416 disconnecting.
3417 (cmd_qtdisconnected): New.
3418 (cmd_qtstatus): Report disconnected tracing status in trace reply.
3419 (handle_tracepoint_general_set): Handle QTDisconnected.
3420
3421 * event-loop.c (event_handler_func): Change return type to int.
3422 (process_event): Bail out if the event handler wants the event
3423 loop to stop.
3424 (handle_file_event): Ditto.
3425 (start_event_loop): Bail out if the event handler wants the event
3426 loop to stop.
3427
3428 * nto-low.c (nto_target_ops): Adjust.
3429 * spu-low.c (spu_wait): Don't remove the process here.
3430 (spu_target_ops): Adjust.
3431 * win32-low.c (win32_wait): Don't remove the process here.
3432 (win32_target_ops): Adjust.
3433
34342010-04-11 Pedro Alves <pedro@codesourcery.com>
3435
3436 * regcache.c (realloc_register_cache): Invalidate inferior's
3437 regcache before recreating it.
3438
34392010-04-09 Pedro Alves <pedro@codesourcery.com>
3440
3441 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
3442
34432010-04-09 Stan Shebs <stan@codesourcery.com>
3444 Pedro Alves <pedro@codesourcery.com>
3445
3446 * server.h (LONGEST): New.
3447 (struct thread_info) <while_stepping>: New field.
3448 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
3449 Declare.
3450 (initialize_tracepoint, handle_tracepoint_general_set)
3451 (handle_tracepoint_query, tracepoint_finished_step)
3452 (tracepoint_was_hit, release_while_stepping_state_list):
3453 (current_traceframe): Declare.
3454 * server.c (handle_general_set): Handle tracepoint packets.
3455 (read_memory): New.
3456 (write_memory): New.
3457 (handle_search_memory_1): Use read_memory.
3458 (handle_query): Report support for conditional tracepoints, trace
3459 state variables, and tracepoint sources. Handle tracepoint
3460 queries.
3461 (main): Initialize the tracepoints module.
3462 (process_serial_event): Handle traceframe reads/writes.
3463
3464 * linux-low.c (handle_tracepoints): New.
3465 (linux_wait_1): Call it.
3466 (linux_resume_one_lwp): Handle while-stepping.
3467 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
3468 (linux_target_ops): Install them.
3469 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
3470 New field.
3471 * linux-x86-low.c (x86_supports_tracepoints): New.
3472 (the_low_target). Install it.
3473
3474 * mem-break.h (delete_breakpoint): Declare.
3475 * mem-break.c (delete_breakpoint): Make external.
3476
3477 * target.h (struct target_ops): Add `supports_tracepoints',
3478 `read_pc', and `write_pc' fields.
3479 (target_supports_tracepoints): Define.
3480 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
3481 (phex_nz): New.
3482
3483 * regcache.h (struct regcache) <registers_owned>: New field.
3484 (init_register_cache, regcache_cpy): Declare.
3485 (regcache_read_pc, regcache_write_pc): Declare.
3486 (register_cache_size): Declare.
3487 (supply_regblock): Declare.
3488 * regcache.c (init_register_cache): New.
3489 (new_register_cache): Use it.
3490 (regcache_cpy): New.
3491 (register_cache_size): New.
3492 (supply_regblock): New.
3493 (regcache_read_pc, regcache_write_pc): New.
3494
3495 * tracepoint.c: New.
3496
3497 * Makefile.in (OBS): Add tracepoint.o.
3498 (tracepoint.o): New rule.
3499
35002010-04-08 H.J. Lu <hongjiu.lu@intel.com>
3501
3502 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
3503 (i386-mmx.o): New.
3504 (i386-mmx.c): Likewise.
3505 (i386-mmx-linux.o): Likewise.
3506 (i386-mmx-linux.c): Likewise.
3507
3508 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
3509 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
3510 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
3511 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
3512
3513 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
3514 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
3515 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
3516
35172010-04-07 H.J. Lu <hongjiu.lu@intel.com>
3518
3519 * Makefile.in (clean): Updated.
3520 (i386-avx.o): New.
3521 (i386-avx.c): Likewise.
3522 (i386-avx-linux.o): Likewise.
3523 (i386-avx-linux.c): Likewise.
3524 (amd64-avx.o): Likewise.
3525 (amd64-avx.c): Likewise.
3526 (amd64-avx-linux.o): Likewise.
3527 (amd64-avx-linux.c): Likewise.
3528
3529 * configure.srv (srv_i386_regobj): Add i386-avx.o.
3530 (srv_i386_linux_regobj): Add i386-avx-linux.o.
3531 (srv_amd64_regobj): Add amd64-avx.o.
3532 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
3533 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
3534 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
3535 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
3536 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
3537 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
3538 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
3539
3540 * i387-fp.c: Include "i386-xstate.h".
3541 (i387_xsave): New.
3542 (i387_cache_to_xsave): Likewise.
3543 (i387_xsave_to_cache): Likewise.
3544 (x86_xcr0): Likewise.
3545
3546 * i387-fp.h (i387_cache_to_xsave): Likewise.
3547 (i387_xsave_to_cache): Likewise.
3548 (x86_xcr0): Likewise.
3549
3550 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
3551 * linux-crisv32-low.c (target_regsets): Likewise.
3552 * linux-m68k-low.c (target_regsets): Likewise.
3553 * linux-mips-low.c (target_regsets): Likewise.
3554 * linux-ppc-low.c (target_regsets): Likewise.
3555 * linux-s390-low.c (target_regsets): Likewise.
3556 * linux-sh-low.c (target_regsets): Likewise.
3557 * linux-sparc-low.c (target_regsets): Likewise.
3558 * linux-xtensa-low.c (target_regsets): Likewise.
3559
3560 * linux-low.c: Include <sys/uio.h>.
3561 (regsets_fetch_inferior_registers): Support nt_type.
3562 (regsets_store_inferior_registers): Likewise.
3563 (linux_process_qsupported): New.
3564 (linux_target_ops): Add linux_process_qsupported.
3565
3566 * linux-low.h (regset_info): Add nt_type.
3567 (linux_target_ops): Add process_qsupported.
3568
3569 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
3570 and <sys/uio.h>.
3571 (init_registers_i386_avx_linux): New.
3572 (init_registers_amd64_avx_linux): Likewise.
3573 (xmltarget_i386_linux_no_xml): Likewise.
3574 (xmltarget_amd64_linux_no_xml): Likewise.
3575 (PTRACE_GETREGSET): Likewise.
3576 (PTRACE_SETREGSET): Likewise.
3577 (x86_fill_xstateregset): Likewise.
3578 (x86_store_xstateregset): Likewise.
3579 (use_xml): Likewise.
3580 (x86_linux_update_xmltarget): Likewise.
3581 (x86_linux_process_qsupported): Likewise.
3582 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
3583 (x86_arch_setup): Don't call init_registers_amd64_linux nor
3584 init_registers_i386_linux here. Call
3585 x86_linux_update_xmltarget.
3586 (the_low_target): Add x86_linux_process_qsupported.
3587
3588 * server.c (handle_query): Call target_process_qsupported.
3589
3590 * target.h (target_ops): Add process_qsupported.
3591 (target_process_qsupported): New.
3592
35932010-04-03 Pedro Alves <pedro@codesourcery.com>
3594
3595 * inferiors.c (add_thread): Set last_status kind to
3596 TARGET_WAITKIND_IGNORE.
3597 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
3598 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
3599 (linux_wait_1): Move `thread' local definition to block that uses
3600 it. Don't NULL initialize `event_child'.
3601 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
3602 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
3603 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
3604
36052010-04-01 Pedro Alves <pedro@codesourcery.com>
3606
3607 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
3608 an extended waitstatus, or by a watchpoint.
3609 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
3610 thread was stepping or has been stopped by a watchpoint.
3611
36122010-04-01 Pedro Alves <pedro@codesourcery.com>
3613
3614 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
3615 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
3616 of another, then delete the previous, and validate all
3617 breakpoints.
3618 (validate_inserted_breakpoint): New.
3619 (delete_disabled_breakpoints): New.
3620 (validate_breakpoints): New.
3621 (check_mem_read): Validate breakpoints before trusting their
3622 shadow. Delete disabled breakpoints.
3623 (check_mem_write): Validate breakpoints before trusting they
3624 should be inserted. Delete disabled breakpoints.
3625 * mem-break.h (validate_breakpoints):
3626 * server.c (handle_query): Validate breakpoints when we see a
3627 qSymbol query.
3628
36292010-04-01 Pedro Alves <pedro@codesourcery.com>
3630
3631 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
3632 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
3633 if we could tell there's a GDB breakpoint at stop_pc.
3634 (need_step_over_p): Don't do a step over if we find a GDB
3635 breakpoint at the resume PC.
3636
3637 * mem-break.c (struct raw_breakpoint): New.
3638 (enum bkpt_type): New type `gdb_breakpoint'.
3639 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
3640 fields. New field `raw'.
3641 (find_raw_breakpoint_at): New.
3642 (set_raw_breakpoint_at): Handle refcounting. Create a raw
3643 breakpoint instead.
3644 (set_breakpoint_at): Adjust.
3645 (delete_raw_breakpoint): New.
3646 (release_breakpoint): New.
3647 (delete_breakpoint): Rename to...
3648 (delete_breakpoint_1): ... this. Add proc parameter. Use
3649 release_breakpoint. Return ENOENT.
3650 (delete_breakpoint): Reimplement.
3651 (find_breakpoint_at): Delete.
3652 (find_gdb_breakpoint_at): New.
3653 (delete_breakpoint_at): Delete.
3654 (set_gdb_breakpoint_at): New.
3655 (delete_gdb_breakpoint_at): New.
3656 (gdb_breakpoint_here): New.
3657 (set_reinsert_breakpoint): Use release_breakpoint.
3658 (uninsert_breakpoint): Rename to ...
3659 (uninsert_raw_breakpoint): ... this.
3660 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
3661 (reinsert_raw_breakpoint): Change parameter type to
3662 raw_breakpoint.
3663 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
3664 instead.
3665 (check_breakpoints): Adjust. Use release_breakpoint.
3666 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
3667 (breakpoint_inserted_here): Ditto.
3668 (check_mem_read): Adjust to iterate over raw breakpoints instead.
3669 Don't trust the breakpoint's shadow if it is not inserted.
3670 (check_mem_write): Adjust to iterate over raw breakpoints instead.
3671 (delete_all_breakpoints): Adjust.
3672 (free_all_breakpoints): Mark all breakpoints as uninserted, and
3673 use delete_breakpoint_1.
3674
3675 * mem-break.h (breakpoints_supported): Delete declaration.
3676 (set_gdb_breakpoint_at): Declare.
3677 (gdb_breakpoint_here): Declare.
3678 (delete_breakpoint_at): Delete.
3679 (delete_gdb_breakpoint_at): Declare.
3680
3681 * server.h (struct raw_breakpoint): Forward declare.
3682 (struct process_info): New field `raw_breakpoints'.
3683
3684 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
3685 breakpoints.
3686
36872010-03-24 Pedro Alves <pedro@codesourcery.com>
3688
3689 * linux-low.c (status_pending_p_callback): Fix comment.
3690 (linux_wait_for_event_1): Move most of the internal breakpoint
3691 handling from here...
3692 (linux_wait_1): ... to here.
3693 (count_events_callback): New.
3694 (select_singlestep_lwp_callback): New.
3695 (select_event_lwp_callback): New.
3696 (cancel_breakpoints_callback): New.
3697 (select_event_lwp): New.
3698 (linux_wait_1): Simplify internal breakpoint handling. Give equal
3699 priority to all LWPs that have had events that should be reported
3700 to the client. Cancel breakpoints when about to reporting the
3701 event to the client, not while stopping lwps. No longer cancel
3702 finished single-steps here.
3703 (cancel_finished_single_step): Delete.
3704 (cancel_finished_single_steps): Delete.
3705
37062010-03-24 Pedro Alves <pedro@codesourcery.com>
3707
3708 * mem-break.c (enum bkpt_type): New.
3709 (struct breakpoint): New field `type'.
3710 (set_breakpoint_at): Change return type to struct breakpoint
3711 pointer. Set type to `other_breakpoint' by default.
3712 (delete_breakpoint): Rewrite, supporting more than one breakpoint
3713 in the breakpoint list.
3714 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
3715 (reinsert_breakpoint): Rename to ...
3716 (reinsert_raw_breakpoint): ... this.
3717 (reinsert_breakpoints_at): Adjust.
3718 * mem-break.h (struct breakpoint): Declare.
3719 (set_breakpoint_at): Change return type to struct breakpoint
3720 pointer.
3721
37222010-03-24 Pedro Alves <pedro@codesourcery.com>
3723
3724 * server.c (handle_query): Assign, not compare.
3725
37262010-03-24 Pedro Alves <pedro@codesourcery.com>
3727
3728 Teach linux gdbserver to step-over-breakpoints.
3729
3730 * linux-low.c (can_hardware_single_step): New.
3731 (supports_breakpoints): New.
3732 (handle_extended_wait): If stopping threads, read the stop pc of
3733 the new cloned LWP.
3734 (get_pc): New.
3735 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
3736 low target doesn't support retrieving the PC.
3737 (add_lwp): Set last_resume_kind to resume_continue.
3738 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
3739 (linux_attach): Don't clear stop_expected. Set the lwp's
3740 last_resume_kind to resume_stop.
3741 (linux_detach_one_lwp): Don't check for removed breakpoints.
3742 (check_removed_breakpoint): Delete.
3743 (status_pending_p): Rename to ...
3744 (status_pending_p_callback): ... this. Don't check for removed
3745 breakpoints. Don't consider threads that are stopped from GDB's
3746 perspective.
3747 (linux_wait_for_lwp): Always read the stop_pc here.
3748 (cancel_breakpoint): New.
3749 (step_over_bkpt): New global.
3750 (linux_wait_for_event_1): Implement stepping over breakpoints.
3751 (gdb_wants_lwp_stopped): New.
3752 (gdb_wants_all_stopped): New.
3753 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
3754 single-step traps here. Store the thread's last reported target
3755 wait status.
3756 (send_sigstop): Don't clear stop_expected. Always set it,
3757 instead.
3758 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
3759 (cancel_finished_single_step): New.
3760 (cancel_finished_single_steps): New.
3761 (wait_for_sigstop): Don't cancel finished single-step traps here.
3762 (linux_resume_one_lwp): Don't check for removed breakpoints.
3763 Don't set `step' on non-hardware step archs.
3764 (linux_set_resume_request): Ignore resume_stop requests if already
3765 stopping or stopped. Set the lwp's last_resume_kind.
3766 (resume_status_pending_p): Don't check for removed breakpoints.
3767 (need_step_over_p): New.
3768 (start_step_over): New.
3769 (finish_step_over): New.
3770 (linux_resume_one_thread): Always queue a sigstop for resume_stop
3771 requests. Clear the thread's last reported target waitstatus.
3772 Don't use the `suspended' flag. Don't consider pending breakpoints.
3773 (linux_resume): Start a step-over if necessary.
3774 (proceed_one_lwp): New.
3775 (proceed_all_lwps): New.
3776 (unstop_all_lwps): New.
3777 * linux-low.h (struct lwp_info): Rewrite comment for the
3778 `suspended' flag. Add the `stop_pc' field. Delete the
3779 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
3780 Add `'last_resume_kind' and `need_step_over' fields.
3781 * inferiors.c (struct thread_info): Delete, moved elsewhere.
3782 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
3783 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
3784 (set_raw_breakpoint_at): New.
3785 (set_breakpoint_at): Rewrite to use it.
3786 (reinsert_breakpoint_handler): Delete.
3787 (set_reinsert_breakpoint): New.
3788 (reinsert_breakpoint_by_bp): Delete.
3789 (delete_reinsert_breakpoints): New.
3790 (uninsert_breakpoint): Rewrite.
3791 (uninsert_breakpoints_at): New.
3792 (reinsert_breakpoint): Rewrite.
3793 (reinsert_breakpoints_at): New.
3794 (check_breakpoints): Rewrite.
3795 (breakpoint_here): New.
3796 (breakpoint_inserted_here): New.
3797 (check_mem_read): Adjust.
3798 * mem-break.h (breakpoints_supported, breakpoint_here)
3799 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
3800 (reinsert_breakpoint_by_bp): Delete declaration.
3801 (delete_reinsert_breakpoints): Declare.
3802 (reinsert_breakpoint): Delete declaration.
3803 (reinsert_breakpoints_at): Declare.
3804 (uninsert_breakpoint): Delete declaration.
3805 (uninsert_breakpoints_at): Declare.
3806 (check_breakpoints): Adjust prototype.
3807 * server.h: Adjust include order.
3808 (struct thread_info): Declare here. Add a `last_status' field.
3809
38102010-03-23 Michael Snyder <msnyder@vmware.com>
3811
3812 * server.c (crc32): New function.
3813 (handle_query): Add handling for 'qCRC:' request.
3814
38152010-03-23 Pedro Alves <pedro@codesourcery.com>
3816
3817 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
3818 lwp had been stopped by a watchpoint.
3819
38202010-03-16 Pedro Alves <pedro@codesourcery.com>
3821
3822 * server.h (internal_error): Declare.
3823 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
3824 * utils.c (internal_error): New function.
3825
38262010-03-15 Andreas Schwab <schwab@redhat.com>
3827
3828 * configure.srv: Fix typo setting srv_regobj.
3829
38302010-03-15 Pedro Alves <pedro@codesourcery.com>
3831
3832 * linux-low.c (fetch_register): Avoid passing a non string literal
3833 format to `error'.
3834 (usr_store_inferior_registers): Ditto.
3835
38362010-03-14 Pedro Alves <pedro@codesourcery.com>
3837
3838 * linux-low.c (linux_write_memory): Bail out early if peeking
3839 memory failed.
3840
38412010-03-14 Pedro Alves <pedro@codesourcery.com>
3842
3843 * linux-low.h (struct lwp_info): New fields
3844 `stopped_by_watchpoint' and `stopped_data_address'.
3845 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
3846 here, and cache them in the lwp object.
3847 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
3848 directly.
3849 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
3850 field.
3851 (linux_stopped_by_watchpoint): Rewrite.
3852 (linux_stopped_data_address): Rewrite.
3853
38542010-03-06 Simo Melenius <simo.melenius@iki.fi>
3855
3856 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
3857 switching the current inferior, not before.
3858
38592010-03-01 H.J. Lu <hongjiu.lu@intel.com>
3860
3861 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
3862 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
3863 i386-linux.c and amd64-linux.c.
3864 (reg-i386.o): Removed.
3865 (reg-i386.c): Likewise.
3866 (reg-i386-linux.o): Likewise.
3867 (reg-i386-linux.c): Likewise.
3868 (reg-x86-64.o): Likewise.
3869 (reg-x86-64.c): Likewise.
3870 (reg-x86-64-linux.o): Likewise.
3871 (reg-x86-64-linux.c): Likewise.
3872 (i386.o): New.
3873 (i386.c): Likewise.
3874 (i386-linux.o): Likewise.
3875 (i386-linux.c): Likewise.
3876 (amd64.o): Likewise.
3877 (amd64.c): Likewise.
3878 (amd64-linux.o): Likewise.
3879 (amd64-linux.c): Likewise.
3880
3881 * configure.srv (srv_i386_regobj): New.
3882 (srv_i386_linux_regobj): Likewise.
3883 (srv_amd64_regobj): Likewise.
3884 (srv_amd64_linux_regobj): Likewise.
3885 (srv_i386_32bit_xmlfiles): Likewise.
3886 (srv_i386_64bit_xmlfiles): Likewise.
3887 (srv_i386_xmlfiles): Likewise.
3888 (srv_amd64_xmlfiles): Likewise.
3889 (srv_i386_linux_xmlfiles): Likewise.
3890 (srv_amd64_linux_xmlfiles): Likewise.
3891 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
3892 srv_xmlfiles to $srv_i386_xmlfiles.
3893 (i[34567]86-*-mingw32ce*): Likewise.
3894 (i[34567]86-*-mingw*): Likewise.
3895 (i[34567]86-*-nto*): Likewise.
3896 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
3897 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
3898 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
3899 (x86_64-*-linux*): Likewise.
3900
3901 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
3902 (init_registers_amd64_linux): New.
3903 (x86_arch_setup): Replace init_registers_x86_64_linux with
3904 init_registers_amd64_linux.
3905
39062010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
3907
3908 * configure.ac: Check for libdl. If it is not available link against
3909 static libthread_db.
3910 * configure: Regenerate.
3911
39122010-02-22 Pedro Alves <pedro@codesourcery.com>
3913
3914 PR9605
3915
3916 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
3917 handing a read watchpoint.
3918 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
3919
39202010-02-12 Doug Evans <dje@google.com>
3921
3922 * linux-low.c (linux_supports_tracefork_flag): Document.
3923 (linux_look_up_symbols): Add comment.
3924
39252010-02-03 H.J. Lu <hongjiu.lu@intel.com>
3926
3927 * regcache.c (supply_register): Clear regcache if buf is NULL.
3928
39292010-02-02 Nicolas Roche <roche@sourceware.org>
3930 Joel Brobecker <brobecker@adacore.com>
3931
3932 * inferiors.c (find_inferior): Add function documentation.
3933 (unloaded_dll): Handle the case where the unloaded dll has not
3934 been previously registered in the dll list.
3935
39362010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
3937
3938 * linux-arm-low.c (thumb_breakpoint_len): Delete.
3939 (thumb2_breakpoint): New.
3940 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
3941
39422010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
3943
3944 * linux-low.c (get_stop_pc): Check for SIGTRAP.
3945 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
3946 breakpoints.
3947
39482010-01-21 Pedro Alves <pedro@codesourcery.com>
3949
3950 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
3951
39522010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
3953
3954 * linux-s390-low.c (s390_collect_ptrace_register)
3955 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
3956
39572010-01-21 Doug Evans <dje@google.com>
3958
3959 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
3960 (PTRACE_ARG4_TYPE): New macro.
3961 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
3962 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
3963 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
3964 (usr_store_inferior_registers): Ditto.
3965 (linux_read_memory, linux_write_memory): Ditto.
3966 (linux_test_for_tracefork): Ditto.
3967
3968 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
3969 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
3970
39712010-01-21 Pedro Alves <pedro@codesourcery.com>
3972
3973 * proc-service.c (ps_lgetregs): Don't refetch registers from the
3974 target.
3975
39762010-01-21 Pedro Alves <pedro@codesourcery.com>
3977
3978 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
3979 prototype to take a regcache. Adjust.
3980
39812010-01-20 Pedro Alves <pedro@codesourcery.com>
3982
3983 * regcache.h (struct thread_info): Forward declare.
3984 (struct regcache): New.
3985 (new_register_cache): Adjust prototype.
3986 (get_thread_regcache): Declare.
3987 (free_register_cache): Adjust prototype.
3988 (registers_to_string, registers_from_string): Ditto.
3989 (supply_register, supply_register_by_name, collect_register)
3990 (collect_register_as_string, collect_register_by_name): Ditto.
3991 * regcache.c (struct inferior_regcache_data): Delete.
3992 (get_regcache): Rename to ...
3993 (get_thread_regcache): ... this. Adjust. Switch inferior before
3994 fetching registers.
3995 (regcache_invalidate_one): Adjust.
3996 (regcache_invalidate): Fix prototype.
3997 (new_register_cache): Return the new register cache.
3998 (free_register_cache): Change prototype.
3999 (realloc_register_cache): Adjust.
4000 (registers_to_string): Change prototype to take a regcache. Adjust.
4001 (registers_from_string): Ditto.
4002 (register_data): Ditto.
4003 (supply_register): Ditto.
4004 (supply_register_by_name): Ditto.
4005 (collect_register): Ditto.
4006 (collect_register_as_string): Ditto.
4007 (collect_register_by_name): Ditto.
4008 * server.c (process_serial_event): Adjust.
4009 * linux-low.h (regset_fill_func, regset_store_func): Change
4010 prototype.
4011 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
4012 Change prototype.
4013 * linux-low.c (get_stop_pc): Adjust.
4014 (check_removed_breakpoint): Adjust.
4015 (linux_wait_for_event): Adjust.
4016 (linux_resume_one_lwp): Adjust.
4017 (fetch_register): Add regcache parameter. Adjust.
4018 (usr_store_inferior_registers): Ditto.
4019 (regsets_fetch_inferior_registers): Ditto.
4020 (regsets_store_inferior_registers): Ditto.
4021 (linux_fetch_registers, linux_store_registers): Ditto.
4022 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
4023 regcache. Adjust.
4024 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
4025 Ditto.
4026 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
4027 prototype to take a regcache.
4028 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
4029 * remote-utils.c (convert_ascii_to_int, outreg)
4030 (prepare_resume_reply): Change prototype to take a regcache.
4031 Adjust.
4032 * target.h (struct target_ops) <fetch_registers, store_registers>:
4033 Change prototype to take a regcache.
4034 (fetch_inferior_registers, store_inferior_registers): Change
4035 prototype to take a regcache. Adjust.
4036 * proc-service.c (ps_lgetregs): Adjust.
4037 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
4038 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
4039 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
4040 take a regcache. Adjust.
4041 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
4042 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
4043 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
4044 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
4045 * linux-cris-low.c (cris_get_pc, cris_set_pc)
4046 (cris_cannot_fetch_register):
4047 (cris_breakpoint_at): Change prototype to take a regcache.
4048 Adjust.
4049 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
4050 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
4051 to take a regcache. Adjust.
4052 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
4053 Adjust.
4054 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
4055 take a regcache. Adjust.
4056 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
4057 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
4058 (m68k_set_pc): Change prototype to take a regcache. Adjust.
4059 * linux-mips-low.c (mips_get_pc):
4060 (mips_set_pc): Change prototype to take a regcache. Adjust.
4061 (mips_reinsert_addr): Adjust.
4062 (mips_collect_register): Change prototype to take a regcache.
4063 Adjust.
4064 (mips_supply_register):
4065 (mips_collect_register_32bit, mips_supply_register_32bit)
4066 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
4067 (mips_store_fpregset): Ditto.
4068 * linux-ppc-low.c (ppc_supply_ptrace_register)
4069 (ppc_supply_ptrace_register): Ditto.
4070 (parse_spufs_run): Adjust.
4071 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
4072 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
4073 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
4074 take a regcache. Adjust.
4075 * linux-s390-low.c (s390_collect_ptrace_register)
4076 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
4077 (s390_set_pc): Change prototype to take a regcache. Adjust.
4078 (s390_arch_setup): Adjust.
4079 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
4080 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
4081 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
4082 (sparc_fill_gregset, sparc_store_gregset_from_stack)
4083 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
4084 regcache. Adjust.
4085 (sparc_breakpoint_at): Adjust.
4086 * linux-xtensa-low.c (xtensa_fill_gregset):
4087 (xtensa_store_gregset):
4088 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
4089 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
4090 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
4091 prototype to take a regcache. Adjust.
4092 * win32-arm-low.c (arm_fetch_inferior_register)
4093 (arm_store_inferior_register): Change prototype to take a
4094 regcache. Adjust.
4095 * win32-i386-low.c (i386_fetch_inferior_register)
4096 (i386_store_inferior_register): Change prototype to take a
4097 regcache. Adjust.
4098 * win32-low.c (child_fetch_inferior_registers)
4099 (child_store_inferior_registers): Change prototype to take a
4100 regcache. Adjust.
4101 (win32_wait): Adjust.
4102 (win32_fetch_inferior_registers): Change prototype to take a
4103 regcache. Adjust.
4104 (win32_store_inferior_registers): Adjust.
4105 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
4106 store_inferior_register>: Change prototype to take a regcache.
4107
41082010-01-20 Doug Evans <dje@google.com>
4109
4110 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
4111 #ifdef.
4112 (linux_wait_for_event1, linux_init_signals): Ditto.
4113 (W_STOPCODE): Provide definition if missing.
4114
41152010-01-13 Vladimir Prus <vladimir@codesourcery.com>
4116
4117 * linux-low.c (linux_core_of_thread): New.
4118 (compare_ints, show_process, list_threads): New.
4119 (linux_qxfer_osdata): Report threads and cores.
4120 (linux_target_op): Register linux_core_of_thread.
4121 * remote-utils.c (prepare_resume_reply): Report the core.
4122 (buffer_xml_printf): Support %d specifier.
4123 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
4124 New.
4125 (handle_query): Handle qXfer:threads. Announce availability
4126 thereof.
4127 * target.h (struct target_ops): New field core_of_thread.
4128
41292010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
4130
4131 * Makefile.in (clean): Remove new generated files.
4132 (reg-s390.o, reg-s390.c): Remove rules.
4133 (reg-s390x.o, reg-s390x.c): Likewise.
4134 (s390-linux32.o, s390-linux32.c): Add rules.
4135 (s390-linux64.o, s390-linux64.c): Likewise.
4136 (s390x-linux64.o, s390x-linux64.c): Likewise.
4137 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
4138 * linux-s390-low.c: Include <elf.h>.
4139 (HWCAP_S390_HIGH_GPRS): Define if undefined.
4140 (init_registers_s390): Remove prototype.
4141 (init_registers_s390x): Likewise.
4142 (init_registers_s390_linux32): Add prototype.
4143 (init_registers_s390_linux64): Likewise.
4144 (init_registers_s390x_linux64): Likewise.
4145 (s390_num_regs_3264): New define.
4146 (s390_regmap_3264): New global variable.
4147 (s390_cannot_fetch_register): Remove obsolete check.
4148 (s390_cannot_store_register): Likewise.
4149 (s390_collect_ptrace_register): Handle upper/lower register halves.
4150 (s390_supply_ptrace_register): Likewise.
4151 (s390_fill_gregset): Update to register number changes.
4152 (s390_get_hwcap): New routine.
4153 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
4154 Install appropriate regmap and register set.
4155
41562010-01-01 Joel Brobecker <brobecker@adacore.com>
4157
4158 * server.c (gdbserver_version): Update copyright year to 2010.
4159 * gdbreplay.c (gdbreplay_version): Likewise.
4160
41612009-12-28 Doug Evans <dje@google.com>
4162
4163 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
4164 elf/external.h. Include <elf.h> instead but only if necessary.
4165
41662009-12-28 Pedro Alves <pedro@codesourcery.com>
4167
4168 * linux-low.c (linux_remove_process): Remove `detaching'
4169 parameter. Don't release/detach from thread_db here.
4170 (linux_kill): Release/detach from thread_db here, ...
4171 (linux_detach): ... and here, before actually detaching.
4172 (linux_wait_1): ... and here, when a process exits.
4173 * thread-db.c (any_thread_of): New.
4174 (thread_db_free): Switch the current inferior to a thread of the
4175 passed in process.
4176
41772009-12-21 Doug Evans <dje@google.com>
4178
4179 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
4180
4181 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
4182 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
4183 warning ifndef __NR_tkill. Move setting of errno there too.
4184 Delete unnecessary resetting of errno after syscall.
4185 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
4186
4187 * configure.ac: Check for dladdr.
4188 * config.in: Regenerate.
4189 * configure: Regenerate.
4190 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
4191 (try_thread_db_load): Update.
4192
4193 * linux-low.c (my_waitpid): Delete unnecessary prototype.
4194
41952009-12-18 Doug Evans <dje@google.com>
4196
4197 * event-loop.c: Include unistd.h if it exists.
4198
4199 * linux-low.c (my_waitpid): Move definition away from being in
4200 between linux_tracefork_child/linux_test_for_tracefork.
4201
4202 * gdb_proc_service.h (psaddr_t): Fix type.
4203 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
4204 signature to match glibc.
4205
42062009-12-16 Doug Evans <dje@google.com>
4207
4208 * linux-low.c (linux_read_memory): Fix argument to read.
4209
42102009-11-26 Pedro Alves <pedro@codesourcery.com>
4211
4212 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
4213 events, don't leave current_inferior pointing at null.
4214
42152009-11-26 Pedro Alves <pedro@codesourcery.com>
4216
4217 * win32-low.c (LOG): Delete.
4218 (OUTMSG): Output to stderr.
4219 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
4220 on compile time LOG macro.
4221 (win32_wait): Fix debug output.
4222
42232009-11-26 Pedro Alves <pedro@codesourcery.com>
4224
4225 * win32-low.c (win32_add_one_solib): If the dll name is
4226 "ntdll.dll", prepend the system directory to the dll path.
4227
42282009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
4229
4230 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
4231
42322009-11-17 Nathan Sidwell <nathan@codesourcery.com>
4233 Vladimir Prus <vladimir@codesourcery.com>
4234
4235 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
4236 * configure.ac: Check for __mcoldfire__ and set
4237 gdb_cv_m68k_is_coldfire.
4238 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
4239 reg-cf.o and reg-m68k.o.
4240 * configure: Regenerated.
4241
42422009-11-16 Pedro Alves <pedro@codesourcery.com>
4243
4244 * linux-low.c (linux_remove_process): Add `detaching' parameter.
4245 Pass it to thread_db_free.
4246 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
4247 proper `detaching' argument to linux_remove_process.
4248 * linux-low.h (thread_db_free): Add `detaching' parameter.
4249 * thread-db.c (thread_db_init): Pass false as `detaching' argument
4250 to thread_db_free.
4251 (thread_db_free): Add `detaching' parameter. Only
4252 call td_ta_clear_event if detaching from process.
4253
42542009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
4255
4256 * thread-db.c (thread_db_free): Fix typo.
4257
42582009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
4259
4260 PR gdb/10838
4261 * thread-db.c (thread_db_free): Call td_ta_clear_event.
4262
42632009-11-03 Nathan Sidwell <nathan@codesourcery.com>
4264
4265 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
4266 with an i686 compiler.
4267 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
4268 needed.
4269 * configure: Rebuilt.
4270
42712009-10-29 Sandra Loosemore <sandra@codesourcery.com>
4272
4273 PR gdb/10783
4274
4275 * server.c (handle_search_memory_1): Correct read_addr initialization
4276 in loop for searching subsequent chunks.
4277
42782009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
4279
4280 * configure.ac: New --with-libthread-db option.
4281 * thread-db.c: Allow direct dependence on libthread_db.
4282 (thread_db_free): Adjust.
4283 * config.in: Regenerate.
4284 * configure: Likewise.
4285
42862009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
4287
4288 PR gdb/10757
4289 * thread-db.c (attach_thread): New function.
4290 (maybe_attach_thread): Return success/failure.
4291 (find_new_threads_callback): Adjust.
4292 (thread_db_find_new_threads): Loop until no new threads.
4293
42942009-10-13 Pedro Alves <pedro@codesourcery.com>
4295
4296 * proc-service.c (ps_lgetregs): Formatting.
4297
42982009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
4299
4300 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
4301 * configure.ac: Adjust.
4302 * linux-low.h (struct process_info_private): Move members to struct
4303 thread_db.
4304 (thread_db_free, thread_db_handle_monitor_command): New prototype.
4305 * linux-low.c (linux_remove_process): Adjust.
4306 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
4307 * server.c (handle_query): Move code ...
4308 (handle_monitor_command): ... here. New function.
4309 * target.h (struct target_ops): New member.
4310 * thread-db.c (struct thread_db): New.
4311 (libthread_db_search_path): New variable.
4312 (thread_db_create_event, thread_db_enable_reporting)
4313 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
4314 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
4315 (try_thread_db_load_1, dladdr_to_soname): New functions.
4316 (try_thread_db_load, thread_db_load_search): New functions.
4317 (thread_db_init): Search for libthread_db.
4318 (thread_db_free): New function.
4319 (thread_db_handle_monitor_command): Likewise.
4320 * config.in: Regenerate.
4321 * configure: Regenerate.
4322
43232009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
4324
4325 * spu-low.c (spu_kill): Wait for inferior to terminate.
4326 Call clear_inferiors.
4327 (spu_detach): Call clear_inferiors.
4328
43292009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
4330
4331 * aclocal.m4: Regenerate.
4332 * config.in: Likewise.
4333 * configure: Likewise.
4334
43352009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
4336
4337 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
4338 (parse_spufs_run): New function.
4339 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
4340 (ppc_breakpoint_at): Handle SPU breakpoints.
4341
43422009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
4343
4344 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
4345 (SPUFS_MAGIC): Define.
4346 (spu_enumerate_spu_ids): New function.
4347 (linux_qxfer_spu): New function.
4348 (linux_target_ops): Install linux_qxfer_spu.
4349
43502009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
4351
4352 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
4353 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
4354 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
4355 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
4356 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
4357 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
4358 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
4359 (init_registers_powerpc_cell32l): Add prototype.
4360 (init_registers_powerpc_cell64l): Likewise.
4361 (ppc_arch_setup): Detect Cell/B.E. architecture.
4362
43632009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
4364
4365 * Makefile.in (datarootdir): New variable.
4366
43672009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
4368
4369 * linux-low.c (linux_write_memory): Update debugging output.
4370 * Makefile.in (clean): Add new descriptions.
4371 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
4372 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
4373 * configure.srv: Add new files for arm*-*-linux*.
4374 * linux-arm-low.c: Add new declarations.
4375 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
4376 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
4377 (HWCAP_VFPv3D16): New.
4378 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
4379 instead of __IWMMXT__.
4380 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
4381 (arm_arch_setup): New.
4382 (target_regsets): Remove #ifdef. Add VFP regset.
4383 (the_low_target): Use arm_arch_setup.
4384
43852009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
4386
4387 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
4388 the main thread again.
4389
43902009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
4391
4392 Adding Neutrino gdbserver.
4393 * configure: Regenerated.
4394 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
4395 * configure.srv (i[34567]86-*-nto*): New target.
4396 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
4397 * remote-utils.c [__QNX__]: Include sys/iomgr.h
4398 (nto_comctrl) [__QNX__]: New function.
4399 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
4400
44012009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
4402
4403 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
4404 srv_tgtobj.
4405
44062009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
4407 Pedro Alves <pedro@codesourcery.com>
4408
4409 * win32-i386-low.c (i386_get_thread_context): Handle systems that
4410 don't support CONTEXT_EXTENDED_REGISTERS.
4411 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
4412 (the_low_target): Install them.
4413 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
4414 failing with ERROR_PIPE_NOT_CONNECTED.
4415
44162009-06-30 Doug Evans <dje@google.com>
4417 Pierre Muller <muller@ics.u-strasbg.fr>
4418
4419 Add h/w watchpoint support to x86-linux, win32-i386.
4420 * Makefile.in (SFILES): Add i386-low.c
4421 (i386_low_h): Define.
4422 (i386-low.o): Add dependencies.
4423 (linux-x86-low.o): Add i386-low.h dependency.
4424 (win32-i386-low.o): Ditto.
4425 * i386-low.c: New file.
4426 * i386-low.h: New file.
4427 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
4428 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
4429 * linux-low.c (linux_add_process): Initialize arch_private.
4430 (linux_remove_process): Free arch_private.
4431 (add_lwp): Initialize arch_private.
4432 (delete_lwp): Free arch_private.
4433 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
4434 provided.
4435 * linux-low.h (process_info_private): New member arch_private.
4436 (lwp_info): New member arch_private.
4437 (linux_target_ops): New members new_process, new_thread,
4438 prepare_to_resume.
4439 (ptid_of): New macro.
4440 * linux-x86-low.c: Include stddef.h, i386-low.h.
4441 (arch_process_info): New struct.
4442 (arch_lwp_info): New struct.
4443 (x86_linux_dr_get, x86_linux_dr_set): New functions.
4444 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
4445 (i386_dr_low_get_status): New function.
4446 (x86_insert_point, x86_remove_point): New functions.
4447 (x86_stopped_by_watchpoint): New function.
4448 (x86_stopped_data_address): New function.
4449 (x86_linux_new_process, x86_linux_new_thread): New functions.
4450 (x86_linux_prepare_to_resume): New function.
4451 (the_low_target): Add entries for insert_point, remove_point,
4452 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
4453 prepare_to_resume.
4454 * server.c (debug_hw_points): New global.
4455 (monitor_show_help): Document set debug-hw-points.
4456 (handle_query): Process "set debug-hw-points".
4457 * server.h (debug_hw_points): Declare.
4458 (paddress): Declare.
4459 * utils.c (NUMCELLS, CELLSIZE): New macros.
4460 (get_sell, xsnprintf, paddress): New functions.
4461 * win32-arm-low.c (the_low_target): Add entries for insert_point,
4462 remove_point, stopped_by_watchpoint, stopped_data_address.
4463 * win32-i386-low.c: Include i386-low.h.
4464 (debug_reg_state): Replaces dr.
4465 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
4466 (i386_dr_low_get_status): New function.
4467 (i386_insert_point, i386_remove_point): New functions.
4468 (i386_stopped_by_watchpoint): New function.
4469 (i386_stopped_data_address): New function.
4470 (i386_initial_stuff): Update.
4471 (get_thread_context,set_thread_context,i386_thread_added): Update.
4472 (the_low_target): Add entries for insert_point,
4473 remove_point, stopped_by_watchpoint, stopped_data_address.
4474 * win32-low.c (win32_insert_watchpoint): New function.
4475 (win32_remove_watchpoint): New function.
4476 (win32_stopped_by_watchpoint): New function.
4477 (win32_stopped_data_address): New function.
4478 (win32_target_ops): Add entries for insert_watchpoint,
4479 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
4480 * win32-low.h (win32_target_ops): New members insert_point,
4481 remove_point, stopped_by_watchpoint, stopped_data_address.
4482
44832009-06-25 Pedro Alves <pedro@codesourcery.com>
4484
4485 * server.c (process_serial_event): Re-return unsupported, not
4486 error, if the type isn't recognized. Re-allow supporting only
4487 insert or remove packets. Also call require_running for
4488 breakpoints. Add missing break statement to default case. Tidy.
4489 * target.h (struct target_ops): Rename insert_watchpoint to
4490 insert_point, and remove_watchpoint to remove_point.
4491
4492 * linux-low.h (struct linux_target_ops): Likewise.
4493 * linux-low.c (linux_insert_watchpoint): Rename to ...
4494 (linux_insert_point): ... this. Adjust.
4495 (linux_remove_watchpoint): Rename to ...
4496 (linux_remove_point): ... this. Adjust.
4497 (linux_target_ops): Adjust.
4498 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
4499 (cris_insert_point): ... this.
4500 (cris_remove_watchpoint): Rename to ...
4501 (cris_remove_point): ... this.
4502 (the_low_target): Adjust.
4503
45042009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
4505
4506 * server.c (handle_v_kill): Pass signal_pid to
4507 kill_inferior if multi_process is zero.
4508
45092009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
4510
4511 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
4512 * target.h (target_ops): Comment for *_watchpoint to make it clear
4513 the functions can get types '0' and '1'.
4514
45152009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
4516
4517 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
4518 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
4519 * regcache.c (get_regcache): Likewise.
4520 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
4521 * win32-low.c (child_fetch_inferior_registers): Remove check for
4522 regno 0.
4523
45242009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
4525 Pedro Alves <pedro@codesourcery.com>
4526
4527 * target.h (struct target_ops) <supports_multi_process>: New
4528 callback.
4529 (target_supports_multi_process): New.
4530 * server.c (handle_query): Even if GDB reports support, only
4531 enable multi-process if the target also supports it. Report
4532 multi-process support only if the target backend supports it.
4533 * linux-low.c (linux_supports_multi_process): New function.
4534 (linux_target_ops): Install it as target_supports_multi_process
4535 callback.
4536
45372009-05-24 Doug Evans <dje@google.com>
4538
4539 Global renaming of find_thread_pid to find_thread_ptid.
4540 * server.h (find_thread_ptid): Renamed from find_thread_pid.
4541 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
4542 All callers updated.
4543
4544 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
4545 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
4546 directly.
4547
4548 * linux-low.c (get_stop_pc): Print pc if debug_threads.
4549 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
4550 (linux_resume_one_lwp): Ditto.
4551
45522009-05-23 Doug Evans <dje@google.com>
4553
4554 * linux-low.c (linux_resume_one_lwp): Change type of first arg
4555 from struct inferior_list_entry * to struct lwp_info *.
4556 All callers updated.
4557
45582009-05-13 Doug Evans <dje@google.com>
4559
4560 * linux-x86-low.c: Don't include assert.h.
4561 (x86_siginfo_fixup): Use fatal, not assert.
4562 (x86_arch_setup): Fix comment.
4563
45642009-05-12 Doug Evans <dje@google.com>
4565
4566 Biarch support for i386/amd64 gdbserver.
4567 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
4568 Add linux-x86-low.c.
4569 (linux-i386-low.o, linux-x86-64-low.o): Delete.
4570 (linux-x86-low.o): Add.
4571 * linux-x86-64-low.c: Delete.
4572 * linux-i386-low.c: Delete.
4573 * linux-x86-low.c: New file.
4574 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
4575 linux-x86-low.o.
4576 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
4577 linux-x86-low.o.
4578 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
4579 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
4580 (linux_child_pid_to_exec_file): New function.
4581 (elf_64_header_p, elf_64_file_p): New functions.
4582 (siginfo_fixup): New function.
4583 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
4584 give target a chance to convert layout.
4585 * linux-low.h (linux_target_ops): New member siginfo_fixup.
4586 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
4587
45882009-05-07 Doug Evans <dje@google.com>
4589
4590 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
4591 (regsets_store_inferior_registers): Ditto.
4592
45932009-05-06 Pedro Alves <pedro@codesourcery.com>
4594
4595 PR server/10048
4596
4597 * linux-low.c (must_set_ptrace_flags): Delete.
4598 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
4599 of the global.
4600 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
4601 `lwp->must_set_ptrace_flags' instead.
4602 (linux_wait_for_event_1): Set ptrace options here.
4603 (linux_wait_1): ... not here.
4604
46052009-04-30 Doug Evans <dje@google.com>
4606
4607 * inferiors.c (started_inferior_callback): New function.
4608 (attached_inferior_callback): New function.
4609 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
4610 * server.c (print_started_pid, print_attached_pid): New functions.
4611 (detach_or_kill_for_exit): New function.
4612 (main): Call it instead of for_each_inferior (kill_inferior_callback).
4613 * server.h (have_started_inferiors_p): Declare.
4614 (have_attached_inferiors_p): Declare.
4615
4616 * inferiors.c (remove_process): Fix memory leak, free process.
4617 * linux-low.c (linux_remove_process): New function.
4618 (linux_kill): Call it instead of remove_process.
4619 (linux_detach, linux_wait_1): Ditto.
4620
46212009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
4622
4623 * configure.srv: Add x86 Windows CE target.
4624
46252009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
4626
4627 * inferiors.c (get_thread_process): Make global.
4628 * server.h (get_thread_process): Add prototype.
4629 * thread-db.c (find_one_thread): Use get_thread_process
4630 instead of current_process.
4631 (thread_db_get_tls_address): Do not crash if called when
4632 thread layer is not yet initialized.
4633
46342009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
4635
4636 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
4637 * spu-low.c (current_tid): Rename to ...
4638 (current_ptid): ... this.
4639 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
4640 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
4641 ptid_get_lwp (current_ptid) instead of current_tid.
4642 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
4643 instead of current_tid. Use find_process_pid to verify pid
4644 argument is valid. Pass proper argument to remove_process.
4645 (spu_thread_alive): Compare current_ptid instead of current_tid.
4646 (spu_resume): Likewise.
4647
46482009-04-02 Pedro Alves <pedro@codesourcery.com>
4649
4650 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
4651 variable.
4652
46532009-04-01 Pedro Alves <pedro@codesourcery.com>
4654
4655 Implement the multiprocess extensions, and add linux multiprocess
4656 support.
4657
4658 * server.h (ULONGEST): Declare.
4659 (struct ptid, ptid_t): New.
4660 (minus_one_ptid, null_ptid): Declare.
4661 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
4662 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
4663 (struct inferior_list_entry): Change `id' type from unsigned from
4664 to ptid_t.
4665 (struct sym_cache, struct breakpoint, struct
4666 process_info_private): Forward declare.
4667 (struct process_info): Declare.
4668 (current_process): Declare.
4669 (all_processes): Declare.
4670 (initialize_inferiors): Declare.
4671 (add_thread): Adjust to use ptid_t.
4672 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
4673 (add_process, remove_process, find_thread_pid): Declare.
4674 (find_inferior_id): Adjust to use ptid_t.
4675 (cont_thread, general_thread, step_thread): Change type to ptid_t.
4676 (multi_process): Declare.
4677 (push_event): Adjust to use ptid_t.
4678 (read_ptid, write_ptid): Declare.
4679 (prepare_resume_reply): Adjust to use ptid_t.
4680 (clear_symbol_cache): Declare.
4681 * inferiors.c (all_processes): New.
4682 (null_ptid, minus_one_ptid): New.
4683 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
4684 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
4685 (add_thread): Change unsigned long to ptid. Remove gdb_id
4686 parameter. Adjust.
4687 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
4688 (gdb_id_to_thread): Rename to ...
4689 (find_thread_pid): ... this. Change unsigned long to ptid.
4690 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
4691 (loaded_dll, pull_pid_from_list): Adjust.
4692 (add_process, remove_process, find_process_pid)
4693 (get_thread_process, current_process, initialize_inferiors): New.
4694 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
4695 (struct target_waitstatus) <related_pid>: Ditto.
4696 (struct target_ops) <kill, detach>: Add `pid' argument. Change
4697 return type to int.
4698 (struct target_ops) <join>: Add `pid' argument.
4699 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
4700 (struct target_ops) <wait>: Add `ptid' field. Change return type
4701 to ptid.
4702 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
4703 (mywait): Add `ptid' argument. Change return type to ptid_t.
4704 (target_pid_to_str): Declare.
4705 * target.c (set_desired_inferior): Adjust to use ptids.
4706 (mywait): Add new `ptid' argument. Adjust.
4707 (target_pid_to_str): New.
4708 * mem-break.h (free_all_breakpoints): Declare.
4709 * mem-break.c (breakpoints): Delelete.
4710 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
4711 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
4712 to use per-process breakpoint list.
4713 (free_all_breakpoints): New.
4714 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
4715 (symbol_cache, all_symbols_looked_up): Delete.
4716 (hexchars): New.
4717 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
4718 read_ptid): New.
4719 (prepare_resume_reply): Change ptid argument's type from unsigned
4720 long to ptid_t. Adjust. Implement W;process and X;process.
4721 (free_sym_cache, clear_symbol_cache): New.
4722 (look_up_one_symbol): Adjust to per-process symbol cache. *
4723 * server.c (cont_thread, general_thread, step_thread): Change type
4724 to ptid_t.
4725 (attached): Delete.
4726 (multi_process): New.
4727 (last_ptid): Change type to ptid_t.
4728 (struct vstop_notif) <ptid>: Change type to ptid_t.
4729 (queue_stop_reply, push_event): Change `ptid' argument's type to
4730 ptid_t.
4731 (discard_queued_stop_replies): Add `pid' argument.
4732 (start_inferior): Adjust to use ptids. Adjust to mywait interface
4733 changes. Don't reference the `attached' global.
4734 (attach_inferior): Adjust to mywait interface changes.
4735 (handle_query): Adjust to use ptids. Parse GDB's qSupported
4736 features. Handle and report "multiprocess+". Handle
4737 "qAttached:PID".
4738 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
4739 changes.
4740 (handle_v_kill): New.
4741 (handle_v_stopped): Adjust to use target_pid_to_str.
4742 (handle_v_requests): Allow multiple attaches and runs when
4743 multiprocess extensions are in effect. Handle "vKill".
4744 (myresume): Adjust to use ptids.
4745 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
4746 (handle_status): Adjust to discard_queued_stop_replies interface
4747 change.
4748 (first_thread_of, kill_inferior_callback)
4749 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
4750 (main): Call initialize_inferiors. Adjust to use ptids, killing
4751 and detaching from all inferiors. Handle multiprocess packet
4752 variants.
4753 * linux-low.h: Include gdb_proc_service.h.
4754 (struct process_info_private): New.
4755 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
4756 <lwpid_of>: Use ptid_get_lwp.
4757 (get_lwp_thread): Adjust.
4758 (struct lwp_info): Add `dead' member.
4759 (find_lwp_pid): Declare.
4760 * linux-low.c (thread_db_active): Delete.
4761 (new_inferior): Adjust comment.
4762 (inferior_pid): Delete.
4763 (linux_add_process): New.
4764 (handle_extended_wait): Adjust.
4765 (add_lwp): Change unsigned long to ptid.
4766 (linux_create_inferior): Add process to processes table. Adjust
4767 to use ptids. Don't set new_inferior here.
4768 (linux_attach_lwp): Rename to ...
4769 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
4770 it. Adjust to use ptids.
4771 (linux_attach_lwp): New.
4772 (linux_attach): Add process to processes table. Don't set
4773 new_inferior here.
4774 (struct counter): New.
4775 (second_thread_of_pid_p, last_thread_of_process_p): New.
4776 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
4777 multiple processes.
4778 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
4779 processes. Remove process from process table.
4780 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
4781 to multiple processes.
4782 (any_thread_of): New.
4783 (linux_detach): Add `pid' argument, and handle it. Remove process
4784 from processes table.
4785 (linux_join): Add `pid' argument. Handle it.
4786 (linux_thread_alive): Change unsighed long argument to ptid_t.
4787 Consider dead lwps as not being alive.
4788 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
4789 threads we're not interested in.
4790 (same_lwp, find_lwp_pid): New.
4791 (linux_wait_for_lwp): Change `pid' argument's type from int to
4792 ptid_t. Adjust.
4793 (linux_wait_for_event): Rename to ...
4794 (linux_wait_for_event_1): ... this. Change `pid' argument's type
4795 from int to ptid_t. Adjust.
4796 (linux_wait_for_event): New.
4797 (linux_wait_1): Add `ptid' argument. Change return type to
4798 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
4799 that exit from the process table.
4800 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
4801 Adjust.
4802 (mark_lwp_dead): New.
4803 (wait_for_sigstop): Adjust to use ptids. If a process exits while
4804 stopping all threads, mark its main lwp as dead.
4805 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
4806 ptids.
4807 (fetch_register, usr_store_inferior_registers)
4808 (regsets_fetch_inferior_registers)
4809 (regsets_store_inferior_registers, linux_read_memory)
4810 (linux_write_memory): Inline `inferior_pid'.
4811 (linux_look_up_symbols): Adjust to use per-process
4812 `thread_db_active'.
4813 (linux_request_interrupt): Adjust to use ptids.
4814 (linux_read_auxv): Inline `inferior_pid'.
4815 (initialize_low): Don't reference thread_db_active.
4816 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
4817 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
4818 (ps_getpid): Return the pid of the current inferior.
4819 * thread-db.c (proc_handle, thread_agent): Delete.
4820 (thread_db_create_event, thread_db_enable_reporting): Adjust to
4821 per-process data.
4822 (find_one_thread): Change argument type to ptid_t. Adjust to
4823 per-process data.
4824 (maybe_attach_thread): Adjust to per-process data and ptids.
4825 (thread_db_find_new_threads): Ditto.
4826 (thread_db_init): Ditto.
4827 * spu-low.c (spu_create_inferior, spu_attach): Add process to
4828 processes table. Adjust to use ptids.
4829 (spu_kill, spu_detach): Adjust interface. Remove process from
4830 processes table.
4831 (spu_join, spu_thread_alive): Adjust interface.
4832 (spu_wait): Adjust interface. Remove process from processes
4833 table. Adjust to use ptids.
4834 * win32-low.c (current_inferior_tid): Delete.
4835 (current_inferior_ptid): New.
4836 (debug_event_ptid): New.
4837 (thread_rec): Take a ptid. Adjust.
4838 (child_add_thread): Add `pid' argument. Adjust to use ptids.
4839 (child_delete_thread): Ditto.
4840 (do_initial_child_stuff): Add `attached' argument. Add process to
4841 processes table.
4842 (child_fetch_inferior_registers, child_store_inferior_registers):
4843 Adjust.
4844 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
4845 (win32_attach): Pass 1 to do_initial_child_stuff.
4846 (win32_kill): Adjust interface. Remove process from processes
4847 table.
4848 (win32_detach): Ditto.
4849 (win32_join): Adjust interface.
4850 (win32_thread_alive): Take a ptid.
4851 (win32_resume): Adjust to use ptids.
4852 (get_child_debug_event): Ditto.
4853 (win32_wait): Adjust interface. Remove exiting process from
4854 processes table.
4855
48562009-04-01 Pedro Alves <pedro@codesourcery.com>
4857
4858 Non-stop mode support.
4859
4860 * server.h (non_stop): Declare.
4861 (gdb_client_data, handler_func): Declare.
4862 (delete_file_handler, add_file_handler, start_event_loop):
4863 Declare.
4864 (handle_serial_event, handle_target_event, push_event)
4865 (putpkt_notif): Declare.
4866 * target.h (enum resume_kind): New.
4867 (struct thread_resume): Replace `step' field by `kind' field.
4868 (TARGET_WNOHANG): Define.
4869 (struct target_ops) <wait>: Add `options' argument.
4870 <supports_non_stop, async, start_non_stop>: New fields.
4871 (target_supports_non_stop, target_async): New.
4872 (start_non_stop): Declare.
4873 (mywait): Add `options' argument.
4874 * target.c (mywait): Add `options' argument. Print child exit
4875 notifications here.
4876 (start_non_stop): New.
4877 * server.c (non_stop, own_buf, mem_buf): New globals.
4878 (struct vstop_notif): New.
4879 (notif_queue): New global.
4880 (queue_stop_reply, push_event, discard_queued_stop_replies)
4881 (send_next_stop_reply): New.
4882 (start_inferior): Adjust to use resume_kind. Adjust to mywait
4883 interface changes.
4884 (attach_inferior): In non-stop mode, don't wait for the target
4885 here.
4886 (handle_general_set): Handle QNonStop.
4887 (handle_query): When handling qC, return the current general
4888 thread, instead of the first thread of the list.
4889 (handle_query): If the backend supports non-stop mode, include
4890 QNonStop+ in the qSupported query response.
4891 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
4892 and non-stop mode.
4893 (handle_v_attach, handle_v_run): Handle non-stop mode.
4894 (handle_v_stopped): New.
4895 (handle_v_requests): Report support for vCont;t. Handle vStopped.
4896 (myresume): Adjust to use resume_kind. Handle non-stop.
4897 (queue_stop_reply_callback): New.
4898 (handle_status): Handle non-stop mode.
4899 (main): Clear non_stop flag on reconnection. Use the event-loop.
4900 Refactor serial protocol handling from here ...
4901 (process_serial_event): ... to this new function. When GDB
4902 selects any thread, select one here. In non-stop mode, wait until
4903 GDB acks all pending events before exiting.
4904 (handle_serial_event, handle_target_event): New.
4905 * remote-utils.c (remote_open): Install remote_desc in the event
4906 loop.
4907 (remote_close): Remove remote_desc from the event loop.
4908 (putpkt_binary): Rename to...
4909 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
4910 (putpkt_binary): New as wrapper around putpkt_binary_1.
4911 (putpkt_notif): New.
4912 (prepare_resume_reply): In non-stop mode, don't change the
4913 general_thread.
4914 * event-loop.c: New.
4915 * Makefile.in (OBJ): Add event-loop.o.
4916 (event-loop.o): New rule.
4917
4918 * linux-low.h (pid_of): Moved here.
4919 (lwpid_of): New.
4920 (get_lwp_thread): Use lwpid_of.
4921 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
4922 * linux-low.c (pid_of): Delete.
4923 (inferior_pid): Use lwpid_of.
4924 (linux_event_pipe): New.
4925 (target_is_async_p): New.
4926 (delete_lwp): New.
4927 (handle_extended_wait): Use lwpid_of.
4928 (add_lwp): Don't set lwpid field.
4929 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
4930 (linux_kill_one_lwp): If killing a running lwp, stop it first.
4931 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
4932 (linux_detach_one_lwp): If detaching from a running lwp, stop it
4933 first. Adjust to linux_wait_for_event interface changes. Use
4934 lwpid_of.
4935 (linux_detach): Don't delete the main lwp here.
4936 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
4937 (status_pending_p): Don't consider explicitly suspended lwps.
4938 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
4939 pointer. Add OPTIONS argument. Change return type to int. Use
4940 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
4941 (linux_wait_for_event): Take an integer pid instead of a lwp_info
4942 pointer. Add status pointer argument. Return a pid instead of a
4943 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
4944 changes. In non-stop mode, don't switch to a random thread.
4945 (linux_wait): Rename to...
4946 (linux_wait_1): ... this. Add target_options argument, and handle
4947 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
4948 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
4949 clean exit and signal exit code. Don't stop all threads in
4950 non-stop mode. In all-stop mode, only stop all threads when
4951 reporting a stop to GDB. Handle explicit thread stop requests.
4952 (async_file_flush, async_file_mark): New.
4953 (linux_wait): New.
4954 (send_sigstop): Use lwpid_of.
4955 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
4956 interface changes. In non-stop mode, don't switch to a random
4957 thread.
4958 (linux_resume_one_lwp): Use lwpid_of.
4959 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
4960 (linux_resume_one_thread): ... this. Handle resume_stop. In
4961 non-stop mode, don't look for pending flag in all threads.
4962 (resume_status_pending_p): Don't consider explicitly suspended
4963 threads.
4964 (my_waitpid): Reimplement. Emulate __WALL.
4965 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
4966 Use lwpid_of.
4967 (sigchld_handler, linux_supports_non_stop, linux_async)
4968 (linux_start_non_stop): New.
4969 (linux_target_ops): Register linux_supports_non_stop, linux_async
4970 and linux_start_non_stop.
4971 (initialize_low): Install SIGCHLD handler.
4972 * thread-db.c (thread_db_create_event, find_one_thread)
4973 (thread_db_get_tls_address): Use lwpid_of.
4974 * win32-low.c (win32_detach): Adjust to use resume_kind.
4975 (win32_wait): Add `options' argument.
4976 * spu-low.c (spu_resume): Adjust to use resume_kind.
4977 (spu_wait): Add `options' argument.
4978
49792009-04-01 Pedro Alves <pedro@codesourcery.com>
4980
4981 Decouple target code from remote protocol.
4982
4983 * target.h (enum target_waitkind): New.
4984 (struct target_waitstatus): New.
4985 (struct target_ops) <wait>: Return an unsigned long. Take a
4986 target_waitstatus pointer instead of a char pointer.
4987 (mywait): Likewise.
4988 * target.c (mywait): Change prototype to return an unsigned long.
4989 Take a target_waitstatus pointer instead of a char pointer. Adjust.
4990 * server.h (thread_from_wait, old_thread_from_wait): Delete
4991 declarations.
4992 (prepare_resume_reply): Change prototype to take a
4993 target_waitstatus.
4994 * server.c (thread_from_wait, old_thread_from_wait): Delete.
4995 (last_status, last_ptid): New.
4996 (start_inferior): Remove "statusptr" argument. Adjust. Return a
4997 pid instead of a signal.
4998 (attach_inferior): Remove "status" and "signal" parameters.
4999 Adjust.
5000 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
5001 not as an address.
5002 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
5003 (handle_v_requests, myresume): Remove "status" and "signal"
5004 parameters. Adjust.
5005 (handle_status): New.
5006 (main): Delete local `status'. Adjust.
5007 * remote-utils.c: Include target.h.
5008 (prepare_resume_reply): Change prototype to take a
5009 target_waitstatus. Adjust.
5010
5011 * linux-low.c (linux_wait): Adjust to new target_ops->wait
5012 interface.
5013 * spu-low.c (spu_wait): Adjust.
5014 * win32-low.c (enum target_waitkind, struct target_waitstatus):
5015 Delete.
5016 (win32_wait): Adjust.
5017
50182009-04-01 Pedro Alves <pedro@codesourcery.com>
5019
5020 * target.h (struct thread_resume): Delete leave_stopped member.
5021 (struct target_ops): Add a `n' argument to the `resume' callback.
5022 * server.c (start_inferior): Adjust.
5023 (handle_v_cont, myresume): Adjust.
5024 * linux-low.c (check_removed_breakpoint): Adjust to resume
5025 interface change, and to removed leave_stopped field.
5026 (resume_ptr): Delete.
5027 (struct thread_resume_array): New.
5028 (linux_set_resume_request): Add new `arg' parameter. Adjust to
5029 resume interface change.
5030 (linux_continue_one_thread, linux_queue_one_thread)
5031 (resume_status_pending_p): Check if the resume field is NULL
5032 instead of checking the leave_stopped member.
5033 (linux_resume): Adjust to the target resume interface change.
5034 * spu-low.c (spu_resume): Adjust to the target resume interface
5035 change.
5036 * win32-low.c (win32_detach, win32_resume): Ditto.
5037
50382009-04-01 Pedro Alves <pedro@codesourcery.com>
5039
5040 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
5041 flag.
5042 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
5043 pending.
5044 (linux_continue_one_thread): Only preserve the stepping flag if
5045 there's a pending breakpoint.
5046
50472009-03-31 Pedro Alves <pedro@codesourcery.com>
5048
5049 * server.c (main): After the inferior having exited, call
5050 remote_close before exiting gdbserver.
5051
50522009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
5053
5054 Fix size of FPSCR in Power 7 processors.
5055 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
5056 (PPC_FEATURE_HAS_DFP): New #define.
5057 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
5058 size of the FPSCR.
5059
50602009-03-23 Pedro Alves <pedro@codesourcery.com>
5061
5062 * server.c (handle_query) Whitespace and formatting.
5063
50642009-03-22 Pedro Alves <pedro@codesourcery.com>
5065
5066 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
5067 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
5068 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
5069 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
5070 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
5071 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
5072 Makefile.in, configure.ac: Fix whitespace throughout.
5073 * configure: Regenerate.
5074
50752009-03-22 Pedro Alves <pedro@codesourcery.com>
5076
5077 * inferiors.c (find_inferior): Make it safe for the callback
5078 function to delete the currently iterated inferior.
5079
50802009-03-22 Pedro Alves <pedro@codesourcery.com>
5081
5082 * Makefile.in (linuw_low_h): Move higher.
5083 (thread-db.o): Depend on $(linux_low_h).
5084
50852009-03-17 Pedro Alves <pedro@codesourcery.com>
5086
5087 Rename "process" to "lwp" throughout.
5088
5089 * linux-low.c (all_processes): Rename to...
5090 (all_lwps): ... this.
5091 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
5092 (add_process): Rename to ...
5093 (add_lwp): ... this. Adjust.
5094 (linux_create_inferior): Adjust.
5095 (linux_attach_lwp): Adjust.
5096 (linux_attach): Adjust.
5097 (linux_kill_one_process): Rename to ...
5098 (linux_kill_one_lwp): ... this. Adjust.
5099 (linux_kill): Adjust.
5100 (linux_detach_one_process): Rename to ...
5101 (linux_detach_one_lwp): ... this. Adjust.
5102 (linux_detach): Adjust.
5103 (check_removed_breakpoint): Adjust.
5104 (status_pending_p): Adjust.
5105 (linux_wait_for_process): Rename to ...
5106 (linux_wait_for_lwp): ... this. Adjust.
5107 (linux_wait_for_event): Adjust.
5108 (send_sigstop): Adjust.
5109 (wait_for_sigstop): Adjust.
5110 (stop_all_processes): Rename to ...
5111 (stop_all_lwps): ... this.
5112 (linux_resume_one_process): Rename to ...
5113 (linux_resume_one_lwp): ... this. Adjust.
5114 (linux_set_resume_request, linux_continue_one_thread)
5115 (linux_queue_one_thread, resume_status_pending_p)
5116 (usr_store_inferior_registers, regsets_store_inferior_registers)
5117 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
5118 Adjust.
5119 * linux-low.h (get_process): Rename to ...
5120 (get_lwp): ... this. Adjust.
5121 (get_thread_process): Rename to ...
5122 (get_thread_lwp): ... this. Adjust.
5123 (get_process_thread): Rename to ...
5124 (get_lwp_thread): ... this. Adjust.
5125 (struct process_info): Rename to ...
5126 (struct lwp_info): ... this.
5127 (all_processes): Rename to ...
5128 (all_lwps): ... this.
5129 * proc-service.c (ps_lgetregs): Adjust.
5130 * thread-db.c (thread_db_create_event, find_one_thread)
5131 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
5132
51332009-03-14 Pedro Alves <pedro@codesourcery.com>
5134
5135 * server.c (handle_query): Handle "qAttached".
5136
51372009-03-13 Nathan Sidwell <nathan@codesourcery.com>
5138
5139 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
5140 GPLv3, update license URL.
5141
51422009-03-01 Doug Evans <dje@google.com>
5143
5144 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
5145 (server_h): Add gdb_signals.h.
5146 (signals.o): Update.
5147 * server.h (target_signal_from_host,target_signal_to_host_p)
5148 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
5149
51502009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
5151
5152 * remote-utils.c (getpkt): Also generate remote-debug
5153 information if noack_mode is set.
5154
51552009-02-06 Pedro Alves <pedro@codesourcery.com>
5156
5157 * server.c (handle_query): Report qXfer:siginfo:read and
5158 qXfer:siginfo:write as supported and handle them.
5159 * target.h (struct target_ops) <qxfer_siginfo>: New field.
5160 * linux-low.c (linux_xfer_siginfo): New.
5161 (linux_target_ops): Set it.
5162
51632009-01-26 Pedro Alves <pedro@codesourcery.com>
5164
5165 * server.c (gdbserver_usage): Mention --remote-debug.
5166 (main): Accept '--remote-debug' switch.
5167
51682009-01-18 Doug Evans <dje@google.com>
5169
5170 * regcache.c (new_register_cache): No need to check result of xcalloc.
5171 * server.c (handle_search_memory): Back out calls to xmalloc,
5172 result is checked and error is returned to user upon failure.
5173 (handle_query): Ditto. Add more checks for result of malloc.
5174 (handle_v_cont): Check result of malloc, report error back to
5175 user upon failure.
5176 (handle_v_run): Ditto. Call freeargv.
5177 * server.h (freeargv): Declare.
5178 * utils.c (freeargv): New fn.
5179
51802009-01-15 Doug Evans <dje@google.com>
5181
5182 * gdbreplay.c (perror_with_name): Make arg const char *.
5183 * server.h (target_signal_to_name): Make return type const char *.
5184 * thread-db.c (thread_db_err_str): Make return type const char *.
5185 * utils.c (perror_with_name): Make arg const char *.
5186
51872009-01-14 Pedro Alves <pedro@codesourcery.com>
5188
5189 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
5190 when handling a EXIT_PROCESS_DEBUG_EVENT.
5191
51922009-01-06 Joel Brobecker <brobecker@adacore.com>
5193
5194 * gdbreplay.c (gdbreplay_version): Update copyright year.
5195 * server.c (gdbserver_version): Likewise.
5196
51972009-01-05 Doug Evans <dje@google.com>
5198
5199 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
5200 (handle_extended_wait): Improve comment.
5201
52022008-12-13 Doug Evans <dje@google.com>
5203
5204 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
5205 * server.h (ATTR_MALLOC): New macro.
5206 (xmalloc,xcalloc,xstrdup): Declare.
5207 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
5208 * inferiors.c: Ditto.
5209 * linux-low.c: Ditto.
5210 * mem-break.c: Ditto.
5211 * regcache.c: Ditto.
5212 * remote-utils.c: Ditto.
5213 * server.c: Ditto.
5214 * target.c: Ditto.
5215 * win32-low.c: Ditto.
5216
52172008-12-12 Doug Evans <dje@google.com>
5218
5219 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
5220 in debugging printf.
5221
5222 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
5223
52242008-12-09 Doug Evans <dje@google.com>
5225
5226 * linux-low.h (struct process_info): Delete member tid, unused.
5227 * thread-db.c (find_one_thread): Update.
5228 (maybe_attach_thread): Update.
5229
52302008-12-02 Pedro Alves <pedro@codesourcery.com>
5231
5232 * target.h (struct target_ops): Add qxfer_osdata member.
5233 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
5234 and dirent.h.
5235 (linux_qxfer_osdata): New functions.
5236 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
5237 callback.
5238 * server.c (handle_query): Handle "qXfer:osdata:read:".
5239 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
5240 (buffer_xml_printf): New functions.
5241 * server.h (struct buffer): New.
5242 (buffer_grow_str, buffer_grow_str0): New macros.
5243 (buffer_grow, buffer_free, buffer_init, buffer_finish)
5244 (buffer_xml_printf): Declare.
5245
52462008-11-24 Doug Evans <dje@google.com>
5247
5248 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
5249
52502008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
5251
5252 * server.c (handle_v_run): Always use the supplied argument list.
5253
52542008-11-19 Bob Wilson <bob.wilson@acm.org>
5255
5256 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
5257 (xtensa_regmap_table): Add entry for scompare1.
5258
52592008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
5260
5261 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
5262 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
5263 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
5264 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
5265 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
5266 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
5267 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
5268 XML target descriptions.
5269 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
5270 when inferior is running on an ISA 2.05 or later processor. Add
5271 special case to return offset for full 64-bit slot of FPSCR when
5272 in 32-bits.
5273
52742008-11-14 Daniel Gutson <dgutson@codesourcery.com>
5275
5276 * Makefile.in (SFILES, clean): Added sparc64 files.
5277 (reg-sparc64.o, reg-sparc64.c): New.
5278 * configure.srv (sparc*-*-linux*): New configuration.
5279 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
5280 syscall arguments for SPARC.
5281 (regsets_store_inferior_registers): Likewise.
5282 * linux-sparc-low.c: New file.
5283
52842008-10-21 Doug Evans <dje@google.com>
5285
5286 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
5287 (READLINE_DIR,READLINE_DEP): Delete.
5288 (INTERNAL_CFLAGS): Update.
5289 (LINTFLAGS): Update.
5290
52912008-10-10 Pedro Alves <pedro@codesourcery.com>
5292
5293 * server.c (handle_v_run): If GDB didn't specify an argv, use the
5294 whole argv from the last run, not just argv[0].
5295
52962008-09-08 Pedro Alves <pedro@codesourcery.com>
5297
5298 * regcache.c (new_register_cache): Return NULL if the register
5299 cache size isn't known yet.
5300 (free_register_cache): Avoid dereferencing a NULL regcache.
5301
53022008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
5303
5304 * configure.srv: Merge MIPS and MIPS64.
5305
53062008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
5307
5308 * Makefile.in (uninstall): Apply $(EXEEXT) too.
5309
53102008-08-18 Luis Machado <luisgpm@br.ibm.com>
5311
5312 * Makefile.in: Add required vsx dependencies.
5313
5314 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
5315 Declare init_registers_powerpc_vsx32l.
5316 Declare init_registers_powerpc_vsx64l.
5317 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
5318 (ppc_arch_setup): Check for VSX in hwcap.
5319 (ppc_fill_vsxregset): New function.
5320 (ppc_store_vsxregset): New function.
5321 Add new VSX entry in regset_info target_regsets.
5322
5323 * configure.srv: Add new VSX dependencies.
5324
53252008-08-12 Pedro Alves <pedro@codesourcery.com>
5326
5327 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
5328 (remote_open): Set or clear transport_is_reliable.
5329 (putpkt_binary): Don't expect acks in noack mode.
5330 (getpkt): Don't send ack/nac in noack mode.
5331 * server.c (handle_general_set): Handle QStartNoAckMode.
5332 (handle_query): If connected by tcp pass QStartNoAckMode+ in
5333 qSupported.
5334 (main): Reset noack_mode on every connection.
5335 * server.h (noack_mode): Declare.
5336
53372008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
5338
5339 * Makefile.in (GDBREPLAY_OBS): New variable.
5340 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
5341
53422008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
5343 Daniel Jacobowitz <dan@codesourcery.com>
5344
5345 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
5346 (usr_store_inferior_registers): Likewise.
5347 (regsets_store_inferior_registers): Likewise.
5348
53492008-07-31 Rolf Jansen <rj@surtec.com>
5350 Pedro Alves <pedro@codesourcery.com>
5351
5352 * configure.ac: Check for memmem declaration.
5353 * server.c [HAVE_MALLOC_H]: Include malloc.h.
5354 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
5355 (disable_packet_qfThreadInfo): Unconditionally compile.
5356 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
5357 * configure, config.in: Regenerate.
5358
53592008-07-28 Doug Kwan <dougkwan@google.com>
5360
5361 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
5362 (linux_write_memory): Remove declaration of errno.
5363
53642008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
5365
5366 * linux-low.c (handle_extended_wait): Do not use "status"
5367 variable uninitialized.
5368
53692008-07-07 Pedro Alves <pedro@codesourcery.com>
5370
5371 * server.c (handle_v_attach): Inhibit reporting dll changes.
5372
53732008-06-27 Pedro Alves <pedro@codesourcery.com>
5374
5375 * remote-utils.c (prepare_resume_reply): If requested, don't
5376 output "thread:TID" in the T stop reply.
5377
5378 * server.c (disable_packet_vCont, disable_packet_Tthread)
5379 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
5380 (handle_query): If requested, disable support for qC, qfThreadInfo
5381 and qsThreadInfo.
5382 (handle_v_requests): If requested, disable support for vCont.
5383 (gdbserver_show_disableable): New.
5384 (main): Handle --disable-packet and --disable-packet=LIST.
5385
5386 * server.h (disable_packet_vCont, disable_packet_Tthread)
5387 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
5388
53892008-06-20 Carlos O'Donell <carlos@codesourcery.com>
5390
5391 * server.c (gdbserver_usage): Mention --version.
5392
53932008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
5394
5395 * Makefile.in (gdbreplay.o): New rule.
5396
53972008-06-06 Joseph Myers <joseph@codesourcery.com>
5398
5399 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
5400 message, not gdbserver.
5401
54022008-06-05 Vladimir Prus <vladimir@codesourcery.com>
5403 Nathan Sidwell <nathan@codesourcery.com>
5404 Joseph Myers <joseph@codesourcery.com>
5405
5406 * acinclude.m4: Include ../../config/acx.m4.
5407 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
5408 * configure, config.in: Regenerate.
5409 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
5410 * server.c (gdbserver_version): Print PKGVERSION.
5411 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
5412 (main): Adjust gdbserver_usage calls.
5413 * gdbreplay.c (version, host_name): Add declarations.
5414 (gdbreplay_version, gdbreplay_usage): New.
5415 (main): Accept --version and --help options.
5416
54172008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
5418
5419 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
5420 (arm_breakpoint_at): Handle Thumb.
5421 (the_low_target): Add comment.
5422
54232008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
5424
5425 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
5426
54272008-05-09 Doug Evans <dje@google.com>
5428
5429 * server.h (decode_search_memory_packet): Declare.
5430 * remote-utils.c (decode_search_memory_packet): New fn.
5431 * server.c (handle_search_memory_1): New fn.
5432 (handle_search_memory): New fn.
5433 (handle_query): Process qSearch:memory packets.
5434
54352008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
5436
5437 * regcache.c (registers_length): Remove.
5438 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
5439 full register packet.
5440 * regcache.h (registers_length): Remove prototype.
5441 * server.h (PBUFSIZ): Define to 16384.
5442
54432008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
5444
5445 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
5446 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
5447 powerpc-64l.o, and powerpc-altivec64l.o.
5448 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
5449 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
5450 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
5451 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
5452 rs6000/power-linux.xml, and rs6000/power64-linux.xml
5453 to srv_xmlfiles.
5454
5455 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
5456 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
5457 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
5458 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
5459 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
5460 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
5461 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
5462 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
5463 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
5464 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
5465 (clean): Update.
5466
5467 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
5468 (init_registers_powerpc_32l): ... this new prototype.
5469 (init_registers_powerpc_32): Remove, replace by ...
5470 (init_registers_powerpc_altivec32l): ... this new prototype.
5471 (init_registers_powerpc_e500): Remove, replace by ...
5472 (init_registers_powerpc_e500l): ... this new prototype.
5473 (init_registers_ppc64): Remove, replace by ...
5474 (init_registers_powerpc_64l): ... this new prototype.
5475 (init_registers_powerpc_64): Remove, replace by ...
5476 (init_registers_powerpc_altivec64l): ... this new prototype.
5477 (ppc_num_regs): Set to 73.
5478 (PT_ORIG_R3, PT_TRAP): Define if necessary.
5479 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
5480 (ppc_cannot_store_register): Handle orig_r3 and trap.
5481 (ppc_arch_setup): Update init_registers_... calls.
5482 (ppc_fill_gregset): Handle orig_r3 and trap.
5483
5484 * inferiors.c (clear_inferiors): Reset current_inferior.
5485
54862008-04-23 Paolo Bonzini <bonzini@gnu.org>
5487
5488 * acinclude.m4: Add override.m4.
5489 * configure: Regenerate.
5490
54912008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
5492
5493 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
5494 initial call to init_register_ppc64.
5495
54962008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
5497
5498 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
5499 single powerpc*-*-linux* case.
5500 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
5501
55022008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
5503
5504 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
5505 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
5506 from reg_xmlfiles.
5507 * linux-ppc-low.c: Include <elf.h>.
5508 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
5509 (ppc_hwcap): New global variable.
5510 (ppc_regmap): Remove __SPE__ #ifdef sections.
5511 (ppc_regmap_e500): New global variable.
5512 (ppc_cannot_store_register): Update __SPE__ special case.
5513 (ppc_get_hwcap): New function.
5514 (ppc_arch_setup): Use it to determine whether inferior supports
5515 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
5516 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
5517 Do not access registers if target does not support AltiVec.
5518 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
5519 Do not access registers if target does not support SPE.
5520 (target_regsets): Unconditionally include AltiVec and SPE regsets.
5521
55222008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
5523
5524 * linux-low.c (disabled_regsets, num_regsets): New.
5525 (use_regsets_p): Delete.
5526 (linux_wait_for_process): Clear disabled_regsets.
5527 (regsets_fetch_inferior_registers): Check and set it.
5528 (regsets_store_inferior_registers): Likewise.
5529 (linux_fetch_registers, linux_store_registers): Do not use
5530 use_regsets_p.
5531 (initialize_low): Allocate disabled_regsets.
5532
55332008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
5534
5535 * Makefile.in (LIBOBJS): New.
5536 (OBS): Use LIBOBJS.
5537 (memmem.o): New rule.
5538 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
5539 * configure: Regenerated.
5540
55412008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
5542
5543 * server.c (handle_query): Never return "unsupported" for
5544 qXfer:features:read queries.
5545
55462008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
5547
5548 * server.c (get_features_xml): Fix inverted condition.
5549 (handle_query): Always support qXfer:feature:read.
5550
55512008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
5552
5553 * server.c (wrapper_argv): New.
5554 (start_inferior): Handle wrapper_argv. If set, expect an extra
5555 trap.
5556 (gdbserver_usage): Document --wrapper.
5557 (main): Parse --wrapper.
5558
55592008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
5560
5561 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
5562 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
5563 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
5564 (ppc_set_pc): Likewise.
5565 (ppc_arch_setup): New function.
5566 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
5567 of collect_register.
5568 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
5569
55702008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
5571
5572 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
5573 instead of linux-ppc64-low.o.
5574 * linux-ppc64-low.c: Remove file.
5575 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
5576 (linux-ppc64-low.o): Remove rule.
5577
5578 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
5579 (init_registers_powerpc_64): Likewise.
5580 (ppc_regmap): Conditionally define depending on __powerpc64__.
5581 (ppc_cannot_store_register): Do not special-case "fpscr" when
5582 compiled on __powerpc64__.
5583 (ppc_collect_ptrace_register): New function.
5584 (ppc_supply_ptrace_register): New function.
5585 (ppc_breakpoint): Change type to "unsigned int".
5586 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
5587 (the_low_target): Conditionally provide initializers for the
5588 arch_setup member depending on __powerpc64__. Install
5589 collect_ptrace_register and supply_ptrace_register members.
5590
55912008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
5592
5593 * regcache.h (gdbserver_xmltarget): Add extern declaration.
5594 * server.c (gdbserver_xmltarget): Define.
5595 (get_features_xml): Use it to replace "target.xml" and arch_string.
5596
5597 * configure.srv: Remove srv_xmltarget. Add XML files that were
5598 mentioned there to srv_xmlfiles instead. Remove conditional tests
5599 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
5600 srv_xmlfiles and srv_regobj to include all possible choices.
5601 * configure.ac (srv_xmltarget): Remove.
5602 (srv_xmlfiles): Do not add "target.xml".
5603 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
5604 checks for supplementary target information.
5605 * configure: Regenerate.
5606 * Makefile.in (XML_TARGET): Remove.
5607 (target.xml): Remove rule.
5608 (clean): Do not clean up target.xml.
5609 (.PRECIOUS): Do not mention target.xml.
5610
5611 * target.h (struct target_ops): Remove arch_string member.
5612 * linux-low.c (linux_arch_string): Remove.
5613 (linux_target_ops): Remove arch_string initializer.
5614 * linux-low.h (struct linux_target_ops): Remove arch_string member.
5615 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
5616 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
5617 * spu-low.c (spu_arch_string): Remove.
5618 (spu_target_ops): Remove arch_string initializer.
5619 * win32-low.c (win32_arch_string): Remove.
5620 (win32_target_ops): Remove arch_string initializer.
5621 * win32-low.h (struct win32_target_ops): Remove arch_string member.
5622 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
5623 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
5624
56252008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
5626
5627 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
5628 by collect_ptrace_register and supply_ptrace_register hooks.
5629 * linux-low.c (fetch_register): Use supply_ptrace_register callback
5630 instead of checking for the_low_target.left_pad_xfer.
5631 (usr_store_inferior_registers): Use collect_ptrace_register callback
5632 instead of checking for the_low_target.left_pad_xfer.
5633
5634 * linux-s390-low.c (s390_collect_ptrace_register): New function.
5635 (s390_supply_ptrace_register): Likewise.
5636 (s390_fill_gregset): Call s390_collect_ptrace_register.
5637 (the_low_target): Update.
5638
5639 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
5640 (ppc_supply_ptrace_register): Likewise.
5641 (the_low_target): Update.
5642
5643 * linux-i386-low.c (the_low_target): Update.
5644 * linux-x86-64-low.c (the_low_target): Update.
5645
56462008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
5647
5648 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
5649 reg-s390.o and reg-s390x.o.
5650
5651 * linux-low.c (new_inferior): New global variable.
5652 (linux_create_inferior, linux_attach): Set it.
5653 (linux_wait_for_process): Call the_low_target.arch_setup after the
5654 target has stopped for the first time.
5655 (initialize_low): Do not call the_low_target.arch_setup.
5656
5657 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
5658 (s390_set_pc): Likewise.
5659 (s390_arch_setup): New function.
5660 (the_low_target): Use s390_arch_setup as arch_setup routine.
5661
5662 * regcache.c (realloc_register_cache): New function.
5663 (set_register_cache): Call it for each existing regcache.
5664
56652008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
5666
5667 * server.h (init_registers): Remove prototype.
5668
5669 * linux-low.h (struct linux_target_ops): Add arch_setup field.
5670 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
5671 instead of init_registers ().
5672 * linux-arm-low.c (init_registers_arm): Add prototype.
5673 (init_registers_arm_with_iwmmxt): Likewise.
5674 (the_low_target): Add initializer for arch_setup field.
5675 * linux-cris-low.c (init_registers_cris): Add prototype.
5676 (the_low_target): Add initializer for arch_setup field.
5677 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
5678 (the_low_target): Add initializer for arch_setup field.
5679 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
5680 (the_low_target): Add initializer for arch_setup field.
5681 * linux-ia64-low.c (init_registers_ia64): Add prototype.
5682 (the_low_target): Add initializer for arch_setup field.
5683 * linux-m32r-low.c (init_registers_m32r): Add prototype.
5684 (the_low_target): Add initializer for arch_setup field.
5685 * linux-m68k-low.c (init_registers_m68k): Add prototype.
5686 (the_low_target): Add initializer for arch_setup field.
5687 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
5688 (init_registers_mips64_linux): Likewise.
5689 (the_low_target): Add initializer for arch_setup field.
5690 * linux-ppc-low.c (init_registers_ppc): Add prototype.
5691 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
5692 (the_low_target): Add initializer for arch_setup field.
5693 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
5694 (init_registers_powerpc_64): Likewise.
5695 (the_low_target): Add initializer for arch_setup field.
5696 * linux-s390-low.c (init_registers_s390): Add prototype.
5697 (init_registers_s390x): Likewise.
5698 (the_low_target): Add initializer for arch_setup field.
5699 * linux-sh-low.c (init_registers_sh): Add prototype.
5700 (the_low_target): Add initializer for arch_setup field.
5701 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
5702 (the_low_target): Add initializer for arch_setup field.
5703 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
5704 (the_low_target): Add initializer for arch_setup field.
5705
5706 * win32-low.h (struct win32_target_ops): Add arch_setup field.
5707 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
5708 instead of init_registers ().
5709 * win32-arm-low.c (init_registers_arm): Add prototype.
5710 (the_low_target): Add initializer for arch_setup field.
5711 * win32-i386-low.c (init_registers_i386): Add prototype.
5712 (the_low_target): Add initializer for arch_setup field.
5713
5714 * spu-low.c (init_registers_spu): Add prototype.
5715 (initialize_low): Call initialie_registers_spu () instead of
5716 initialize_registers ().
5717
57182008-02-19 Pedro Alves <pedro@codesourcery.com>
5719
5720 * server.c (handle_v_requests): When handling the vRun and vAttach
5721 packets, if already debugging a process, don't kill it. Return an
5722 error instead.
5723
57242008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
5725
5726 * server.c (handle_query): Correct length check.
5727
57282008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
5729
5730 * win32-low.c (do_initial_child_stuff): Add process handle
5731 parameter. Set current_process_handle and current_process_id from the
5732 parameters. Clear globals.
5733 (win32_create_inferior): Don't set current_process_handle and
5734 current_process_id here. Instead pass them on the call to
5735 do_initial_child_stuff.
5736 (win32_attach): Likewise.
5737 (win32_clear_inferiors): New.
5738 (win32_kill): Don't close the current process handle or the
5739 current thread handle here. Instead call win32_clear_inferiors.
5740 (win32_detach): Don't open a new handle to the process. Call
5741 win32_clear_inferiors.
5742 (win32_join): Don't rely on current_process_handle; open a new
5743 handle using the process id.
5744 (win32_wait): Call win32_clear_inferiors when the inferior process
5745 has exited.
5746
57472008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
5748
5749 * server.c (monitor_show_help): Add "exit".
5750
57512008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
5752
5753 * Makefile.in (SFILES): Add linux-xtensa-low.c.
5754 (clean): Add reg-xtensa.c.
5755 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
5756 * configure.srv (xtensa*-*-linux*) New target.
5757 * linux-xtensa-low.c: New.
5758 * xtensa-xtregs.c: New.
5759
57602008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
5761
5762 * hostio.c: Don't include errno.h.
5763 (errno_to_fileio_errno): Move to hostio-errno.
5764 * hostio.c: (hostio_error): Remove the error parameter. Defer the
5765 error number outputting to the target->hostio_last_error callback.
5766 (hostio_packet_error): Use FILEIO_EINVAL directly.
5767 (handle_open, handle_pread, hostio_error, handle_unlink): Update
5768 calls to hostio_error.
5769 * hostio-errno.c: New.
5770 * server.h (hostio_last_error_from_errno): Declare.
5771 * target.h (target_ops): Add hostio_last_error member.
5772 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
5773 as hostio_last_error handler.
5774 * spu-low.c (spu_target_ops): Likewise.
5775 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
5776 (wince_hostio_last_error): New functions.
5777 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
5778 as hostio_last_error handler.
5779 (win32_target_ops) [!_WIN32_WCE]: Register
5780 hostio_last_error_from_errno as hostio_last_error handler.
5781 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
5782 (hostio-errno.o): New rule.
5783 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
5784 * configure.srv (srv_hostio_err_objs): New variable. Default to
5785 hostio-errno.o.
5786 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
5787 * configure: Regenerate.
5788
57892008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
5790
5791 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
5792 (linux_kill, linux_detach): Clean up the process list.
5793 * remote-utils.c (remote_open): Improve port number parsing.
5794 (putpkt_binary, input_interrupt): Only send interrupts if the target
5795 is running.
5796 * server.c (extended_protocol): Make static.
5797 (attached): Define earlier.
5798 (exit_requested, response_needed, program_argv): New variables.
5799 (target_running): New.
5800 (start_inferior): Clear attached here.
5801 (attach_inferior): Set attached here.
5802 (require_running): Define.
5803 (handle_query): Use require_running and target_running. Implement
5804 "monitor exit".
5805 (handle_v_attach, handle_v_run): New.
5806 (handle_v_requests): Use require_running. Handle vAttach and vRun.
5807 (gdbserver_usage): Update.
5808 (main): Redo argument parsing. Handle --debug and --multi. Handle
5809 --attach along with other options or after the port. Save
5810 program_argv. Support no initial program. Resynchronize
5811 communication with GDB after an error. Handle "monitor exit".
5812 Use require_running and target_running. Always allow the extended
5813 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
5814 restart in extended mode.
5815 * README: Refer to the GDB manual. Update --attach usage.
5816
58172007-12-20 Andreas Schwab <schwab@suse.de>
5818
5819 * linux-low.c (STACK_SIZE): Define.
5820 (linux_tracefork_child): Use it. Use __clone2 on ia64.
5821 (linux_test_for_tracefork): Likewise.
5822
58232007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
5824
5825 * linux-low.c (linux_wait_for_event): Update messages. Do not
5826 reinsert auto-delete breakpoints.
5827 * mem-break.c (struct breakpoint): Change return type of handler to
5828 int.
5829 (set_breakpoint_at): Update handler type.
5830 (reinsert_breakpoint_handler): Return 1 instead of calling
5831 delete_breakpoint.
5832 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
5833 setting a new one.
5834 (check_breakpoints): Delete auto-delete breakpoints and return 2.
5835 * mem-break.h (set_breakpoint_at): Update handler type.
5836 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
5837 * win32-low.c (auto_delete_breakpoint): New.
5838 (get_child_debug_event): Use it.
5839
58402007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
5841
5842 * configure.ac: Check for pread and pwrite.
5843 * hostio.c (handle_pread): Fall back to lseek and read.
5844 (handle_pwrite): Fall back to lseek and write.
5845 * config.in, configure: Regenerated.
5846
58472007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
5848
5849 * server.c (myresume): Add own_buf argument.
5850 (main): Update calls.
5851
58522007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
5853
5854 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
5855 * remote-utils.c (remote_open): Do not call disable_async_io.
5856 (block_async_io): Delete.
5857 (unblock_async_io): Make static.
5858 (initialize_async_io): New.
5859 * server.c (handle_v_cont): Handle async I/O here.
5860 (myresume): Likewise. Move other common resume tasks here...
5861 (main): ... from here. Call initialize_async_io. Disable async
5862 I/O before the main loop.
5863 * server.h (initialize_async_io): Declare.
5864 (block_async_io, unblock_async_io): Delete prototypes.
5865 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
5866
58672007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
5868
5869 * remote-utils.c (readchar): Allow binary data in received messages.
5870
58712007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
5872
5873 * win32-low.c (attaching): New global.
5874 (win32_create_inferior): Clear the `attaching' global.
5875 (win32_attach): Set the `attaching' global.
5876 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
5877 attaching. Only set a breakpoint at the entry point if not
5878 attaching.
5879
58802007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
5881
5882 * server.c (main): Don't report dll events on the initial
5883 connection on attaches.
5884
58852007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
5886
5887 * server.c (main): Relax numerical bases supported for the pid of
5888 the --attach command line argument.
5889
58902007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
5891
5892 * win32-low.c (win32_attach): Call OpenProcess before
5893 DebugActiveProcess, not after. Add last error output to error
5894 call.
5895
58962007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
5897
5898 * win32-low.c (win32_get_thread_context)
5899 (win32_set_thread_context): New functions.
5900 (thread_rec): Use win32_get_thread_context.
5901 (continue_one_thread, win32_resume): Use win32_set_thread_context.
5902 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
5903 field.
5904
59052007-12-03 Leo Zayas
5906 Pedro Alves <pedro_alves@portugalmail.pt>
5907
5908 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
5909 global variables.
5910 (child_add_thread): Minor cleanup.
5911 (child_continue): Resume artificially suspended threads before
5912 calling ContinueDebugEvent.
5913 (suspend_one_thread): New.
5914 (fake_breakpoint_event): New.
5915 (get_child_debug_event): Change return type to int. Check here if
5916 gdb sent an interrupt request. If a soft interrupt was requested,
5917 fake a breakpoint event. Return 0 if there is no event to handle,
5918 and 1 otherwise.
5919 (win32_wait): Don't check here if gdb sent an interrupt request.
5920 Ensure there is a valid event to handle.
5921 (win32_request_interrupt): Add soft interruption method as last
5922 resort.
5923
59242007-12-03 Leo Zayas
5925 Pedro Alves <pedro_alves@portugalmail.pt>
5926
5927 * win32-low.h (win32_thread_info): Add descriptions to the
5928 structure members. Replace `suspend_count' counter by a
5929 `suspended' flag.
5930 * win32-low.c (thread_rec): Update condition of when to get the
5931 context from the inferior. Rely on ContextFlags being set if it
5932 has already been retrieved. Only suspend the inferior thread if
5933 we haven't already. Warn if that fails.
5934 (continue_one_thread): s/suspend_count/suspended/. Only call
5935 ResumeThread once. Warn if that fails.
5936
59372007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
5938
5939 * win32-low.c (win32_wait): Don't read from the inferior when it
5940 has already exited.
5941
59422007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
5943
5944 * Makefile.in (win32_low_h): New variable.
5945 (win32-low.o): Add dependency on $(win32_low_h).
5946 (win32-arm-low.o, win32-i386-low.o): New rules.
5947
59482007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
5949
5950 * hostio.c: Correct copyright year.
5951
59522007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
5953
5954 * Makefile.in (OBS): Add hostio.o.
5955 (hostio.o): New rule.
5956 * server.h (handle_vFile): Declare.
5957 * hostio.c: New file.
5958 * server.c (handle_v_requests): Take packet_len and new_packet_len
5959 for binary packets. Call handle_vFile.
5960 (main): Update call to handle_v_requests.
5961
59622007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
5963
5964 * linux-low.c: Include <sched.h>.
5965
59662007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
5967
5968 * linux-low.c (linux_tracefork_grandchild): New.
5969 (linux_tracefork_child): Use clone.
5970 (linux_test_for_tracefork): Use clone; allocate and free a stack.
5971
59722007-10-31 Joel Brobecker <brobecker@adacore.com>
5973
5974 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
5975
59762007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
5977
5978 * linux-low.c (handle_extended_wait): Handle unexpected signals.
5979
59802007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
5981
5982 * inferiors.c (change_inferior_id): Delete.
5983 (add_pid_to_list, pull_pid_from_list): New.
5984 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
5985 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
5986 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
5987 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
5988 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
5989 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
5990 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
5991 (using_threads): Always set to 1.
5992 (handle_extended_wait): New.
5993 (add_process): Do not set TID.
5994 (linux_create_inferior): Set must_set_ptrace_flags.
5995 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
5996 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
5997 (linux_thread_alive): Rename TID argument to LWPID.
5998 (linux_wait_for_process): Handle unknown processes. Do not use TID.
5999 (linux_wait_for_event): Do not use TID or check using_threads. Update
6000 call to dead_thread_notify. Call handle_extended_wait.
6001 (linux_create_inferior): Use PTRACE_SETOPTIONS.
6002 (send_sigstop): Delete sigstop_sent.
6003 (wait_for_sigstop): Avoid TID.
6004 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
6005 (linux_test_for_tracefork): New.
6006 (linux_lookup_signals): Use thread_db_active and
6007 linux_supports_tracefork_flag.
6008 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
6009 * linux-low.h (get_process_thread): Avoid TID.
6010 (struct process_ifo): Move thread_known and tid to the end. Remove
6011 sigstop_sent.
6012 (linux_attach_lwp, thread_db_init): Update prototypes.
6013 * server.h (change_inferior_id): Delete prototype.
6014 (add_pid_to_list, pull_pid_from_list): New prototypes.
6015 * thread-db.c (thread_db_use_events): New.
6016 (find_first_thread): Rename to...
6017 (find_one_thread): ...this. Update callers and messages. Do not
6018 call fatal. Check thread_db_use_events. Do not call
6019 change_inferior_id or new_thread_notify.
6020 (maybe_attach_thread): Update. Do not call new_thread_notify.
6021 (thread_db_init): Set thread_db_use_events. Check use_events.
6022 * utils.c (fatal, warning): Correct message prefix.
6023
60242007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
6025
6026 * Makefile.in (clean): Remove new files.
6027 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
6028 (powerpc-64.o, powerpc-64.c): New rules.
6029 * configure.srv: Use alternate register sets for powerpc64-*-linux*
6030 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
6031 with SPE.
6032 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
6033 SPE targets.
6034 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
6035 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
6036 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
6037 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
6038 (target_regsets): Add AltiVec and SPE register sets.
6039 * configure.ac: Check for AltiVec and SPE.
6040 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
6041 (ppc_fill_vrregset, ppc_store_vrregset): New.
6042 (target_regsets): Add AltiVec register set.
6043 * configure: Regenerated.
6044
60452007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
6046
6047 * linux-low.c (O_LARGEFILE): Define.
6048 (linux_read_memory): Use /proc/PID/mem.
6049 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
6050 * configure, config.in: Regenerated.
6051
60522007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
6053
6054 * linux-low.c (linux_wait_for_event): Do not pass signals while
6055 single-stepping.
6056
60572007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
6058
6059 * win32-low.c (create_process): New.
6060 (win32_create_inferior): Use create_process instead of
6061 CreateProcess. If create_process failed retry appending an ".exe"
6062 suffix. Store the GetLastError result immediatelly after
6063 create_process calls and use it on the call to error.
6064
60652007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
6066
6067 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
6068
60692007-08-23 Joel Brobecker <brobecker@adacore.com>
6070
6071 * configure.ac: Switch license to GPLv3.
6072
60732007-08-01 Michael Snyder <msnyder@access-company.com>
6074
6075 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
6076
60772007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
6078
6079 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
6080 typedef.
6081 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
6082 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
6083 CloseToolhelp32Snapshot.
6084 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
6085 CloseToolhelp32Snapshot.
6086
60872007-07-27 Michael Snyder <michael.snyder@access-company.com>
6088
6089 * server.c (main): Check for inferior exit before main loop.
6090
60912007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
6092
6093 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
6094 instead of on tmp_desc.
6095
60962007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
6097 Daniel Jacobowitz <dan@codesourcery.com>
6098
6099 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
6100 (add_thread): Minor cleanups.
6101 (clear_inferiors): Move lower in the file. Clear the DLL
6102 list.
6103 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
6104 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
6105 (xml_escape_text): New.
6106 * server.c (handle_query): Handle qXfer:libraries:read. Report it
6107 for qSupported.
6108 (handle_v_cont): Report errors.
6109 (gdbserver_version): Update.
6110 (main): Correct size of own_buf. Do not report initial DLL events.
6111 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
6112 (unloaded_dll, xml_escape_text): New.
6113 * win32-low.c (enum target_waitkind): Update comments.
6114 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
6115 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
6116 (win32_EnumProcessModules, win32_GetModuleInformation)
6117 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
6118 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
6119 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
6120 (win32_Module32First, win32_Module32Next, load_toolhelp)
6121 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
6122 (get_child_debug_event): Handle DLL events.
6123 (win32_wait): Likewise.
6124
61252007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
6126
6127 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
6128 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
6129
61302007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
6131
6132 * win32-low.c (handle_output_debug_string): Ignore event if not
6133 waiting.
6134
61352007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
6136
6137 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
6138
61392007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
6140
6141 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
6142
61432007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
6144
6145 * inferiors.c (change_inferior_id): Add comment.
6146 * linux-low.c (check_removed_breakpoint): Add an early
6147 prototype. Improve debug output.
6148 (linux_attach): Doc update.
6149 (linux_detach_one_process, linux_detach): Clean up before releasing
6150 each process.
6151 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
6152 * linux-low.h (struct process_info): Doc improvement.
6153 * mem-break.c (delete_all_breakpoints): New.
6154 * mem-break.h (delete_all_breakpoints): New prototype.
6155 * thread-db.c (find_first_thread): New.
6156 (thread_db_create_event): Call it instead of
6157 thread_db_find_new_threads. Clean up unused variables.
6158 (maybe_attach_thread): Remove first thread handling.
6159 (thread_db_find_new_threads): Use find_first_thread.
6160 (thread_db_get_tls_address): Likewise.
6161
61622007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
6163
6164 * thread-db.c (thread_db_find_new_threads): Add prototype.
6165 (thread_db_create_event): Check for the main thread before adding
6166 a new thread.
6167 (maybe_attach_thread): Only enable event reporting if TID == 0.
6168 (thread_db_get_tls_address): Check for new threads.
6169
61702007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
6171
6172 * linux-low.c (linux_create_inferior): Try execv before execvp.
6173 * spu-low.c (spu_create_inferior): Likewise.
6174
61752007-06-13 Mike Frysinger <vapier@gentoo.org>
6176
6177 * linux-low.c (linux_create_inferior): Change execv to execvp.
6178 * spu-low.c (spu_create_inferior): Likewies.
6179
61802007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
6181
6182 * Makefile.in (clean): Clean new files instead of deleted ones.
6183 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
6184 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
6185 rules.
6186 * configure.srv: Specify XML files and new regformats for MIPS and
6187 MIPS64 GNU/Linux.
6188 * linux-mips-low.c (mips_num_regs): Set to only used registers.
6189 (mips_regmap): Do not fetch $0. Remove unused registers. Add
6190 an entry for the restart register.
6191 (mips_cannot_fetch_register, mips_cannot_store_register)
6192 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
6193 register names to match the XML descriptions.
6194 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
6195 restart register instead of $0.
6196
61972007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
6198 Markus Deuling <deuling@de.ibm.com>
6199
6200 * remote-utils.c (decode_xfer_write): New function.
6201 * server.h (decode_xfer_write): Add prototype.
6202 * server.c (handle_query): Add PACKET_LEN argument. Support
6203 qXfer:spu:read and qXfer:spu:write packets.
6204 (main): Pass packet_len to handle_query.
6205 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
6206 * target.h (target_ops): Add qxfer_spu.
6207
62082007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
6209
6210 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
6211 accessing non-seekable spufs files.
6212
62132007-05-16 Markus Deuling <deuling@de.ibm.com>
6214
6215 * server.c (handle_query): Add reply for qC packet.
6216
62172007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
6218 Leo Zayas <lerele@champenstudios@com>
6219
6220 * server.h (check_remote_input_interrupt_request): New function.
6221 * remote_utils.c (INVALID_DESCRIPTOR): New define.
6222 (remote_desc): Initialize with INVALID_DESCRIPTOR.
6223 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
6224 (check_remote_input_interrupt_request): New function.
6225 * server.h (check_remote_input_interrupt_request): Declare.
6226 * win32-low.c (winapi_DebugBreakProcess,
6227 winapi_GenerateConsoleCtrlEvent): New typedefs.
6228 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
6229 to 250 ms.
6230 (win32_wait): Check for remote interrupt request
6231 with check_remote_input_interrupt_request.
6232 (win32_request_interrupt): New function.
6233 (win32_target_op): Set request_interrupt to win32_request_interrupt.
6234
62352007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
6236
6237 * win32-low.c (debug_registers_changed,
6238 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
6239 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
6240 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
6241 (thread_rec): Get context using the low target.
6242 (child_add_thread): Call thread_added on the low target,
6243 which does the same thing.
6244 (regptr): Delete.
6245 (do_initial_child_stuff): Remove debug registers references.
6246 Set context using the low target. Resume threads after
6247 setting the contexts.
6248 (child_continue): Remove dead variable. Remove debug
6249 registers references.
6250 (child_fetch_inferior_registers): Go through the low target.
6251 (do_child_store_inferior_registers): Remove.
6252 (child_store_inferior_registers): Go through the low target.
6253 (win32_resume): Remove debug registers references.
6254 Set context using the low target.
6255 (handle_exception): Change return type to void. Don't record
6256 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
6257 first chance exception.
6258 (get_child_debug_event): Change return type to void. Remove
6259 goto loop. Always return after waiting for debug event.
6260 (win32_wait): Convert to switch statement. Handle spurious
6261 events.
6262
6263 * win32-i386-low.c (debug_registers_changed,
6264 debug_registers_used): New.
6265 (initial_stuff): Rename to ...
6266 (i386_initial_stuff): ... this. Clear debug registers
6267 state variables.
6268 (store_debug_registers): Delete.
6269 (i386_get_thread_context): New.
6270 (load_debug_registers): Delete.
6271 (i386_set_thread_context): New.
6272 (i386_thread_added): New.
6273 (single_step): Rename to ...
6274 (i386_single_step): ... this.
6275 (do_fetch_inferior_registers): Rename to ...
6276 (i386_fetch_inferior_register): ... this.
6277 (i386_store_inferior_register): New.
6278 (the_low_target): Adapt to new interface.
6279
6280 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
6281 (arm_get_thread_context): New.
6282 (arm_set_thread_context): New.
6283 (regptr): New.
6284 (do_fetch_inferior_registers): Rename to ...
6285 (arm_fetch_inferior_register): ... this.
6286 (arm_store_inferior_register): New.
6287 (arm_wince_breakpoint): Reimplement as unsigned long.
6288 (arm_wince_breakpoint_len): Define.
6289 (the_low_target): Adapt to new interface.
6290
6291 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
6292 load_debug_registers. Add get_thread_context, set_thread_context,
6293 thread_added and store_inferior_register. Rename
6294 fetch_inferior_registers to fetch_inferior_register.
6295 (regptr): Remove declaration.
6296
62972007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
6298
6299 * linux-low.c (linux_detach): Change return type to int. Return 0.
6300 * spu-low.c (spu_detach): Likewise.
6301
63022007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
6303
6304 * target.h (target_ops): Change return type of detach to int.
6305 Add join.
6306 (join_inferior): New.
6307 * server.c (main): Don't skip detach support on mingw32.
6308 If the inferior doesn't support detaching return error.
6309 Call join_inferior instead of using waitpid.
6310 * linux-low.c (linux_join): New.
6311 (linux_target_op): Add linux_join.
6312 * spu-low.c (spu_join): New.
6313 (spu_target_ops): Add spu_join.
6314 * win32-low.c (win32_detach): Adapt to new interface.
6315 Reopen current_process_handle before detaching. Issue a child
6316 resume before detaching.
6317 (win32_join): New.
6318 (win32_target_op): Add win32_join.
6319
63202007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
6321
6322 * win32-low.c (win32-attach): Fix return value.
6323 * target.h (target_ops): Describe ATTACH return values.
6324
63252007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
6326
6327 * win32-low.c (GETPROCADDRESS): Define.
6328 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
6329 (winapi_DebugSetProcessKillOnExit): Likewise.
6330 (win32_create_inferior): Force usage of ansi CreateProcessA.
6331 (win32_attach): Use GETPROCADDRESS.
6332 (win32_detach): Likewise.
6333
63342007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
6335
6336 * win32-low.c (win32_wait): Don't use WSTOPSIG.
6337
63382007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
6339
6340 * win32-low.c: Commit leftover changes from 2007-03-29.
6341
63422007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
6343
6344 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
6345 fields short instead of int. Add explicit padding.
6346 (i387_cache_to_fsave): Remove unnecessary casts.
6347 (i387_fsave_to_cache): Doc fix.
6348 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
6349
63502007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
6351
6352 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
6353 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
6354
63552007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
6356
6357 * configure.srv (arm*-*-mingw32ce*): Move near the other
6358 arm targets.
6359
63602007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
6361
6362 * configure.ac: Add errno checking.
6363 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
6364 sys/file.h and malloc.h.
6365 (AC_CHECK_DECLS): Add perror.
6366 (srv_mingwce): Handle.
6367 * configure.srv (i[34567]86-*-cygwin*): Add
6368 win32-i386-low.o to srv_tgtobj.
6369 (i[34567]86-*-mingw*): Likewise.
6370 (arm*-*-mingw32ce*): Add case.
6371 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
6372 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
6373 [__MINGW32CE__] (strerror): New function.
6374 [__MINGW32CE__] (errno): Define to GetLastError.
6375 [__MINGW32CE__] (COUNTOF): New macro.
6376 (remote_open): Remove extra close call.
6377 * mem-break.c (delete_breakpoint_at): New function.
6378 * mem-break.h (delete_breakpoint_at): Declare.
6379 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
6380 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
6381 [USE_WIN32API] (read, write): Add char* casts.
6382 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
6383 * server.h: Include wincecompat.h on Windows CE.
6384 [HAVE_ERRNO_H]: Check.
6385 (perror): Declare if not declared.
6386 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
6387 (perror_with_name): Remove errno declaration.
6388 * wincecompat.h: New.
6389 * wincecompat.c: New.
6390 * win32-low.h: New.
6391 * win32-arm-low.c: New.
6392 * win32-i386-low.c: New.
6393 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
6394 (OUTMSG2): Make it safe.
6395 (_T): New macro.
6396 (COUNTOF): New macro.
6397 (NUM_REGS): Get it from the low target.
6398 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
6399 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
6400 (thread_rec): Let low target handle debug registers.
6401 (child_add_thread): Likewise.
6402 (child_init_thread_list): Likewise.
6403 (continue_one_thread): Likewise.
6404 (regptr): New.
6405 (do_child_fetch_inferior_registers): Move to ...
6406 * win32-i386-low.c: ... here, and rename to ...
6407 (do_fetch_inferior_registers): ... this.
6408 * win32-low.c (child_fetch_inferior_registers):
6409 Go through the low target.
6410 (do_child_store_inferior_registers): Use regptr.
6411 (strwinerror): New function.
6412 (win32_create_inferior): Handle Windows CE.
6413 Use strwinerror instead of strerror on Windows error
6414 codes. Add program to the error output.
6415 Don't close the main thread handle on Windows CE.
6416 (win32_attach): Use coredll.dll on Windows CE.
6417 (win32_kill): Close current process and current
6418 thread handles.
6419 (win32_detach): Use coredll.dll on Windows CE.
6420 (win32_resume): Let low target handle debug registers, and
6421 step request.
6422 (handle_exception): Add/Remove initial breakpoint. Avoid
6423 non-existant WSTOPSIG on Windows CE.
6424 (win32_read_inferior_memory): Cast to remove warning.
6425 (win32_arch_string): Go through the low target.
6426 (initialize_low): Call set_breakpoint_data with the low
6427 target's breakpoint.
6428 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
6429 FOP_REGNUM, mappings): Move to ...
6430 * win32-i386-low.c: ... here.
6431 * win32-low.c (win32_thread_info): Move to ...
6432 * win32-low.h: ... here.
6433 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
6434 win32-arm-low.c and wincecompat.c.
6435 (all:): Add $EXEEXT.
6436 (install-only:): Likewise.
6437 (gdbserver:): Likewise.
6438 (gdbreplay:): Likewise.
6439 * config.in: Regenerate.
6440 * configure: Regenerate.
6441
64422007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
6443
6444 * win32-low.c: Rename typedef thread_info to
6445 win32_thread_info throughout.
6446
64472007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
6448
6449 * win32-i386-low.c: Rename to ...
6450 * win32-low.c: ... this.
6451 * configure.srv: Replace win32-i386-low.o with win32-low.o.
6452 * Makefile.in: Likewise.
6453
64542007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
6455
6456 * remote-utils.c (monitor_output): Constify msg parameter.
6457 * server.h (monitor_output): Likewise.
6458 * win32-i386-low.c (handle_output_debug_string): New.
6459 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
6460 handle_output_debug_string.
6461 (get_child_debug_event): Likewise.
6462
64632007-03-27 Mat Hostetter <mat@lcs.mit.edu>
6464
6465 * server.c (main): Correct strtoul check.
6466
64672007-03-27 Jon Ringle <jon@ringle.org>
6468
6469 * linux-low.c: Check __ARCH_HAS_MMU__ also.
6470
64712007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
6472
6473 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
6474
64752007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
6476
6477 * terminal.h: Check HAVE_SGTTY_H.
6478
64792007-02-27 Mat Hostetter <mat@lcs.mit.edu>
6480
6481 * remote-utils.c (remote_open): Print out the assigned port number.
6482
64832007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
6484
6485 * remote-utils.c (monitor_output): New function.
6486 * server.c (debug_threads): Define here.
6487 (monitor_show_help): New function.
6488 (handle_query): Handle qRcmd.
6489 (main): Do not handle 'd' packet.
6490 * server.h (debug_threads, remote_debug, monitor_output): Declare.
6491 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
6492 of debug_threads.
6493
64942007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
6495
6496 * Makefile.in (EXEEXT): New.
6497 (clean): Use $(EXEEXT).
6498
64992007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
6500
6501 * target.h (target_ops): Rename send_signal to request_interrupt,
6502 and remove enum target_signal parameter.
6503 * linux-low.c (linux_request_interrupt): Rename from
6504 linux_send_signal, and always send SIGINT.
6505 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
6506 and always send SIGINT.
6507 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
6508 of send_signal.
6509 (input_interrupt): Likewise.
6510
65112007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
6512
6513 * server.c (get_features_xml): Check if target implemented
6514 arch_string.
6515 * win32-i386-low.c (win32_arch_string): New.
6516 (win32_target_ops): Add win32_arch_string as arch_string member.
6517
65182007-02-22 Markus Deuling <deuling@de.ibm.com>
6519
6520 * spu-low.c (spu_arch_string): New.
6521 (spu_target_ops): Add spu_arch_string.
6522
65232007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
6524
6525 * remote-utils.c: Remove HAVE_TERMINAL_H check.
6526 * configure.ac: Do not check for terminal.h.
6527 * configure, config.in: Regenerated.
6528
65292007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
6530
6531 * Makefile.in (OBS): Add $(XML_BUILTIN).
6532 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
6533 (clean): Update.
6534 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
6535 (arm-with-iwmmxt.c): New.
6536 * config.in, configure: Regenerate.
6537 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
6538 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
6539 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
6540 (arm*-*-linux*): Add iWMMXt and regset support.
6541 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
6542 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
6543 (arm_store_wmmxregset, target_regsets): New.
6544 * server.c (get_features_xml): Take annex argument. Check builtin
6545 XML documents.
6546 (handle_query): Handle multiple annexes.
6547
65482007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
6549
6550 * remote-utils.c [USE_WIN32API] (read, write): Define.
6551 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
6552 write.
6553
65542007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
6555
6556 * linux-i386-low.c (the_low_target): Set arch_string.
6557 * linux-x86-64-low.c (the_low_target): Likewise.
6558 * linux-low.c (linux_arch_string): New.
6559 (linux_target_ops): Add it.
6560 * linux-low.h (struct linux_target_ops): Add arch_string.
6561 * server.c (write_qxfer_response): Use const void * for DATA.
6562 (get_features_xml): New.
6563 (handle_query): Handle qXfer:features:read. Report it for qSupported.
6564 * target.h (struct target_ops): Add arch_string method.
6565
65662007-01-03 Denis Pilat <denis.pilat@st.com>
6567 Daniel Jacobowitz <dan@codesourcery.com>
6568
6569 * linux-low.c (linux_kill): Handle being called with no threads.
6570 * win32-i386-low.c (win32_kill): Likewise.
6571 (get_child_debug_event): Clear current_process_handle.
6572
65732006-12-30 Denis PILAT <denis.pilat@st.com>
6574 Daniel Jacobowitz <dan@codesourcery.com>
6575
6576 * remote-utils.c (remote_open): Check the type of specified
6577 serial port devices before opening them.
6578 * server.c (main): Kill the inferior if an error occurs during
6579 the first remote_open.
6580
65812006-12-05 Markus Deuling <deuling@de.ibm.com>
6582
6583 * README: Update supported targets.
6584
65852006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
6586
6587 * Makefile.in (clean): Remove reg-mips64.c.
6588 (reg-mips64.c, reg-mips64.o): New rules.
6589 * configure.srv: Handle mips64. Include regset support for mips.
6590 * linux-mips-low.c (union mips_register): New.
6591 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
6592 (mips_breakpoint, mips_breakpoint_at): Use int.
6593 (mips_collect_register, mips_supply_register)
6594 (mips_collect_register_32bit, mips_supply_register_32bit)
6595 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
6596 (mips_store_fpregset, target_regsets): New.
6597 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
6598
65992006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
6600
6601 * configure.srv: Add target "spu*-*-*".
6602 * Makefile.in (clean): Remove reg-spu.c.
6603 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
6604 * spu-low.c: New file.
6605
66062006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
6607
6608 * configure.ac: Correct td_thr_tls_get_addr test.
6609 * configure: Regenerated.
6610
66112006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
6612
6613 * linux-low.c (linux_wait_for_event): Reformat. Use the
6614 pass_signals array.
6615 * remote-utils.c (decode_address_to_semicolon): New.
6616 * server.c (pass_signals, handle_general_set): New.
6617 (handle_query): Mention QPassSignals for qSupported.
6618 (main): Call handle_general_set.
6619 * server.h (pass_signals, decode_address_to_semicolon): New.
6620
66212006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
6622
6623 * server.c (handle_query): Correct error handling for read_auxv.
6624
66252005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
6626
6627 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
6628 and srv_linux_thread_db to yes.
6629 * linux-s390-low.c (s390_fill_gregset): New function.
6630 (target_regsets): Define data structure.
6631
66322006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
6633
6634 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
6635 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
6636 * config.in, configure: Regenerated.
6637 * inferiors.c (gdb_id_to_thread): New function.
6638 (gdb_id_to_thread_id): Use it.
6639 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
6640 * linux-low.h (struct process_info): Add th member.
6641 (thread_db_get_tls_address): New prototype.
6642 * remote-utils.c (decode_address): Make non-static.
6643 * server.c (handle_query): Handle qGetTLSAddr.
6644 * server.h (gdb_id_to_thread, decode_address): New prototypes.
6645 * target.h (struct target_ops): Add get_tls_address.
6646 * thread-db.c (maybe_attach_thread): Save the thread handle.
6647 (thread_db_get_tls_address): New.
6648
66492006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
6650
6651 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
6652 (linux_resume_one_process): Take a siginfo_t *. Update all
6653 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
6654 (struct pending_signals): Add a siginfo_t.
6655 (linux_wait_for_process): Always set last_status.
6656 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
6657 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
6658 * linux-low.h (struct process_info): Add last_status.
6659
66602006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
6661
6662 * remote-utils.c (try_rle): New function.
6663 (putpkt_binary): Use it.
6664
66652006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
6666
6667 * Makefile.in (clean): Clean reg-x86-64-linux.c.
6668 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
6669 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
6670 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
6671 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
6672 point registers.
6673
66742006-08-08 Richard Sandiford <richard@codesourcery.com>
6675
6676 * server.c (terminal_fd): New variable.
6677 (old_foreground_pgrp): Likewise.
6678 (restore_old_foreground_pgrp): New function.
6679 (start_inferior): Record the terminal file descriptor in terminal_fd
6680 and its original foreground group in old_foreground_pgrp. Register
6681 restore_old_foreground_pgrp with atexit().
6682
66832006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
6684
6685 * server.c (handle_query): Correct qPart to qXfer.
6686
66872006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
6688
6689 * configure.ac: Check for more headers which are missing on
6690 Windows. Automatically supply -lwsock32 and USE_WIN32API.
6691 * configure.srv: Add Cygwin and mingw32.
6692 * remote-utils.c: Don't include headers unconditionally which
6693 are missing on mingw32. Include <winsock.h> for mingw32.
6694 (remote_open): Adjust for mingw32 support. Flush
6695 standard error after writing to it.
6696 (remote_close, putpkt_binary, input_interrupt, block_async_io)
6697 (unblock_async_io, enable_async_io, disable_async_io)
6698 (readchar, getpkt): Update for Winsock support.
6699 (prepare_resume_reply): Expect a protocol signal number.
6700 * server.c: Disable <sys/wait.h> on mingw32.
6701 (start_inferior): Adjust for mingw32 support. Flush
6702 standard error after writing to it.
6703 (attach_inferior): Likewise. Use protocol signal
6704 numbers.
6705 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
6706 and names.
6707 * win32-i386-low.c: New file.
6708 * Makefile.in (XM_CLIBS): Set.
6709 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
6710 (win32-i386-low.o): New dependency rule.
6711 * linux-low.c (linux_wait): Use target signal numbers.
6712 * target.h (struct target_ops): Doc fix.
6713 * server.h (target_signal_to_name): New prototype.
6714 * gdbreplay.c: Don't include headers unconditionally which
6715 are missing on mingw32. Include <winsock.h> for mingw32.
6716 (remote_close, remote_open): Adjust for Winsock support.
6717 * configure, config.in: Regenerated.
6718
67192006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
6720
6721 * server.c (decode_xfer_read, write_qxfer_response): New.
6722 (handle_query): Take a packet length argument. Handle
6723 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
6724 the qSupported response.
6725 (main): Update call to handle_query.
6726
67272006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
6728
6729 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
6730 (putpkt_binary): Renamed from putpkt and adjusted for binary
6731 data.
6732 (putpkt): New wrapper for putpkt_binary.
6733 (readchar): Don't mask off the high bit.
6734 (decode_X_packet): New function.
6735 * server.c (main): Call putpkt_binary if a handler sets the packet
6736 length. Save the length of the incoming packet. Handle 'X'.
6737 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
6738
67392006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
6740
6741 * server.c (handle_query): Handle qSupported.
6742
67432006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
6744
6745 * remote-utils.c (all_symbols_looked_up): New variable.
6746 (look_up_one_symbol): Check it.
6747 * server.h (look_up_one_symbol): New declaration.
6748 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
6749
67502006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
6751
6752 * Makefile.in (linux-arm-low.o): Update dependencies.
6753 * linux-arm-low.c: Include "gdb_proc_service.h".
6754 (PTRACE_GET_THREAD_AREA): Define.
6755 (ps_get_thread_area): New function.
6756
67572006-05-09 Nathan Sidwell <nathan@codesourcery.com>
6758
6759 * configure.srv (m68k*-*-uclinux*): New target.
6760 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
6761 (linux_resume_one_process): Remove extraneous cast.
6762 (linux_read_offsets): New.
6763 (linux_target_op): Add linux_read_offsets on mmuless systems.
6764 * server.c (handle_query): Add qOffsets logic.
6765 * target.h (struct target_ops): Add read_offsets.
6766
67672006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
6768
6769 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
6770 (PTRACE_GET_THREAD_AREA): Define.
6771 (ps_get_thread_area): New function.
6772 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
6773 (linux-x86-64-low.o): Update.
6774
67752006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
6776
6777 * configure.ac: Remove checks for prfpregset_t.
6778 * gdb_proc_service.h: New file.
6779 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
6780 new "gdb_proc_service.h".
6781 * proc-service.c: Likewise.
6782 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
6783 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
6784 * Makefile.in (gdb_proc_service_h): Updated.
6785 * configure, config.in: Regenerated.
6786
67872006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
6788
6789 * remote-utils.c (prepare_resume_reply): Move declaration
6790 of gdb_id_from_wait to the top of the block.
6791
67922006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
6793
6794 * linux-low.c (regsets_store_inferior_registers): Read the regset
6795 from the target before filling it.
6796
67972006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
6798
6799 * server.c (attach_inferior): Return SIGTRAP for a successful
6800 attach.
6801
68022006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
6803
6804 * Makefile.in (OBS): Add version.o.
6805 (STAGESTUFF): Delete.
6806 (version.o): Add dependencies.
6807 (version.c): Replace rule.
6808 (clean): Remove version.c.
6809 * server.c (gdbserver_version): New.
6810 (gdbserver_usage): Use printf.
6811 (main): Handle --version and --help.
6812 * server.h (version, host_name): Add declarations.
6813
68142005-12-23 Eli Zaretskii <eliz@gnu.org>
6815
6816 * linux-arm-low.c:
6817 * linux-arm-low.c:
6818 * inferiors.c:
6819 * i387-fp.h:
6820 * i387-fp.c:
6821 * gdbreplay.c:
6822 * regcache.c:
6823 * proc-service.c:
6824 * mem-break.h:
6825 * mem-break.c:
6826 * linux-x86-64-low.c:
6827 * linux-sh-low.c:
6828 * linux-s390-low.c:
6829 * linux-ppc64-low.c:
6830 * linux-ppc-low.c:
6831 * linux-mips-low.c:
6832 * linux-m68k-low.c:
6833 * linux-m32r-low.c:
6834 * linux-low.h:
6835 * linux-low.c:
6836 * linux-ia64-low.c:
6837 * linux-i386-low.c:
6838 * linux-crisv32-low.c:
6839 * thread-db.c:
6840 * terminal.h:
6841 * target.h:
6842 * target.c:
6843 * server.h:
6844 * server.c:
6845 * remote-utils.c:
6846 * regcache.h:
6847 * utils.c:
6848 * Makefile.in:
6849 * configure.ac:
6850 * gdbserver.1: Add (C) after Copyright. Update the FSF
6851 address.
6852
68532005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
6854
6855 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
6856 (arm_breakpoint_at): Recognize both breakpoints.
6857 (the_low_target): Use the correct breakpoint instruction.
6858
68592005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
6860
6861 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
6862 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
6863 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
6864 (the_low_target): Update.
6865
68662005-10-25 Andreas Schwab <schwab@suse.de>
6867
6868 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
6869
6870 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
6871 (ia64_num_regs): Reduce to 462.
6872
68732005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
6874
6875 * acinclude.m4: Correct quoting.
6876 * aclocal.m4: Regenerated.
6877
6878 Suggested by SZOKOVACS Robert <szo@ies.hu>:
6879 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
6880 (thread_db_init): Call thread_db_err_str.
6881 * configure.ac: Check for TD_VERSION.
6882 * config.in, configure: Regenerated.
6883
68842005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6885
6886 * server.h (error, fatal, warning): Add ATTR_FORMAT.
6887
68882005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
6889
6890 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
6891 is not available. Define HAVE_PTRACE_GETREGS if it is.
6892 * config.in, configure: Regenerated.
6893 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
6894 * linux-i386-low.c, linux-m68k-low.c: Update to use
6895 HAVE_PTRACE_GETREGS.
6896 * linux-low.c (regsets_fetch_inferior_registers)
6897 (regsets_store_inferior_registers): Only return 0 if we processed
6898 GENERAL_REGS.
6899 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
6900 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
6901
69022005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
6903
6904 * inferiors.c (struct thread_info): Add gdb_id.
6905 (add_thread): Add gdb_id argument.
6906 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
6907 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
6908 calls to add_thread.
6909 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
6910 * server.c (handle_query): Use thread_to_gdb_id.
6911 (handle_v_cont, main): Use gdb_id_to_thread_id.
6912 * server.h (add_thread): Update prototype.
6913 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
6914 prototypes.
6915
69162005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
6917
6918 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
6919 left-padded registers.
6920 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
6921 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
6922
69232005-07-01 Steve Ellcey <sje@cup.hp.com>
6924
6925 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
6926 * configure: Regenerate.
6927 * config.in: Regenerate.
6928 * server.h (NEED_DECLARATION_STRERROR):
6929 Replace with !HAVE_DECL_STRERROR.
6930
69312005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
6932
6933 * linux-low.c (linux_wait, linux_send_signal): Don't test
6934 an unsigned long variable for > 0 if it could be MAX_ULONG.
6935 * server.c (myresume): Likewise.
6936 * target.c (set_desired_inferior): Likewise.
6937
69382005-06-13 Mark Kettenis <kettenis@gnu.org>
6939
6940 * configure.ac: Simplify and improve check for socklen_t.
6941 * configure, config.in: Regenerate.
6942
69432005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
6944
6945 * acconfig.h: Remove.
6946 * configure.ac: Add a test for socklen_t. Use three-argument
6947 AC_DEFINE throughout.
6948 * config.in: Regenerated using autoheader 2.59.
6949 * configure: Regenerated.
6950
6951 * gdbreplay.c (socklen_t): Provide a default.
6952 (remote_open): Use socklen_t.
6953 * remote-utils.c (socklen_t): Provide a default.
6954 (remote_open): Use socklen_t.
6955 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
6956 unsigned char.
6957
6958 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
6959 char for buffers.
6960 * linux-low.c (linux_read_memory, linux_write_memory)
6961 (linux_read_auxv): Likewise.
6962 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
6963 (check_mem_write): Likewise.
6964 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
6965 Likewise.
6966 * regcache.c (struct inferior_rgcache_data, registers_to_string)
6967 (registers_from_string, register_data): Likewise.
6968 * server.c (handle_query, main): Likewise.
6969 * server.h (convert_ascii_to_int, convert_int_to_ascii)
6970 (decode_M_packet): Likewise.
6971 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
6972 * target.h (struct target_ops): Update read_memory, write_memory,
6973 and read_auxv.
6974 (read_inferior_memory, write_inferior_memory): Update.
6975 * linux-low.h (struct linux_target_ops): Change type of breakpoint
6976 to unsigned char *.
6977 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
6978 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
6979 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
6980 linux-s390-low.c, linux-sh-low.c: Update for changes in
6981 read_inferior_memory and the_low_target->breakpoint.
6982
69832005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
6984
6985 * Makefile.in (SFILES): Add linux-ppc64-low.c.
6986 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
6987 * configure.srv: Add powerpc64-*-linux*.
6988 * linux-ppc64-low.c: New file.
6989
69902005-05-23 Orjan Friberg <orjanf@axis.com>
6991
6992 * linux-cris-low.c: New file with support for CRIS.
6993 * linux-crisv32-low.c: Ditto for CRISv32.
6994 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
6995 (clean): Add reg-cris.c and reg-crisv32.c.
6996 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
6997 reg-crisv32.o, and reg-crisv32.c to make rules.
6998 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
6999 recognized targets.
7000
70012005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
7002
7003 * linux-low.c (fetch_register): Ensure buffer size is a multiple
7004 of sizeof (PTRACE_XFER_TYPE).
7005 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
7006
70072005-05-12 Orjan Friberg <orjanf@axis.com>
7008
7009 * target.h (struct target_ops): Add insert_watchpoint,
7010 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
7011 pointers for hardware watchpoint support.
7012 * linux-low.h (struct linux_target_ops): Ditto.
7013 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
7014 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
7015 to linux_target_ops.
7016 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
7017 reply packet.
7018 * server.c (main): Recognize 'Z' and 'z' packets.
7019
70202005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
7021
7022 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
7023 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
7024 (the_low_target): Add new members.
7025
70262005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
7027
7028 * proc-service.c (ps_lgetregs): Search all_processes instead of
7029 all_threads.
7030
70312005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
7032
7033 * server.c (start_inferior): Change return type to int.
7034 (attach_inferior): Change sigptr to int *.
7035 (handle_v_cont, handle_v_requests): Change signal to int *.
7036 (main): Change signal to int.
7037
70382005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
7039
7040 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
7041 * configure.srv: Add m32r*-*-linux*.
7042 * linux-m32r-low.c: New file.
7043
70442005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
7045
7046 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
7047
70482005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
7049
7050 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
7051 Take unsigned long arguments for PIDs.
7052 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
7053 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
7054 (wait_for_sigstop, linux_resume_one_process)
7055 (regsets_fetch_inferior_registers, linux_send_signal)
7056 (linux_read_auxv): Likewise. Update the types of variables holding
7057 PIDs. Update format string specifiers.
7058 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
7059 * remote-utils.c (prepare_resume_reply): Likewise.
7060 * server.c (cont_thread, general_thread, step_thread)
7061 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
7062 unsigned long.
7063 (handle_query): Update format specifiers.
7064 (handle_v_cont, main): Use strtoul for thread IDs.
7065 * server.h (struct inferior_list_entry): Use unsigned long for ID.
7066 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
7067 (general_thread, step_thread, thread_from_wait)
7068 (old_thread_from_wait): Update.
7069 * target.h (struct thread_resume): Use unsigned long for THREAD.
7070 (struct target_ops): Use unsigned long for arguments to attach and
7071 thread_alive.
7072
70732005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
7074
7075 * acinclude.m4: Include bfd/bfd.m4 directly.
7076 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
7077 <agriffis@toolchain.org>.
7078 * aclocal.m4, configure: Regenerated.
7079
70802005-01-07 Andrew Cagney <cagney@gnu.org>
7081
7082 * configure.ac: Rename configure.in, require autoconf 2.59.
7083 * configure: Re-generate.
7084
70852004-12-08 Daniel Jacobowitz <dan@debian.org>
7086
7087 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
7088 LIBS when finished.
7089 * aclocal.m4: Regenerated.
7090 * configure: Regenerated.
7091
70922004-11-21 Andreas Schwab <schwab@suse.de>
7093
7094 * linux-m68k-low.c (m68k_num_gregs): Define.
7095 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
7096 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
7097 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
7098 (m68k_breakpoint_at): New. Add to the_low_target.
7099
7100 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
7101 srv_linux_thread_db to yes.
7102
71032004-10-20 Joel Brobecker <brobecker@gnat.com>
7104
7105 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
7106 (ARCH_SET_FS): Likewise.
7107 (ARCH_GET_FS): Likewise.
7108 (ARCH_GET_GS): Likewise.
7109
71102004-10-16 Daniel Jacobowitz <dan@debian.org>
7111
7112 * linux-i386-low.c (ps_get_thread_area): New.
7113 * linux-x86-64-low.c (ps_get_thread_area): New.
7114 * linux-low.c: Include <sys/syscall.h>.
7115 (linux_kill_one_process): Don't kill the first thread here.
7116 (linux_kill): Kill the first thread here.
7117 (kill_lwp): New function.
7118 (send_sigstop, linux_send_signal): Use it.
7119 * proc-service.c: Clean up #ifdefs.
7120 (fpregset_info): Delete.
7121 (ps_lgetregs): Update and enable implementation.
7122 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
7123 implementations.
7124 * remote-utils.c (struct sym_cache, symbol_cache): New.
7125 (input_interrupt): Print a clearer message.
7126 (async_io_enabled): New variable.
7127 (enable_async_io, disable_async_io): Use it. Update comments.
7128 (look_up_one_symbol): Use the symbol cache.
7129 * thread-db.c (thread_db_look_up_symbols): New function.
7130 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
7131
71322004-10-16 Daniel Jacobowitz <dan@debian.org>
7133
7134 * configure.in: Test for -rdynamic.
7135 * configure: Regenerated.
7136 * Makefile (INTERNAL_LDFLAGS): New.
7137 (gdbserver, gdbreplay): Use it.
7138
71392004-09-02 Andrew Cagney <cagney@gnu.org>
7140
7141 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
7142
71432004-03-23 Daniel Jacobowitz <drow@mvista.com>
7144
7145 * linux-low.c (linux_wait): Clear all_processes list also.
7146
71472004-03-12 Daniel Jacobowitz <drow@mvista.com>
7148
7149 * linux-low.c: Include <errno.h>. Remove extern declaration of
7150 errno.
7151
71522004-03-12 Daniel Jacobowitz <drow@mvista.com>
7153
7154 * gdbreplay.c, server.h, utils.c: Update copyright years.
7155
71562004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
7157
7158 * server.c (main): Print child status or termination signal from
7159 variable 'signal', not 'sig'.
7160
71612004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
7162
7163 * linux-low.c (linux_read_memory): Change return type to
7164 int. Check for and return error from ptrace().
7165 * target.c (read_inferior_memory): Change return type to int. Pass
7166 back return status from the_target->read_memory().
7167 * target.h (struct target_ops): Adapt *read_memory() prototype.
7168 Update comment.
7169 (read_inferior_memory): Adapt prototype.
7170 * server.c (main): Return an error packet if
7171 read_inferior_memory() returns an error.
7172
71732004-03-04 Daniel Jacobowitz <drow@mvista.com>
7174
7175 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
7176 Unify with other clean targets.
7177
71782004-02-29 Daniel Jacobowitz <drow@mvista.com>
7179
7180 * server.c (handle_v_cont): Call set_desired_inferior.
7181
71822004-02-29 Daniel Jacobowitz <drow@mvista.com>
7183
7184 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
7185
71862004-02-29 Daniel Jacobowitz <drow@mvista.com>
7187
7188 * linux-low.c (linux_wait): Unblock async I/O.
7189 (linux_resume): Block and enable async I/O.
7190 * remote-utils.c (block_async_io, unblock_async_io): New functions.
7191 * server.h (block_async_io, unblock_async_io): Add prototypes.
7192
71932004-02-29 Daniel Jacobowitz <drow@mvista.com>
7194
7195 * remote-utils.c (remote_open): Print a status notice after
7196 opening a TCP port.
7197 * server.c (attach_inferior): Print a status notice after
7198 attaching.
7199
72002004-02-29 Daniel Jacobowitz <drow@mvista.com>
7201
7202 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
7203
72042004-02-26 Daniel Jacobowitz <drow@mvista.com>
7205
7206 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
7207 error packet.
7208 * server.c, target.h: Update copyright years.
7209
72102004-02-25 Roland McGrath <roland@redhat.com>
7211
7212 * target.h (struct target_ops): New member `read_auxv'.
7213 * server.c (handle_query): Handle qPart:auxv:read: query using that.
7214 * linux-low.c (linux_read_auxv): New function.
7215 (linux_target_ops): Initialize `read_auxv' member to that.
7216
72172004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
7218
7219 Committed by Jim Blandy <jimb@redhat.com>.
7220
7221 * linux-s390-low.c (s390_num_regs): Update.
7222 (s390_regmap): Remove control registers. Use __s390x__ predefine
7223 instead of GPR_SIZE to distiguish s390 and s390x targets.
7224
72252004-01-31 Daniel Jacobowitz <drow@mvista.com>
7226
7227 * linux-low.c: Update copyright year.
7228 (check_removed_breakpoint): Clear pending_is_breakpoint.
7229 (linux_set_resume_request, linux_queue_one_thread)
7230 (resume_status_pending_p): New functions.
7231 (linux_continue_one_thread): Use process->resume.
7232 (linux_resume): Only resume threads if there are no pending events.
7233 * linux-low.h (struct process_info): Add resume request
7234 pointer.
7235
72362004-01-30 Daniel Jacobowitz <drow@mvista.com>
7237
7238 * regcache.c (new_register_cache): Clear the allocated register
7239 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
7240
72412003-10-13 Daniel Jacobowitz <drow@mvista.com>
7242
7243 * linux-low.c (linux_resume): Take a struct thread_resume *
7244 argument.
7245 (linux_wait): Update call.
7246 (resume_ptr): New static variable.
7247 (linux_continue_one_thread): Renamed from
7248 linux_continue_one_process. Use resume_ptr.
7249 (linux_resume): Use linux_continue_one_thread.
7250 * server.c (handle_v_cont, handle_v_requests): New functions.
7251 (myresume): New function.
7252 (main): Handle 'v' case.
7253 * target.h (struct thread_resume): New type.
7254 (struct target_ops): Change argument of "resume" to struct
7255 thread_resume *.
7256 (myresume): Delete macro.
7257
72582003-08-08 H.J. Lu <hongjiu.lu@intel.com>
7259
7260 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
7261 (uninstall): Support DESTDIR.
7262
7263Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
7264
7265 * configure.srv: Add xscale*linux copy of arm*linux entry.
7266
72672003-07-24 Daniel Jacobowitz <drow@mvista.com>
7268
7269 * linux-arm-low.c (arm_reinsert_addr): New function.
7270 (the_low_target): Add arm_reinsert_addr.
7271
72722003-07-08 Mark Kettenis <kettenis@gnu.org>
7273
7274 * mem-break.c: Remove whitespace at end of file.
7275
72762003-06-28 Daniel Jacobowitz <drow@mvista.com>
7277
7278 * configure.in: Check whether we need to prototype strerror.
7279 * server.h: Optionally prototype strerror.
7280 * gdbreplay.c (perror_with_name): Use strerror.
7281 * linux-low.c (linux_attach_lwp): Use strerror.
7282 * utils.c (perror_with_name): Use strerror.
7283 * config.in, configure: Regenerated.
7284
72852003-06-28 Daniel Jacobowitz <drow@mvista.com>
7286
7287 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
7288 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
7289
72902003-06-20 Daniel Jacobowitz <drow@mvista.com>
7291
7292 * Makefile.in (SFILES): Update.
7293 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
7294 low-sun3.c: Remove files.
7295
72962003-06-17 Daniel Jacobowitz <drow@mvista.com>
7297
7298 * linux-low.c: Move comment to linux_thread_alive where it belonged.
7299 (linux_detach_one_process, linux_detach): New functions.
7300 (linux_target_ops): Add linux_detach.
7301 * server.c (main): Handle 'D' packet.
7302 * target.h (struct target_ops): Add "detach" member.
7303 (detach_inferior): Define.
7304
73052003-06-13 Mark Kettenis <kettenis@gnu.org>
7306
7307 From Kelley Cook <kelleycook@wideopenwest.com>:
7308 * configure.srv: Accept i[34567]86 variants.
7309
73102003-06-05 Daniel Jacobowitz <drow@mvista.com>
7311
7312 * linux-low.c (linux_wait_for_event): Correct comment typos.
7313 (linux_resume_one_process): Call check_removed_breakpoint.
7314 (linux_send_signal): New function.
7315 (linux_target_ops): Add linux_send_signal.
7316 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
7317 of kill.
7318 * target.h (struct target_ops): Add send_signal.
7319
73202003-05-29 Jim Blandy <jimb@redhat.com>
7321
7322 * linux-low.c (usr_store_inferior_registers): Transfer buf in
7323 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
7324 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
7325 away part of the register's value.
7326
73272003-03-26 Daniel Jacobowitz <drow@mvista.com>
7328
7329 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
7330 (linux_wait_for_event, linux_init_signals): Likewise.
7331
73322003-03-17 Daniel Jacobowitz <drow@mvista.com>
7333
7334 * configure.in: Check for stdlib.h.
7335 * configure: Regenerated.
7336 * config.in: Regenerated.
7337
73382003-01-04 Andreas Schwab <schwab@suse.de>
7339
7340 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
7341
73422003-01-02 Andrew Cagney <ac131313@redhat.com>
7343
7344 * Makefile.in: Remove obsolete code.
7345
73462002-11-20 Daniel Jacobowitz <drow@mvista.com>
7347
7348 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
7349 defined(PT_FPR0_HI).
7350
73512002-11-17 Stuart Hughes <seh@zee2.com>
7352
7353 * linux-arm-low.c (arm_num_regs): Increase.
7354 (arm_regmap): Include status register.
7355
73562002-11-17 Daniel Jacobowitz <drow@mvista.com>
7357
7358 * linux-low.c (register_addr): Remove incorrect -1 check.
7359
73602002-08-29 Daniel Jacobowitz <drow@mvista.com>
7361
7362 * linux-low.c (linux_create_inferior): Call setpgid. Return
7363 the new PID.
7364 (unstopped_p, linux_signal_pid): Remove.
7365 (linux_target_ops): Remove linux_signal_pid.
7366 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
7367 global instead of target method.
7368 * target.h (struct target_ops): Remove signal_pid. Update comment
7369 for create_inferior.
7370 * server.c (signal_pid): New variable.
7371 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
7372 gdbserver. Set the child to be the foreground process group.
7373 (attach_inferior): Set signal_pid.
7374
73752002-08-23 Daniel Jacobowitz <drow@mvista.com>
7376
7377 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
7378
73792002-08-20 Jim Blandy <jimb@redhat.com>
7380
7381 * Makefile.in (LDFLAGS): Allow the configure script to establish a
7382 default for this.
7383
73842002-08-01 Andrew Cagney <cagney@redhat.com>
7385
7386 * Makefile.in: Make chill references obsolete.
7387
73882002-07-24 Kevin Buettner <kevinb@redhat.com>
7389
7390 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
7391 * configure: Regenerate.
7392 * config.in: Regenerate.
7393
73942002-07-09 David O'Brien <obrien@FreeBSD.org>
7395
7396 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
7397 (perror_with_name, remote_close, remote_open, expect, play): Static.
7398
73992002-07-04 Michal Ludvig <mludvig@suse.cz>
7400
7401 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
7402 byte offsets instead of an array of indexes.
7403 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
7404
74052002-06-13 Daniel Jacobowitz <drow@mvista.com>
7406
7407 * regcache.c: Add comment.
7408
74092002-06-11 Daniel Jacobowitz <drow@mvista.com>
7410
7411 * thread-db.c: New file.
7412 * proc-service.c: New file.
7413 * acinclude.m4: New file.
7414 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
7415 proc-service.o, and thread-db.o.
7416 (linux-low.o): Add USE_THREAD_DB.
7417 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
7418 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
7419 * aclocal.m4: Regenerated.
7420 * config.in: Regenerated.
7421 * configure: Regenerated.
7422 * configure.in: Check for proc_service.h, sys/procfs.h,
7423 thread_db.h, and linux/elf.h headrs.
7424 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
7425 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
7426 Check for -lthread_db and thread support.
7427 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
7428 PowerPC, and SuperH.
7429 * i387-fp.c: Constify arguments.
7430 * i387-fp.h: Likewise.
7431 * inferiors.c: (struct thread_info): Renamed from
7432 `struct inferior_info'. Remove PID member. Use generic inferior
7433 list header. All uses updated.
7434 (inferiors, signal_pid): Removed.
7435 (all_threads): New variable.
7436 (get_thread): Define.
7437 (add_inferior_to_list): New function.
7438 (for_each_inferior): New function.
7439 (change_inferior_id): New function.
7440 (add_inferior): Removed.
7441 (remove_inferior): New function.
7442 (add_thread): New function.
7443 (free_one_thread): New function.
7444 (remove_thread): New function.
7445 (clear_inferiors): Use for_each_inferior and free_one_thread.
7446 (find_inferior): New function.
7447 (find_inferior_id): New function.
7448 (inferior_target_data): Update argument type.
7449 (set_inferior_target_data): Likewise.
7450 (inferior_regcache_data): Likewise.
7451 (set_inferior_regcache_data): Likewise.
7452 * linux-low.c (linux_bp_reinsert): Remove.
7453 (all_processes, stopping_threads, using_thrads)
7454 (struct pending_signals, debug_threads, pid_of): New.
7455 (inferior_pid): Replace with macro.
7456 (struct inferior_linux_data): Remove.
7457 (get_stop_pc, add_process): New functions.
7458 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
7459 Use add_process and add_thread.
7460 (linux_attach_lwp): New function, based on old linux_attach. Use
7461 add_process and add_thread. Set stop_expected for new threads.
7462 (linux_attach): New function.
7463 (linux_kill_one_process): New function.
7464 (linux_kill): Kill all LWPs.
7465 (linux_thread_alive): Use find_inferior_id.
7466 (check_removed_breakpoints, status_pending_p): New functions.
7467 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
7468 Update. Use WNOHANG. Wait for cloned processes also. Update process
7469 struct for the found process.
7470 (linux_wait_for_event): New function.
7471 (linux_wait): Use it. Support LWPs.
7472 (send_sigstop, wait_for_sigstop, stop_all_processes)
7473 (linux_resume_one_process, linux_continue_one_process): New functions.
7474 (linux_resume): Support LWPs.
7475 (REGISTER_RAW_SIZE): Remove.
7476 (fetch_register): Use register_size instead. Call supply_register.
7477 (usr_store_inferior_registers): Likewise. Call collect_register.
7478 Fix recursive case.
7479 (regsets_fetch_inferior_registers): Improve error message.
7480 (regsets_store_inferior_registers): Add debugging.
7481 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
7482 (unstopped_p, linux_signal_pid): New functions.
7483 (linux_target_ops): Add linux_signal_pid.
7484 (linux_init_signals): New function.
7485 (initialize_low): Call it. Initialize using_threads.
7486 * regcache.c (inferior_regcache_data): Add valid
7487 flag.
7488 (get_regcache): Fetch registers lazily. Add fetch argument
7489 and update all callers.
7490 (regcache_invalidate_one, regcache_invalidate): New
7491 functions.
7492 (new_register_cache): Renamed from create_register_cache.
7493 Return the new regcache.
7494 (free_register_cache): Change argument to a void *.
7495 (registers_to_string, registers_from_string): Call get_regcache
7496 with fetch flag set.
7497 (register_data): Make static. Pass fetch flag to get_regcache.
7498 (supply_register): Call get_regcache with fetch flag clear.
7499 (collect_register): Call get_regcache with fetch flag set.
7500 (collect_register_as_string): New function.
7501 * regcache.h: Update.
7502 * remote-utils.c (putpkt): Flush after debug output and use
7503 stderr.
7504 Handle input interrupts while waiting for an ACK.
7505 (input_interrupt): Use signal_pid method.
7506 (getpkt): Flush after debug output and use stderr.
7507 (outreg): Use collect_register_as_string.
7508 (new_thread_notify, dead_thread_notify): New functions.
7509 (prepare_resume_reply): Check using_threads. Set thread_from_wait
7510 and general_thread.
7511 (look_up_one_symbol): Flush after debug output.
7512 * server.c (step_thread, server_waiting): New variables.
7513 (start_inferior): Don't use signal_pid. Update call to mywait.
7514 (attach_inferior): Update call to mywait.
7515 (handle_query): Handle qfThreadInfo and qsThreadInfo.
7516 (main): Don't fetch/store registers explicitly. Use
7517 set_desired_inferior. Support proposed ``Hs'' packet. Update
7518 calls to mywait.
7519 * server.h: Update.
7520 (struct inferior_list, struct_inferior_list_entry): New.
7521 * target.c (set_desired_inferior): New.
7522 (write_inferior_memory): Constify.
7523 (mywait): New function.
7524 * target.h: Update.
7525 (struct target_ops): New signal_pid method.
7526 (mywait): Removed macro, added prototype.
7527
7528 * linux-low.h (regset_func): Removed.
7529 (regset_fill_func, regset_store_func): New.
7530 (enum regset_type): New.
7531 (struct regset_info): Add type field. Use new operation types.
7532 (struct linux_target_ops): stop_pc renamed to get_pc.
7533 Add decr_pc_after_break and breakpoint_at.
7534 (get_process, get_thread_proess, get_process_thread)
7535 (strut process_info, all_processes, linux_attach_lwp)
7536 (thread_db_init): New.
7537
7538 * linux-arm-low.c (arm_get_pc, arm_set_pc,
7539 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
7540 (the_low_target): Add new members.
7541 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
7542 (i386_store_fpxregset): Constify.
7543 (target_regsets): Add new kind identifier.
7544 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
7545 (i386_set_pc): Add debugging.
7546 (i386_breakpoint_at): New function.
7547 (the_low_target): Add new members.
7548 * linux-mips-low.c (mips_get_pc, mips_set_pc)
7549 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
7550 (mips_breakpoint_at): New.
7551 (the_low_target): Add new members.
7552 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
7553 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
7554 (the_low_target): Add new members.
7555 * linux-sh-low.c (sh_get_pc, sh_set_pc)
7556 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
7557 (the_low_target): Add new members.
7558 * linux-x86-64-low.c (target_regsets): Add new kind
7559 identifier.
7560
75612002-05-15 Daniel Jacobowitz <drow@mvista.com>
7562
7563 From Martin Pool <mbp@samba.org>:
7564 * server.c (gdbserver_usage): New function.
7565 (main): Call it.
7566
75672002-05-14 Daniel Jacobowitz <drow@mvista.com>
7568
7569 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
7570 stop_at -> stop_pc.
7571
75722002-05-04 Andrew Cagney <ac131313@redhat.com>
7573
7574 * Makefile.in: Remove obsolete code.
7575
75762002-04-24 Michal Ludvig <mludvig@suse.cz>
7577
7578 * linux-low.c (regsets_fetch_inferior_registers),
7579 (regsets_store_inferior_registers): Removed cast to int from
7580 ptrace() calls.
7581 * regcache.h: Added declaration of struct inferior_info.
7582
75832002-04-20 Daniel Jacobowitz <drow@mvista.com>
7584
7585 * inferiors.c (struct inferior_info): Add regcache_data.
7586 (add_inferior): Call create_register_cache.
7587 (clear_inferiors): Call free_register_cache.
7588 (inferior_regcache_data, set_inferior_regcache_data): New functions.
7589 * regcache.c (struct inferior_regcache_data): New.
7590 (registers): Remove.
7591 (get_regcache): New function.
7592 (create_register_cache, free_register_cache): New functions.
7593 (set_register_cache): Don't initialize the register cache here.
7594 (registers_to_string, registers_from_string, register_data): Call
7595 get_regcache.
7596 * regcache.h: Add prototypes.
7597 * server.h: Likewise.
7598
75992002-04-20 Daniel Jacobowitz <drow@mvista.com>
7600
7601 * mem-break.c: New file.
7602 * mem-break.h: New file.
7603 * Makefile.in: Add mem-break.o rule; update server.h
7604 dependencies.
7605 * inferiors.c (struct inferior_info): Add target_data
7606 member.
7607 (clear_inferiors): Free target_data member if set.
7608 (inferior_target_data, set_inferior_target_data): New functions.
7609 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
7610 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
7611 * linux-low.c (linux_bp_reinsert): New variable.
7612 (struct inferior_linux_data): New.
7613 (linux_create_inferior): Use set_inferior_target_data.
7614 (linux_attach): Likewise. Call add_inferior.
7615 (linux_wait_for_one_inferior): New function.
7616 (linux_wait): Call it.
7617 (linux_write_memory): Add const.
7618 (initialize_low): Call set_breakpoint_data.
7619 * linux-low.h (struct linux_target_ops): Add breakpoint
7620 handling members.
7621 * server.c (attach_inferior): Remove extra add_inferior
7622 call.
7623 * server.h: Include mem-break.h. Update inferior.c
7624 prototypes.
7625 * target.c (read_inferior_memory)
7626 (write_inferior_memory): New functions.
7627 * target.h (read_inferior_memory)
7628 (write_inferior_memory): Change macros to prototypes.
7629 (struct target_ops): Update comments. Add const to write_memory
7630 definition.
7631
76322002-04-11 Daniel Jacobowitz <drow@mvista.com>
7633
7634 * linux-low.c (usr_store_inferior_registers): Support
7635 registers which are allowed to fail to store.
7636 * linux-low.h (linux_target_ops): Likewise.
7637 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
7638 (ppc_cannot_store_register): FPSCR may not be storable.
7639
76402002-04-09 Daniel Jacobowitz <drow@mvista.com>
7641
7642 * server.h: Include <string.h> if HAVE_STRING_H.
7643 * ChangeLog: Correct paths in last ChangeLog entry.
7644
76452002-04-09 Daniel Jacobowitz <drow@mvista.com>
7646
7647 * linux-low.h: Remove obsolete prototypes.
7648 (struct linux_target_ops): New.
7649 (extern the_low_target): New.
7650 * linux-low.c (num_regs, regmap): Remove declarations.
7651 (register_addr): Use the_low_target explicitly.
7652 (fetch_register): Likewise.
7653 (usr_fetch_inferior_registers): Likewise.
7654 (usr_store_inferior_registers): Likewise.
7655 * linux-arm-low.c (num_regs): Remove.
7656 (arm_num_regs): Define.
7657 (arm_regmap): Renamed from regmap, made static.
7658 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
7659 made static.
7660 (arm_cannot_store_register): Renamed from cannot_store_register,
7661 made static.
7662 (the_low_target): New.
7663 * linux-i386-low.c (num_regs): Remove.
7664 (i386_num_regs): Define.
7665 (i386_regmap): Renamed from regmap, made static.
7666 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
7667 made static.
7668 (i386_cannot_store_register): Renamed from cannot_store_register,
7669 made static.
7670 (the_low_target): New.
7671 * linux-ia64-low.c (num_regs): Remove.
7672 (ia64_num_regs): Define.
7673 (ia64_regmap): Renamed from regmap, made static.
7674 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
7675 made static.
7676 (ia64_cannot_store_register): Renamed from cannot_store_register,
7677 made static.
7678 (the_low_target): New.
7679 * linux-m68k-low.c (num_regs): Remove.
7680 (m68k_num_regs): Define.
7681 (m68k_regmap): Renamed from regmap, made static.
7682 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
7683 made static.
7684 (m68k_cannot_store_register): Renamed from cannot_store_register,
7685 made static.
7686 (the_low_target): New.
7687 * linux-mips-low.c (num_regs): Remove.
7688 (mips_num_regs): Define.
7689 (mips_regmap): Renamed from regmap, made static.
7690 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
7691 made static.
7692 (mips_cannot_store_register): Renamed from cannot_store_register,
7693 made static.
7694 (the_low_target): New.
7695 * linux-ppc-low.c (num_regs): Remove.
7696 (ppc_num_regs): Define.
7697 (ppc_regmap): Renamed from regmap, made static.
7698 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
7699 made static.
7700 (ppc_cannot_store_register): Renamed from cannot_store_register,
7701 made static.
7702 (the_low_target): New.
7703 * linux-s390-low.c (num_regs): Remove.
7704 (s390_num_regs): Define.
7705 (s390_regmap): Renamed from regmap, made static.
7706 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
7707 made static.
7708 (s390_cannot_store_register): Renamed from cannot_store_register,
7709 made static.
7710 (the_low_target): New.
7711 * linux-sh-low.c (num_regs): Remove.
7712 (sh_num_regs): Define.
7713 (sh_regmap): Renamed from regmap, made static.
7714 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
7715 made static.
7716 (sh_cannot_store_register): Renamed from cannot_store_register,
7717 made static.
7718 (the_low_target): New.
7719 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
7720 (the_low_target): New.
7721
77222002-04-09 Daniel Jacobowitz <drow@mvista.com>
7723
7724 * Makefile.in: Add stamp-h target.
7725 * configure.in: Create stamp-h.
7726 * configure: Regenerated.
7727
77282002-04-09 Daniel Jacobowitz <drow@mvista.com>
7729
7730 * inferiors.c: New file.
7731 * target.c: New file.
7732 * target.h: New file.
7733 * Makefile.in: Add target.o and inferiors.o. Update
7734 dependencies.
7735 * linux-low.c (inferior_pid): New static variable,
7736 moved from server.c.
7737 (linux_create_inferior): Renamed from create_inferior.
7738 Call add_inferior. Return 0 on success instead of a PID.
7739 (linux_attach): Renamed from myattach.
7740 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
7741 (linux_thread_alive): Renamed from mythread_alive.
7742 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
7743 child dies.
7744 (linux_resume): Renamed from myresume. Add missing ``return 0''.
7745 (regsets_store_inferior_registers): Correct error message.
7746 Add missing ``return 0''.
7747 (linux_fetch_registers): Renamed from fetch_inferior_registers.
7748 (linux_store_registers): Renamed from store_inferior_registers.
7749 (linux_read_memory): Renamed from read_inferior_memory.
7750 (linux_write_memory): Renamed from write_inferior_memory.
7751 (linux_target_ops): New structure.
7752 (initialize_low): Call set_target_ops ().
7753 * remote-utils.c (unhexify): New function.
7754 (hexify): New function.
7755 (input_interrupt): Send signals to ``signal_pid''.
7756 * server.c (inferior_pid): Remove.
7757 (start_inferior): Update create_inferior call.
7758 (attach_inferior): Call add_inferior.
7759 (handle_query): New function.
7760 (main): Call handle_query for `q' packets.
7761 * server.h: Include "target.h". Remove obsolete prototypes.
7762 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
7763
77642002-04-09 Daniel Jacobowitz <drow@mvista.com>
7765
7766 * Makefile.in: Add WARN_CFLAGS. Update configury
7767 dependencies.
7768 * configure.in: Check for <string.h>
7769 * configure: Regenerate.
7770 * config.in: Regenerate.
7771 * gdbreplay.c: Include needed system headers.
7772 (remote_open): Remove strchr prototype.
7773 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
7774 * regcache.c (supply_register): Change buf argument to const void *.
7775 (supply_register_by_name): Likewise.
7776 (collect_register): Change buf argument to void *.
7777 (collect_register_by_name): Likewise.
7778 * regcache.h: Add missing prototypes.
7779 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
7780 * server.c (handle_query): New function.
7781 (attached): New static variable, moved out of main.
7782 (main): Quiet longjmp clobber warnings.
7783 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
7784 * utils.c (error): Remove NORETURN.
7785 (fatal): Likewise.
This page took 0.051097 seconds and 4 git commands to generate.