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