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