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