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