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