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