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