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