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