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