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