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