daily update
[deliverable/binutils-gdb.git] / gdb / gdbserver / ChangeLog
CommitLineData
ac740bc7
JH
12014-09-03 James Hogan <james.hogan@imgtec.com>
2
3 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
4 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
5
97ea6506
GB
62014-09-03 Gary Benson <gbenson@redhat.com>
7
8 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
9 ALL_DEBUG_ADDRESS_REGISTERS.
10
df7e5265
GB
112014-09-02 Gary Benson <gbenson@redhat.com>
12
13 * i386-low.h: Renamed as...
14 * x86-low.h: New file. All type, function and variable name
15 prefixes changed from "i386_" to "x86_". All references updated.
16 * i386-low.c: Renamed as...
17 * x86-low.c: New file. All type, function and variable name
18 prefixes changed from "i386_" to "x86_". All references updated.
19
ed859da7
GB
202014-09-02 Gary Benson <gbenson@redhat.com>
21
22 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
23 (x86_linux_new_thread): Likewise.
24
860789c7
GB
252014-08-29 Gary Benson <gbenson@redhat.com>
26
27 * server.h (setjmp.h): Do not include.
28 (toplevel): Do not declare.
29 (common-exceptions.h): Include.
30 (cleanups.h): Likewise.
31 * server.c (toplevel): Do not define.
32 (exit_code): New static global.
33 (detach_or_kill_for_exit_cleanup): New function.
34 (main): New function. Original main renamed to...
35 (captured_main): New function.
36 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
37
ff55e1b5
GB
382014-08-29 Gary Benson <gbenson@redhat.com>
39
40 * Makefile.in (SFILES): Add common/common-exceptions.c.
41 (OBS): Add common-exceptions.o.
42 (common-exceptions.o): New rule.
43 * utils.c (prepare_to_throw_exception): New function.
44
e9bcb658
GB
452014-08-29 Gary Benson <gbenson@redhat.com>
46
47 * config.in: Regenerate.
48 * configure: Likewise.
49
e3180625
GB
502014-08-29 Gary Benson <gbenson@redhat.com>
51
52 * Makefile.in (SFILES): Add common/cleanups.c.
53 (OBS): cleanups.o.
54 (cleanups.o): New rule.
55
e3d6ba5d
GB
562014-08-29 Gary Benson <gbenson@redhat.com>
57
58 * utils.c (internal_vwarning): New function.
59
7096e886
GB
602014-08-28 Gary Benson <gbenson@redhat.com>
61
62 * utils.h (fatal): Remove declaration.
63 * utils.c (fatal): Remove function.
64
14ce3192
GB
652014-08-28 Gary Benson <gbenson@redhat.com>
66
67 * tracepoint.c (gdb_agent_init): Replace fatal with
68 perror_with_name.
69 (initialize_tracepoint): Likewise.
70
50278d59
GB
712014-08-28 Gary Benson <gbenson@redhat.com>
72
73 * remote-utils.c (remote_prepare): Replace fatal with error.
74
aa96c426
GB
752014-08-28 Gary Benson <gbenson@redhat.com>
76
77 * linux-low.c (linux_async): Replace fatal with warning.
78 Tidy up and return.
79 (linux_start_non_stop): Return -1 if linux_async failed.
80
f7160e97
GB
812014-08-28 Gary Benson <gbenson@redhat.com>
82
83 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
84 gdb_assert.
85 (i386_dr_low_get_addr): Remove vague comment.
86 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
87 gdb_assert.
88
38e08fca
GB
892014-08-28 Gary Benson <gbenson@redhat.com>
90
91 * inferiors.c (get_thread_process): Replace check with gdb_assert.
92 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
93 internal_error.
94 (linux_resume_one_lwp): Likewise.
95 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
96 gdb_assert.
97 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
98 with internal_error.
99 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
100 (init_register_cache): Replace fatal with gdb_assert_not_reached.
101 (find_register_by_name): Replace fatal with internal_error.
102 (find_regno): Likewise.
103 * tdesc.c (init_target_desc): Replace check with gdb_assert.
104 * thread-db.c (thread_db_create_event): Likewise.
105 (thread_db_load_search): Likewise.
106 (try_thread_db_load_1): Likewise.
107 * tracepoint.c (get_jump_space_head): Replace fatal with
108 internal_error.
109 (claim_trampoline_space): Likewise.
110 (have_fast_tracepoint_trampoline_buffer): Likewise.
111 (cmd_qtstart): Likewise.
112 (stop_tracing): Likewise.
113 (fast_tracepoint_collecting): Likewise.
114 (target_malloc): Likewise.
115 (download_tracepoint): Likewise.
116 (download_trace_state_variables): Replace check with gdb_assert.
117 (upload_fast_traceframes): Replace fatal with internal_error.
118
34abf635
GB
1192014-08-19 Tom Tromey <tromey@redhat.com>
120 Gary Benson <gbenson@redhat.com>
121
122 * Makefile.in (SFILES): Add common/common-debug.c.
123 (OBS): Add common-debug.o.
124 (common-debug.o): New rule.
125 * debug.h (debug_printf): Don't declare.
126 * debug.c (debug_printf): Renamed and rewritten as...
127 (debug_vprintf): New function.
128
f6e94d78
GB
1292014-08-19 Gary Benson <gbenson@redhat.com>
130
131 * utils.h: Do not include print-utils.h.
132
9239eeab
GB
1332014-08-19 Tom Tromey <tromey@redhat.com>
134 Gary Benson <gbenson@redhat.com>
135
136 * server.h: Add static assertion.
137 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
138
ef87c8bb
GB
1392014-08-19 Tom Tromey <tromey@redhat.com>
140 Gary Benson <gbenson@redhat.com>
141
142 * Makefile.in (SFILES): Add common/errors.c.
143 (OBS): Add errors.o.
144 (IPA_OBS): Add errors-ipa.o.
145 (errors.o): New rule.
146 (errors-ipa.o): Likewise.
147 * utils.h (perror_with_name, error, warning): Don't declare.
148 * utils.c (warning): Renamed and rewritten as...
149 (vwarning): New function.
150 (error): Renamed and rewritten as...
151 (verror): New function.
152 (internal_error): Renamed and rewritten as...
153 (internal_verror): New function.
154
bb974a24
GB
1552014-08-07 Gary Benson <gbenson@redhat.com>
156
157 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
158 * configure: Regenerate.
159 * config.in: Likewise.
160 * server.h: Do not include errno.h.
161 * event-loop.c: Likewise.
162 * hostio-errno.c: Likewise.
163 * linux-low.c: Likewise.
164 * remote-utils.c: Likewise.
165 * spu-low.c: Likewise.
166 * utils.c: Likewise.
167 * gdbreplay.c: Unconditionally include errno.h.
168
6d3d12eb
GB
1692014-08-07 Gary Benson <gbenson@redhat.com>
170
171 * server.h: Do not include string.h.
172 * event-loop.c: Likewise.
173 * linux-low.c: Likewise.
174 * regcache.c: Likewise.
175 * remote-utils.c: Likewise.
176 * spu-low.c: Likewise.
177 * utils.c: Likewise.
178
dccbb609
GB
1792014-08-07 Gary Benson <gbenson@redhat.com>
180
181 * server.h: Do not include gdb_assert.h.
182
e76df0d0
GB
1832014-08-07 Gary Benson <gbenson@redhat.com>
184
185 * server.h: Do not include common-utils.h.
186
4cb9c816
GB
1872014-08-07 Gary Benson <gbenson@redhat.com>
188
189 * server.h: Do not include ptid.h.
190 * notif.h: Likewise.
191
3995eeee
GB
1922014-08-07 Gary Benson <gbenson@redhat.com>
193
194 * server.h: Do not include gdb_locale.h.
195
cb9f1a9b
GB
1962014-08-07 Gary Benson <gbenson@redhat.com>
197
198 * server.h: Do not include gdb/signals.h.
199 * win32-low.c: Likewise.
200
a5fceff8
GB
2012014-08-07 Gary Benson <gbenson@redhat.com>
202
203 * server.h: Do not include pathmax.h.
204
b9391142
GB
2052014-08-07 Gary Benson <gbenson@redhat.com>
206
207 * server.h: Do not include libiberty.h.
208 * linux-bfin-low.c: Likewise.
209
0e443c87
GB
2102014-08-07 Gary Benson <gbenson@redhat.com>
211
212 * server.h: Do not include ansidecl.h.
213
8ebb3f56
GB
2142014-08-07 Gary Benson <gbenson@redhat.com>
215
216 * linux-x86-low.c: Do not include stddef.h.
217 * lynx-ppc-low.c: Likewise.
218 * tracepoint.c: Likewise.
219
8980bdf6
GB
2202014-08-07 Gary Benson <gbenson@redhat.com>
221
222 * server.h: Do not include stdarg.h.
223 * nto-low.c: Likewise.
224
d7096f71
GB
2252014-08-07 Gary Benson <gbenson@redhat.com>
226
227 * server.h: Do not include stdlib.h.
228 * inferiors.c: Likewise.
229 * linux-low.c: Likewise.
230 * regcache.c: Likewise.
231 * spu-low.c: Likewise.
232 * tracepoint.c: Likewise.
233 * utils.c: Likewise.
234
d02f550d
GB
2352014-08-07 Gary Benson <gbenson@redhat.com>
236
237 * server.h: Do not include stdio.h.
238 * linux-low.c: Likewise.
239 * remote-utils.c: Likewise.
240 * spu-low.c: Likewise.
241 * utils.c: Likewise.
242 * wincecompat.c: Likewise.
243
87f6c4e3
GB
2442014-08-06 Gary Benson <gbenson@redhat.com>
245
246 * regcache.c (init_register_cache): Move conditionals inside if.
247
7089dca4
GB
2482014-08-06 Gary Benson <gbenson@redhat.com>
249
250 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
251
462f517e
GB
2522014-07-31 Gary Benson <gbenson@redhat.com>
253
254 * ax.h: Do not include server.h.
255 * gdbthread.h: Likewise.
256 * lynx-low.h: Likewise.
257 * notif.h: Likewise.
258
976411d6
GB
2592014-07-30 Gary Benson <gbenson@redhat.com>
260
261 * server.h: Include common-defs.h.
262 Do not include config.h or build-gnulib-gdbserver/config.h.
263
d41f6d8e
GB
2642014-07-30 Gary Benson <gbenson@redhat.com>
265
266 * hostio-errno.c: Move server.h to top of includes list.
267 * inferiors.c: Likewise.
268 * linux-x86-low.c: Likewise.
269 * notif.c: Include server.h.
270
314c6a35
TT
2712014-07-24 Tom Tromey <tromey@redhat.com>
272 Gary Benson <gbenson@redhat.com>
273
274 * server.h (CORE_ADDR): Now unsigned.
275
69ff6be5
PA
2762014-07-16 Pedro Alves <palves@redhat.com>
277
278 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
279
ce9e3fe7
PA
2802014-07-15 Pedro Alves <palves@redhat.com>
281
282 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
283 copy.
284
e76126e8
PA
2852014-07-11 Pedro Alves <palves@redhat.com>
286
287 * linux-low.c (kill_wait_lwp): New function, based on
288 kill_one_lwp_callback, but use my_waitpid directly.
289 (kill_one_lwp_callback, linux_kill): Use it.
290
8e9db26e
PA
2912014-06-23 Pedro Alves <palves@redhat.com>
292
293 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
294 before setting DR0..DR3.
295
698b3e08
GB
2962014-06-20 Gary Benson <gbenson@redhat.com>
297
298 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
299 * configure: Regenerated.
300 * config.in: Likewise.
301
125f8a3d
GB
3022014-06-20 Gary Benson <gbenson@redhat.com>
303
304 * Makefile.in (SFILES): Update locations for files moved
305 from common to nat.
306 (object file files): Reordered.
307
42995dbd
GB
3082014-06-20 Gary Benson <gbenson@redhat.com>
309
310 * i386-low.h (i386_dr_low_can_set_addr): Removed.
311 (i386_dr_low_set_addr): Likewise.
312 (i386_dr_low_get_addr): Likewise.
313 (i386_dr_low_can_set_control): Likewise.
314 (i386_dr_low_set_control): Likewise.
315 (i386_dr_low_get_control): Likewise.
316 (i386_dr_low_get_status): Likewise.
317 (i386_get_debug_register_length): Likewise.
318 * linux-x86-low.c (i386_dr_low_set_addr):
319 Changed signature. Made static.
320 (i386_dr_low_get_addr): Likewise.
321 (i386_dr_low_set_control): Likewise.
322 (i386_dr_low_get_control): Likewise.
323 (i386_dr_low_get_status): Likewise.
324 (i386_dr_low): New global variable.
325 * win32-i386-low.c (i386_dr_low_set_addr):
326 Changed signature. Made static.
327 (i386_dr_low_get_addr): Likewise.
328 (i386_dr_low_set_control): Likewise.
329 (i386_dr_low_get_control): Likewise.
330 (i386_dr_low_get_status): Likewise.
331 (i386_dr_low): New global variable.
332
e1d2394b
MS
3332014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
334
335 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
336 * Makefile.in (AR, AR_FLAGS): Define.
337 * configure: Regenerate.
338
3a8ee006
GB
3392014-06-19 Gary Benson <gbenson@redhat.com>
340
341 * Makefile.in (i386-dregs.o): New rule.
342 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
343 * i386-low.c (target.h): Remove include.
344 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
345 (DR_CONTROL_SHIFT): Likewise.
346 (DR_CONTROL_SIZE): Likewise.
347 (DR_RW_EXECUTE): Likewise.
348 (DR_RW_WRITE): Likewise.
349 (DR_RW_READ): Likewise.
350 (DR_RW_IORW): Likewise.
351 (DR_LEN_1): Likewise.
352 (DR_LEN_2): Likewise.
353 (DR_LEN_4): Likewise.
354 (DR_LEN_8): Likewise.
355 (DR_LOCAL_ENABLE_SHIFT): Likewise.
356 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
357 (DR_ENABLE_SIZE): Likewise.
358 (DR_LOCAL_SLOWDOWN): Likewise.
359 (DR_GLOBAL_SLOWDOWN): Likewise.
360 (DR_CONTROL_RESERVED): Likewise.
361 (I386_DR_CONTROL_MASK): Likewise.
362 (I386_DR_VACANT): Likewise.
363 (I386_DR_LOCAL_ENABLE): Likewise.
364 (I386_DR_GLOBAL_ENABLE): Likewise.
365 (I386_DR_DISABLE): Likewise.
366 (I386_DR_SET_RW_LEN): Likewise.
367 (I386_DR_GET_RW_LEN): Likewise.
368 (I386_DR_WATCH_HIT): Likewise.
369 (i386_wp_op_t): Likewise.
370 (i386_show_dr): Likewise.
371 (i386_length_and_rw_bits): Likewise.
372 (i386_insert_aligned_watchpoint): Likewise.
373 (i386_remove_aligned_watchpoint): Likewise.
374 (i386_handle_nonaligned_watchpoint): Likewise.
375 i386_update_inferior_debug_regs(): Likewise.
376 (i386_dr_insert_watchpoint): Likewise.
377 (i386_dr_remove_watchpoint): Likewise.
378 (i386_dr_region_ok_for_watchpoint): Likewise.
379 (i386_dr_stopped_data_address): Likewise.
380 (i386_dr_stopped_by_watchpoint): Likewise.
381
8f26655c
GB
3822014-06-19 Gary Benson <gbenson@redhat.com>
383
384 * i386-low.c (i386_dr_show): Renamed to
385 i386_show_dr and made static. All uses updated.
386 (i386_dr_length_and_rw_bits): Renamed to
387 i386_length_and_rw_bits and made static.
388 All uses updated.
389 (i386_dr_insert_aligned_watchpoint): Renamed to
390 i386_insert_aligned_watchpoint and made static.
391 All uses updated.
392 (i386_dr_remove_aligned_watchpoint): Renamed to
393 i386_remove_aligned_watchpoint and made static.
394 All uses updated.
395 (i386_dr_update_inferior_debug_regs): Renamed to
396 i386_update_inferior_debug_regs and made static.
397 All uses updated.
398
b9228891
GB
3992014-06-18 Gary Benson <gbenson@redhat.com>
400
5171def3
GB
401 * i386-low.h (i386_dr_low_can_set_addr): New macro.
402 (i386_dr_low_can_set_control): Likewise.
403 (i386_get_debug_register_length): Likewise.
404 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
405 (i386_dr_low_can_set_control): Likewise.
406 (i386_get_debug_register_length): Likewise.
407
4082014-06-17 Gary Benson <gbenson@redhat.com>
409
b9228891
GB
410 * i386-low.h (i386-dregs.h): New include.
411 (DR_FIRSTADDR): Now in i386-dregs.h.
412 (DR_LASTADDR): Likewise.
413 (DR_NADDR): Likewise.
414 (DR_STATUS): Likewise.
415 (DR_CONTROL): Likewise.
416 (i386_debug_reg_state): Likewise.
417 (i386_dr_insert_watchpoint): Likewise.
418 (i386_dr_remove_watchpoint): Likewise.
419 (i386_dr_region_ok_for_watchpoint): Likewise.
420 (i386_dr_stopped_data_address): Likewise.
421 (i386_dr_stopped_by_watchpoint): Likewise.
422 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
423
4be83cc2
GB
4242014-06-18 Gary Benson <gbenson@redhat.com>
425
426 * i386-low.h (i386_low_insert_watchpoint): Renamed to
427 i386_dr_insert_watchpoint.
428 (i386_low_remove_watchpoint): Renamed to
429 i386_dr_remove_watchpoint.
430 (i386_low_region_ok_for_watchpoint): Renamed to
431 i386_dr_region_ok_for_watchpoint.
432 (i386_low_stopped_data_address): Renamed to
433 i386_dr_stopped_data_address.
434 (i386_low_stopped_by_watchpoint): Renamed to
435 i386_dr_stopped_by_watchpoint.
436 * i386-low.c (i386_show_dr): Renamed to
437 i386_dr_show and made nonstatic. All uses updated.
438 (i386_length_and_rw_bits): Renamed to
439 i386_dr_length_and_rw_bits and made nonstatic.
440 All uses updated.
441 (i386_insert_aligned_watchpoint): Renamed to
442 i386_dr_insert_aligned_watchpoint and made nonstatic.
443 All uses updated.
444 (i386_remove_aligned_watchpoint): Renamed to
445 i386_dr_remove_aligned_watchpoint and made nonstatic.
446 All uses updated.
447 (i386_update_inferior_debug_regs): Renamed to
448 i386_dr_update_inferior_debug_regs and made nonstatic.
449 All uses updated.
450 (i386_low_insert_watchpoint): Renamed to
451 i386_dr_insert_watchpoint. All uses updated.
452 (i386_low_remove_watchpoint): Renamed to
453 i386_dr_remove_watchpoint. All uses updated.
454 (i386_low_region_ok_for_watchpoint): Renamed to
455 i386_dr_region_ok_for_watchpoint. All uses updated.
456 (i386_low_stopped_data_address): Renamed to
457 i386_dr_stopped_data_address. All uses updated.
458 (i386_low_stopped_by_watchpoint): Renamed to
459 i386_dr_stopped_by_watchpoint. All uses updated.
460
131aa0d4
GB
4612014-06-18 Gary Benson <gbenson@redhat.com>
462
463 * i386-low.c (i386_dr_low_can_set_addr): New macro.
464 (i386_dr_low_can_set_control): Likewise.
465 (i386_insert_aligned_watchpoint): New check.
466
d9305f7f
GB
4672014-06-18 Gary Benson <gbenson@redhat.com>
468
469 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
470 Renamed to state.
471
e927c9fc
GB
4722014-06-18 Gary Benson <gbenson@redhat.com>
473
474 * i386-low.c (i386_length_and_rw_bits): Use internal_error
475 instead of fatal and error.
476 (i386_handle_nonaligned_watchpoint): Likewise.
477
1b6d4134
GB
4782014-06-18 Gary Benson <gbenson@redhat.com>
479
480 * i386-low.c (i386_get_debug_register_length): New macro.
481 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
482 (i386_show_dr): Use debug_printf instead of fprintf. Use
483 phex to format values.
484
6e62758f
GB
4852014-06-18 Gary Benson <gbenson@redhat.com>
486
487 * i386-low.h: Comment changes.
488 * i386-low.c: Likewise.
489
fc6e2f03
GB
4902014-06-18 Gary Benson <gbenson@redhat.com>
491
492 * i386-low.c: Whitespace changes.
493
f9d1eeed
TT
4942014-06-12 Tom Tromey <tromey@redhat.com>
495
496 * utils.c (freeargv): Remove.
497
0b04e523
TT
4982014-06-12 Tom Tromey <tromey@redhat.com>
499
500 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
501 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
502 (parse_debug_format_options): Likewise.
503 (gdbserver_usage): Likewise.
504 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
505 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
506 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
507 against libiberty.
508 ($(LIBGNU)): Depend on libiberty.
509 (all-lib): Recurse into all subdirs.
510 (install-only): Invoke "install" target in subdirs.
511 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
512 targets.
513 * configure: Rebuild.
514 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
515 for vasprintf, vsnprintf, or gettimeofday.
516 * configure.srv: Don't add safe-ctype.o or lbasename.o to
517 srv_tgtobj.
518
270c9937
JB
5192014-06-05 Joel Brobecker <brobecker@adacore.com>
520
521 * development.sh: Delete.
522 * Makefile.in (config.status): Adjust dependency on development.sh.
523 * configure.ac: Adjust development.sh source call.
524 * configure: Regenerate.
525
0a261ed8
PA
5262014-06-02 Pedro Alves <palves@redhat.com>
527
528 * ax.c (gdb_free_agent_expr): New function.
529 * ax.h (gdb_free_agent_expr): New declaration.
530 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
531 list.
532 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
533 static.
534 (clear_breakpoint_conditions_and_commands): New function.
535 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
536 (clear_breakpoint_conditions_and_commands): New declaration.
537
e9dae05e
RR
5382014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
539
540 * linux-aarch64-low.c (asm/ptrace.h): Include.
541
5876f503
JK
5422014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
543
544 Fix TLS access for -static -pthread.
545 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
546 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
547 (thread_db_load_search, try_thread_db_load_1): Initialize it.
548
802e8e6d
PA
5492014-05-20 Pedro Alves <palves@redhat.com>
550
551 * linux-aarch64-low.c (aarch64_insert_point)
552 (aarch64_remove_point): No longer check whether the type is
553 supported here. Adjust to new interface.
554 (the_low_target): Install aarch64_supports_z_point_type as
555 supports_z_point_type method.
556 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
557 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
558 instead of a Z packet char. Adjust.
559 (arm_supports_z_point_type): New function.
560 (arm_insert_point, arm_remove_point): Adjust to new interface.
561 (the_low_target): Install arm_supports_z_point_type.
562 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
563 (cris_insert_point, cris_remove_point): Adjust to new interface.
564 Don't check whether the type is supported here.
565 (the_low_target): Install cris_supports_z_point_type.
566 * linux-low.c (linux_supports_z_point_type): New function.
567 (linux_insert_point, linux_remove_point): Adjust to new interface.
568 * linux-low.h (struct linux_target_ops) <insert_point,
569 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
570 raw_breakpoint pointer parameter.
571 <supports_z_point_type>: New method.
572 * linux-mips-low.c (mips_supports_z_point_type): New function.
573 (mips_insert_point, mips_remove_point): Adjust to new interface.
574 Use mips_supports_z_point_type.
575 (the_low_target): Install mips_supports_z_point_type.
576 * linux-ppc-low.c (the_low_target): Install NULL as
577 supports_z_point_type method.
578 * linux-s390-low.c (the_low_target): Install NULL as
579 supports_z_point_type method.
580 * linux-sparc-low.c (the_low_target): Install NULL as
581 supports_z_point_type method.
582 * linux-x86-low.c (x86_supports_z_point_type): New function.
583 (x86_insert_point): Adjust to new insert_point interface. Use
584 insert_memory_breakpoint. Adjust to new
585 i386_low_insert_watchpoint interface.
586 (x86_remove_point): Adjust to remove_point interface. Use
587 remove_memory_breakpoint. Adjust to new
588 i386_low_remove_watchpoint interface.
589 (the_low_target): Install x86_supports_z_point_type.
590 * lynx-low.c (lynx_target_ops): Install NULL as
591 supports_z_point_type callback.
592 * nto-low.c (nto_supports_z_point_type): New.
593 (nto_insert_point, nto_remove_point): Adjust to new interface.
594 (nto_target_ops): Install nto_supports_z_point_type.
595 * mem-break.c: Adjust intro comment.
596 (struct raw_breakpoint) <raw_type, size>: New fields.
597 <inserted>: Update comment.
598 <shlib_disabled>: Delete field.
599 (enum bkpt_type) <gdb_breakpoint>: Delete value.
600 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
601 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
602 (raw_bkpt_type_to_target_hw_bp_type): New function.
603 (find_enabled_raw_code_breakpoint_at): New function.
604 (find_raw_breakpoint_at): New type and size parameters. Use them.
605 (insert_memory_breakpoint): New function, based off
606 set_raw_breakpoint_at.
607 (remove_memory_breakpoint): New function.
608 (set_raw_breakpoint_at): Reimplement.
609 (set_breakpoint): New, based on set_breakpoint_at.
610 (set_breakpoint_at): Reimplement.
611 (delete_raw_breakpoint): Go through the_target->remove_point
612 instead of assuming memory breakpoints.
613 (find_gdb_breakpoint_at): Delete.
614 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
615 (find_gdb_breakpoint): New function.
616 (set_gdb_breakpoint_at): Delete.
617 (z_type_supported): New function.
618 (set_gdb_breakpoint_1): New function, loosely based off
619 set_gdb_breakpoint_at.
620 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
621 (delete_gdb_breakpoint_at): Delete.
622 (delete_gdb_breakpoint_1): New function, loosely based off
623 delete_gdb_breakpoint_at.
624 (delete_gdb_breakpoint): New function.
625 (clear_gdb_breakpoint_conditions): Rename to ...
626 (clear_breakpoint_conditions): ... this. Don't handle a NULL
627 breakpoint.
628 (add_condition_to_breakpoint): Make static.
629 (add_breakpoint_condition): Take a struct breakpoint pointer
630 instead of an address. Adjust.
631 (gdb_condition_true_at_breakpoint): Rename to ...
632 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
633 z_type parameter.
634 (gdb_condition_true_at_breakpoint): Reimplement.
635 (add_breakpoint_commands): Take a struct breakpoint pointer
636 instead of an address. Adjust.
637 (gdb_no_commands_at_breakpoint): Rename to ...
638 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
639 parameter. Return true if no breakpoint was found. Change debug
640 output.
641 (gdb_no_commands_at_breakpoint): Reimplement.
642 (run_breakpoint_commands): Rename to ...
643 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
644 and change return type to boolean.
645 (run_breakpoint_commands): New function.
646 (gdb_breakpoint_here): Also check for Z1 breakpoints.
647 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
648 breakpoint. Go through the_target->remove_point instead of
649 assuming memory breakpoint.
650 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
651 software and hardware breakpoints.
652 (reinsert_raw_breakpoint): Go through the_target->insert_point
653 instead of assuming memory breakpoint.
654 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
655 software and hardware breakpoints.
656 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
657 Check both software and hardware breakpoints.
658 (validate_inserted_breakpoint): Assert the breakpoint is a
659 software breakpoint. Set the inserted flag to -1 instead of
660 setting shlib_disabled.
661 (delete_disabled_breakpoints): Adjust.
662 (validate_breakpoints): Only validate software breakpoints.
663 Adjust to inserted flag change.
664 (check_mem_read, check_mem_write): Skip breakpoint types other
665 than software breakpoints. Adjust to inserted flag change.
666 * mem-break.h (enum raw_bkpt_type): New enum.
667 (raw_breakpoint, struct process_info): Forward declare.
668 (Z_packet_to_target_hw_bp_type): Delete declaration.
669 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
670 (set_gdb_breakpoint, delete_gdb_breakpoint)
671 (clear_breakpoint_conditions): New declarations.
672 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
673 (breakpoint_inserted_here): Update comment.
674 (add_breakpoint_condition, add_breakpoint_commands): Replace
675 address parameter with a breakpoint pointer parameter.
676 (gdb_breakpoint_here): Update comment.
677 (delete_gdb_breakpoint_at): Delete.
678 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
679 * server.c (process_point_options): Take a struct breakpoint
680 pointer instead of an address. Adjust.
681 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
682 delete_gdb_breakpoint.
683 * spu-low.c (spu_target_ops): Install NULL as
684 supports_z_point_type method.
685 * target.h: Include mem-break.h.
686 (struct target_ops) <prepare_to_access_memory>: Update comment.
687 <supports_z_point_type>: New field.
688 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
689 instead of a char. Also take a raw breakpoint pointer.
690 * win32-arm-low.c (the_low_target): Install NULL as
691 supports_z_point_type.
692 * win32-i386-low.c (i386_supports_z_point_type): New function.
693 (i386_insert_point, i386_remove_point): Adjust to new interface.
694 (the_low_target): Install i386_supports_z_point_type.
695 * win32-low.c (win32_supports_z_point_type): New function.
696 (win32_insert_point, win32_remove_point): Adjust to new interface.
697 (win32_target_ops): Install win32_supports_z_point_type.
698 * win32-low.h (struct win32_target_ops):
699 <supports_z_point_type>: New method.
700 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
701 instead of a char. Also take a raw breakpoint pointer.
702
932539e3
PA
7032014-05-20 Pedro Alves <palves@redhat.com>
704
705 * mem-break.h: Include break-common.h.
706 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
707 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
708 (Z_packet_to_target_hw_bp_type): New declaration.
709 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
710 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
711 (Z_PACKET_ACCESS_WP): Delete macros.
712 (Z_packet_to_hw_type): Delete function.
713 * i386-low.h: Don't include break-common.h here.
714 (Z_packet_to_hw_type): Delete declaration.
715 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
716 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
717 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
718 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
719 * linux-aarch64-low.c: Don't include break-common.h here.
720 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
721 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
722 (Z_packet_to_target_hw_bp_type): Delete function.
723 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
724 function.
725 (mips_insert_point, mips_remove_point): Use
726 Z_packet_to_target_hw_bp_type.
727
4ff0d3d8
PA
7282014-05-20 Pedro Alves <palves@redhat.com>
729
730 * linux-aarch64-low.c: Include break-common.h.
731 (enum target_point_type): Delete.
732 (Z_packet_to_point_type): Rename to ...
733 (Z_packet_to_target_hw_bp_type): ... this, and return a
734 target_hw_bp_type instead.
735 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
736 instead of an enum target_point_type.
737 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
738 breakpoint type.
739 (aarch64_dr_state_insert_one_point)
740 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
741 (aarch64_handle_aligned_watchpoint)
742 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
743 Take an enum target_hw_bp_type instead of an enum
744 target_point_type.
745 (aarch64_supports_z_point_type): New function.
746 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
747 use Z_packet_to_target_hw_bp_type.
748
786dc519
JB
7492014-05-20 Joel Brobecker <brobecker@adacore.com>
750
751 * configure.ac: Only use -Werror by default when DEVELOPMENT
752 is true.
753 * configure: Regenerate.
754
9e0aa64f
JK
7552014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
756
757 Fix gdbserver qGetTLSAddr for x86_64 -m32.
758 * linux-x86-low.c (X86_64_USER_REGS): New.
759 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
760
2b577b92
YQ
7612014-04-28 Yao Qi <yao@codesourcery.com>
762
763 * Makefile.in (i386-avx512.c): Fix the typo of generated file
764 name.
765
94611da2
PA
7662014-04-25 Pedro Alves <palves@redhat.com>
767
768 PR server/16255
769 * linux-low.c (linux_attach_fail_reason_string): New function.
770 (linux_attach_lwp): Delete.
771 (linux_attach_lwp_1): Rename to ...
772 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
773 argument. Remove "initial" parameter. Return int instead of
774 void. Don't error or warn here.
775 (linux_attach): Adjust to call linux_attach_lwp. Call error on
776 failure to attach to the tgid. Call warning when failing to
777 attach to an lwp.
778 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
779 argument. Remove "initial" parameter. Return int instead of
780 void. Don't error or warn here.
781 (linux_attach_fail_reason_string): New declaration.
782 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
783 interface change. Use linux_attach_fail_reason_string.
784
01f9f808
MS
7852014-04-24 Michael Sturm <michael.sturm@mintel.com>
786 Walfred Tedeschi <walfred.tedeschi@intel.com>
787
788 * Makefile.in: Added rules to handle new files
789 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
790 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
791 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
792 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
793 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
794 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
795 x32-avx512-linux.o.
796 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
797 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
798 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
799 i386/x32-avx512.xml.
800 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
801 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
802 i386/x32-avx512-linux.xml.
803 * i387-fp.c (num_avx512_k_registers): New constant for number
804 of K registers.
805 (num_avx512_zmmh_low_registers): New constant for number of
806 lower ZMM registers (0-15).
807 (num_avx512_zmmh_high_registers): New constant for number of
808 higher ZMM registers (16-31).
809 (num_avx512_ymmh_registers): New contant for number of higher
810 YMM registers (ymm16-31 added by avx521 on x86_64).
811 (num_avx512_xmm_registers): New constant for number of higher
812 XMM registers (xmm16-31 added by AVX512 on x86_64).
813 (struct i387_xsave): Add space for AVX512 registers.
814 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
815 Add code to handle AVX512 registers.
816 (i387_xsave_to_cache): Add code to handle AVX512 registers.
817 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
818 prototypei from generated file.
819 (tdesc_amd64_avx512_linux): Likewise.
820 (init_registers_x32_avx512_linux): Likewise.
821 (tdesc_x32_avx512_linux): Likewise.
822 (init_registers_i386_avx512_linux): Likewise.
823 (tdesc_i386_avx512_linux): Likewise.
824 (x86_64_regmap): Add AVX512 registers.
825 (x86_linux_read_description): Add code to handle AVX512 XSTATE
826 mask.
827 (initialize_low_arch): Add code to initialize AVX512 registers.
828
51aa91f9
PA
8292014-04-23 Pedro Alves <palves@redhat.com>
830
831 * mem-break.c (find_gdb_breakpoint_at): Make static.
832 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
833
a4165e94
PA
8342014-04-23 Pedro Alves <palves@redhat.com>
835
836 * i386-low.c: Don't include break-common.h here.
837 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
838 prototype to take target_hw_bp_type as argument instead of a Z
839 packet char.
840 * i386-low.h: Include break-common.h here.
841 (Z_packet_to_hw_type): Declare.
842 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
843 prototypes.
844 * linux-x86-low.c (x86_insert_point): Convert the packet number to
845 a target_hw_bp_type before calling i386_low_insert_watchpoint.
846 (x86_remove_point): Convert the packet number to a
847 target_hw_bp_type before calling i386_low_remove_watchpoint.
848 * win32-i386-low.c (i386_insert_point): Convert the packet number
849 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
850 (i386_remove_point): Convert the packet number to a
851 target_hw_bp_type before calling i386_low_remove_watchpoint.
852
b8acf843
PA
8532014-04-23 Pedro Alves <palves@redhat.com>
854
855 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
856
d708bcd1
PA
8572014-04-10 Pedro Alves <palves@redhat.com>
858
859 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
860 Check if the condition or command is NULL before checking if the
861 breakpoint is known. On success, return true.
862 * mem-break.h (add_breakpoint_condition): Document return.
863 (add_breakpoint_commands): Add describing comment.
864 * server.c (skip_to_semicolon): New function.
865 (process_point_options): Use it.
866
2eec7d5b
PA
8672014-04-09 Pedro Alves <palves@redhat.com>
868
869 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
870 to lwpid_of.
871
fa96cb38
PA
8722014-02-27 Pedro Alves <palves@redhat.com>
873
874 PR 12702
875 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
876 macros.
877 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
878 output.
879 (last_thread_of_process_p): Take a PID argument instead of a
880 thread pointer.
881 (linux_wait_for_lwp): Delete.
882 (num_lwps, check_zombie_leaders, not_stopped_callback): New
883 functions.
884 (linux_low_filter_event): New function, party factored out from
885 linux_wait_for_event.
886 (linux_wait_for_event): Rename to ...
887 (linux_wait_for_event_filtered): ... this. Add new filter ptid
888 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
889 sigsuspend. Check for zombie leaders.
890 (linux_wait_for_event): Reimplement as wrapper around
891 linux_wait_for_event_filtered.
892 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
893 a normal or signal exit is seen, it's the whole process exiting.
894 (wait_for_sigstop): No longer a for_each_inferior callback.
895 Rewrite on top of linux_wait_for_event_filtered.
896 (stop_all_lwps): Call wait_for_sigstop directly.
897 * server.c (resume, handle_target_event): Handle
898 TARGET_WAITKIND_NO_RESUMED.
899
d763de10
JB
9002014-02-26 Joel Brobecker <brobecker@adacore.com>
901
902 * win32-low.c (psapi_get_dll_name,
903 * win32_CreateToolhelp32Snapshot): Delete.
904 (win32_CreateToolhelp32Snapshot, win32_Module32First)
905 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
906 Delete.
907 (handle_load_dll): Add function description.
908 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
909
850a0f76
JB
9102014-02-26 Joel Brobecker <brobecker@adacore.com>
911
912 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
913 Add comment.
914 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
915 base address when calling win32_add_one_solib.
916 (handle_load_dll): Delete local variable load_addr.
917 Remove 0x1000 offset applied to DLL base address when calling
918 win32_add_one_solib.
919 (handle_unload_dll): Add comment.
920
f25b3fc3
JB
9212014-02-26 Joel Brobecker <brobecker@adacore.com>
922
923 * win32-low.c (win32_add_all_dlls): Renames
924 win32_ensure_ntdll_loaded. Rewrite function documentation.
925 Adjust implementation to always load all DLLs.
926 Add 0x1000 offset to DLL base address when calling
927 win32_add_one_solib.
928 (child_initialization_done): New static global.
929 (do_initial_child_stuff): Set child_initialization_done to
930 zero during child initialization, and 1 after. Replace call
931 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
932 Add comment.
933 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
934 (handle_unload_dll): Add function documentation.
935 (get_child_debug_event): Ignore load and unload DLL events
936 during child initialization.
937
d86d4aaf
DE
9382014-02-20 Doug Evans <dje@google.com>
939
3bc32da3 940 Remove global all_lwps.
d86d4aaf
DE
941 * inferiors.h (ptid_of): Move here from linux-low.h.
942 (pid_of, lwpid_of): Ditto.
943 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
944 parameter is a struct thread_info * now.
945 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
946 directly. Pass &all_threads to find_inferior instead of &all_lwps.
947 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
948 directly.
949 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
950 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
951 * linux-arm-low.c (update_registers_callback): Update, "entry"
952 parameter is a struct thread_info * now.
953 Fetch lwpid from current_inferior directly.
954 (arm_insert_point): Pass &all_threads to find_inferior instead of
955 &all_lwps.
956 (arm_remove_point): Ditto.
957 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
958 (arm_prepare_to_resume): Fetch pid from thread.
959 (arm_read_description): Fetch lwpid from current_inferior directly.
960 * linux-low.c (all_lwps): Delete.
961 (delete_lwp): Delete call to remove_inferior.
962 (handle_extended_wait): Fetch lwpid from thread.
963 (add_lwp): Don't set lwp->entry.id. Remove call to
964 add_inferior_to_list.
965 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
966 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
967 (kill_one_lwp_callback): Ditto.
968 (linux_kill): Don't dereference NULL pointer.
969 Fetch ptid,lwpid from thread.
970 (get_detach_signal): Fetch ptid from thread.
971 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
972 Simplify call to regcache_invalidate_thread.
973 (delete_lwp_callback): Update, "entry" parameter is a
974 struct thread_info * now. Fetch pid from thread.
975 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
976 (status_pending_p_callback): Update, "entry" parameter is a
977 struct thread_info * now. Fetch ptid from thread.
978 (find_lwp_pid): Update, "entry" parameter is a
979 struct thread_info * now.
980 (linux_wait_for_lwp): Fetch pid from thread.
981 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
982 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
983 (enqueue_one_deferred_signal): Fetch lwpid from thread.
984 (dequeue_one_deferred_signal): Ditto.
985 (cancel_breakpoint): Fetch ptid from current_inferior.
986 (linux_wait_for_event): Pass &all_threads to find_inferior,
987 not &all_lwps. Fetch ptid, lwpid from thread.
988 (count_events_callback): Update, "entry" parameter is a
989 struct thread_info * now.
990 (select_singlestep_lwp_callback): Ditto.
991 (select_event_lwp_callback): Ditto.
992 (cancel_breakpoints_callback): Ditto.
993 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
994 not &all_lwps.
995 (select_event_lwp): Ditto. Fetch ptid from event_thread.
996 (unsuspend_one_lwp): Update, "entry" parameter is a
997 struct thread_info * now.
998 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
999 not &all_lwps.
1000 (linux_stabilize_threads): Ditto. And for for_each_inferior.
1001 Fetch lwpid from thread, not lwp.
1002 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
1003 Pass &all_threads to find_inferior, not &all_lwps.
1004 (send_sigstop): Fetch lwpid from thread, not lwp.
1005 (send_sigstop_callback): Update, "entry" parameter is a
1006 struct thread_info * now.
1007 (suspend_and_send_sigstop_callback): Ditto.
1008 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
1009 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
1010 struct thread_info * now.
1011 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
1012 from thread, lwp.
1013 (lwp_running): Update, "entry" parameter is a
1014 struct thread_info * now.
1015 (stop_all_lwps): Fetch ptid from thread.
1016 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
1017 (linux_resume_one_lwp): Fetch lwpid from thread.
1018 (linux_set_resume_request): Update, "entry" parameter is a
1019 struct thread_info * now. Fetch pid, lwpid from thread.
1020 (resume_status_pending_p): Update, "entry" parameter is a
1021 struct thread_info * now.
1022 (need_step_over_p): Ditto. Fetch lwpid from thread.
1023 (start_step_over): Fetch lwpid from thread.
1024 (linux_resume_one_thread): Update, "entry" parameter is a
1025 struct thread_info * now. Fetch lwpid from thread.
1026 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
1027 (proceed_one_lwp): Update, "entry" parameter is a
1028 struct thread_info * now. Fetch lwpid from thread.
1029 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
1030 struct thread_info * now.
1031 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
1032 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
1033 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
1034 directly.
1035 (regsets_store_inferior_registers): Ditto.
1036 (fetch_register, store_register): Ditto.
1037 (linux_read_memory, linux_write_memory): Ditto.
1038 (linux_request_interrupt): Ditto.
1039 (linux_read_auxv): Ditto.
1040 (linux_xfer_siginfo): Ditto.
1041 (linux_qxfer_spu): Ditto.
1042 (linux_qxfer_libraries_svr4): Ditto.
1043 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
1044 moved to inferiors.h.
1045 (get_lwp): Delete.
1046 (get_thread_lwp): Update.
1047 (struct lwp_info): Delete member "entry". Simplify comment for
1048 member "thread".
1049 (all_lwps): Delete.
1050 * linux-mips-low.c (mips_read_description): Fetch lwpid from
1051 current_inferior directly.
1052 (update_watch_registers_callback): Update, "entry" parameter is a
1053 struct thread_info * now. Fetch pid from thread.
1054 (mips_linux_prepare_to_resume): Fetch ptid from thread.
1055 (mips_insert_point): Fetch lwpid from current_inferior.
1056 Pass &all_threads to find_inferior, not &all_lwps.
1057 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
1058 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
1059 directly.
1060 (mips_stopped_data_address): Ditto.
1061 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
1062 directly.
1063 * linux-tile-low.c (tile_arch_setup): Ditto.
1064 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
1065 (update_debug_registers_callback): Update, "entry" parameter is a
1066 struct thread_info * now. Fetch pid from thread.
1067 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
1068 Pass &all_threads to find_inferior, not &all_lwps.
1069 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
1070 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
1071 Pass &all_threads to find_inferior, not &all_lwps.
1072 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
1073 (i386_dr_low_get_status): Ditto.
1074 (x86_linux_prepare_to_resume): Fetch ptid from thread.
1075 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
1076 (x86_linux_read_description): Ditto.
1077 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
1078
3b8361aa
DE
10792014-02-20 Doug Evans <dje@google.com>
1080
1081 * inferiors.c (get_first_inferior): Fix buglet.
1082
f7667f0d
DE
10832014-02-19 Doug Evans <dje@google.com>
1084
1085 * gdbthread.h (add_thread): Change result type to struct thread_info *.
1086 * inferiors.c (add_thread): Change result type to struct thread_info *.
1087 All callers updated.
1088 (add_lwp): Call add_thread here instead of in callers.
1089 All callers updated.
1090 * linux-low.h (get_lwp_thread): Rewrite.
1091 (struct lwp_info): New member "thread".
1092
b3312d80
DE
10932014-02-19 Doug Evans <dje@google.com>
1094
1095 * linux-low.c (add_lwp): Change result to struct lwp_info *.
1096 All callers updated.
1097
ecc6f45c
DE
10982014-02-19 Doug Evans <dje@google.com>
1099
1100 * inferiors.c (add_thread): Fix whitespace.
1101
649ebbca
DE
11022014-02-19 Doug Evans <dje@google.com>
1103
1104 * dll.c (clear_dlls): Replace accessing list implemention details
1105 with API function.
1106 * gdbthread.h (get_first_thread): Declare.
1107 * inferiors.c (for_each_inferior_with_data): New function.
1108 (get_first_thread): New function.
1109 (find_thread_ptid): Simplify.
1110 (get_first_inferior): New function.
1111 (clear_list): Delete.
1112 (one_inferior_p): New function.
1113 (clear_inferior_list): New function.
1114 (clear_inferiors): Update.
1115 * inferiors.h (for_each_inferior_with_data): Declare.
1116 (clear_inferior_list): Declare.
1117 (one_inferior_p): Declare.
1118 (get_first_inferior): Declare.
1119 * linux-low.c (linux_wait_for_event): Replace accessing list
1120 implemention details with API function.
1121 * server.c (target_running): Ditto.
1122 (accumulate_file_name_length): New function.
1123 (emit_dll_description): New function.
1124 (handle_qxfer_libraries): Replace accessing list implemention
1125 details with API function.
1126 (handle_qxfer_threads_worker): New function.
1127 (handle_qxfer_threads_proper): Replace accessing list implemention
1128 details with API function.
1129 (handle_query): Ditto.
1130 (visit_actioned_threads_callback_ftype): New typedef.
1131 (visit_actioned_threads_data): New struct.
1132 (visit_actioned_threads): Rewrite to be find_inferior callback.
1133 (resume): Call find_inferior.
1134 (handle_status): Replace accessing list implemention
1135 details with API function.
1136 (process_serial_event): Replace accessing list implemention details
1137 with API function.
1138 * target.c (set_desired_inferior): Replace accessing list implemention
1139 details with API function.
1140 * tracepoint.c (same_process_p): New function.
1141 (gdb_agent_about_to_close): Replace accessing list implemention
1142 details with API function.
1143 * win32-low.c (child_delete_thread): Replace accessing list
1144 implemention details with API function.
1145 (match_dll_by_basename): New function.
1146 (dll_is_loaded_by_basename): New function.
1147 (win32_ensure_ntdll_loaded): Replace accessing list implemention
1148 details call to dll_is_loaded_by_basename.
1149
80894984
DE
11502014-02-19 Doug Evans <dje@google.com>
1151
1152 * dll.h (struct dll_info): Add comment.
1153 * gdbthread.h (struct thread_info): Add comment.
1154 (current_ptid): Simplify.
1155 * inferiors.c (add_process): Update.
1156 (remove_process): Update.
1157 * inferiors.h (struct process_info): Rename member "head" to "entry".
1158 * linux-low.c (delete_lwp): Update.
1159 (add_lwp): Update.
1160 (last_thread_of_process_p): Update.
1161 (kill_one_lwp_callback, linux_kill): Update.
1162 (status_pending_p_callback): Update.
1163 (wait_for_sigstop): Update. Simplify read of ptid.
1164 (start_step_over): Update.
1165 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
1166 (get_lwp_thread): Update.
1167 (struct lwp_info): Rename member "head" to "entry".
1168 * regcache.h (inferior_list_entry): Delete.
1169 * server.c (kill_inferior_callback): Update.
1170 (detach_or_kill_inferior_callback): Update.
1171 (print_started_pid): Update.
1172 (print_attached_pid): Update.
1173 (process_serial_event): Simplify read of ptid.
1174 * thread-db.c (thread_db_create_event): Update.
1175 (thread_db_get_tls_address): Update.
1176 * win32-low.c (current_inferior_ptid): Simplify.
1177
46917d26
TT
11782014-02-19 Tom Tromey <tromey@redhat.com>
1179
1180 * target.h (struct target_ops) <supports_btrace>: Add target_ops
1181 argument.
1182 (target_supports_btrace): Update.
1183
0759a81e
YQ
11842014-02-14 Yao Qi <yao@codesourcery.com>
1185
1186 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
1187 (rsp-low-ipa.o): New target.
1188
a7191e8b
TT
11892014-02-12 Tom Tromey <tromey@redhat.com>
1190
1191 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
1192 convert_ascii_to_int.
1193 * regcache.c (registers_to_string): Likewise.
1194 * remote-utils.c (decode_M_packet): Likewise.
1195 * server.c (process_serial_event): Likewise.
1196
ff0e980e
TT
11972014-02-12 Tom Tromey <tromey@redhat.com>
1198
1199 * server.c (handle_query, handle_v_run): Use hex2bin, not
1200 unhexify.
1201 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
1202
e9371aff
TT
12032014-02-12 Tom Tromey <tromey@redhat.com>
1204
1205 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
1206 convert_int_to_ascii.
1207 * regcache.c (registers_to_string, collect_register_as_string):
1208 Likewise.
1209 * remote-utils.c (look_up_one_symbol, relocate_instruction):
1210 Likewise.
1211 * server.c (process_serial_event): Likewise.
1212 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
1213 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
1214
971dc0b8
TT
12152014-02-12 Tom Tromey <tromey@redhat.com>
1216
1217 * remote-utils.c (look_up_one_symbol, monitor_output): Use
1218 bin2hex, not hexify.
1219 * tracepoint.c (cmd_qtstatus): Likewise.
1220
0a822afb
TT
12212014-02-12 Tom Tromey <tromey@redhat.com>
1222
1223 * remote-utils.c (monitor_output): Pass explicit length to
1224 hexify.
1225
9c3d6531
TT
12262014-02-12 Tom Tromey <tromey@redhat.com>
1227
1228 * tracepoint.c: Include rsp-low.h.
1229 * server.c: Include rsp-low.h.
1230 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
1231 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
1232 declare.
1233 * remote-utils.c: Include rsp-low.h.
1234 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
1235 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
1236 (convert_int_to_ascii, convert_ascii_to_int): Move to
1237 common/rsp-low.c.
1238 * regcache.c: Include rsp-low.h.
1239 * ax.c: Include rsp-low.h.
1240 * Makefile.in (SFILES): Add common/rsp-low.c.
1241 (OBS): Add rsp-low.o.
1242 (rsp-low.o): New target.
1243
01fd3ea5
TT
12442014-02-12 Tom Tromey <tromey@redhat.com>
1245
1246 * utils.h (pulongest, plongest, phex_nz): Don't declare.
1247 Include print-utils.h.
1248 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
1249 (plongest, thirty_two, phex_nz): Remove.
1250 * Makefile.in (SFILES): Add common/print-utils.c.
1251 (OBS): Add print-utils.o.
1252 (print-utils-ipa.o): New target.
1253 (print-utils.o): New target.
1254 (IPA_OBJS): Add print-utils-ipa.o.
1255
e99dc820
TT
12562014-02-06 Tom Tromey <tromey@redhat.com>
1257
1258 * Makefile.in (SFILES): Fix indentation.
1259
ee1e2d4f
DE
12602014-02-05 Doug Evans <dje@google.com>
1261
1262 * linux-low.c (linux_wait_for_event): Improve comment.
1263 (linux_wait_1): Keep current_inferior in sync with event_child.
1264
f5a02773
DE
12652014-01-22 Doug Evans <dje@google.com>
1266
1267 * gdbthread.h (gdb_id_to_thread): Delete, unused.
1268
87ce2a04
DE
12692014-01-22 Doug Evans <dje@google.com>
1270
1271 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
1272 * configure: Regenerate.
1273 * config.in: Regenerate.
1274 * Makefile.in (SFILES): Add debug.c.
1275 (OBS): Add debug.o.
1276 * debug.c: New file.
1277 * debug.h: New file.
1278 * linux-aarch64-low.c (*): Update all debugging printfs to use
1279 debug_printf instead of fprintf.
1280 * linux-arm-low.c (*): Ditto.
1281 * linux-cris-low.c (*): Ditto.
1282 * linux-crisv32-low.c (*): Ditto.
1283 * linux-m32r-low.c (*): Ditto.
1284 * linux-sparc-low.c (*): Ditto.
1285 * linux-x86.c (*): Ditto.
1286 * linux-low.c (*): Ditto.
1287 (linux_wait_1): Add calls to debug_enter, debug_exit.
1288 (linux_wait): Remove redundant debugging printf.
1289 (stop_all_lwps): Add calls to debug_enter, debug_exit.
1290 (linux_resume, unstop_all_lwps): Ditto.
1291 * mem-break.c (*): Update all debugging printfs to use
1292 debug_printf instead of fprintf.
1293 * remote-utils.c (*): Ditto.
1294 * thread-db.c (*): Ditto.
1295 * server.c #include <ctype.h>, "gdb_vecs.h".
1296 (debug_threads): Moved to debug.c.
1297 (*): Update all debugging printfs to use debug_printf instead of
1298 fprintf.
1299 (start_inferior): Replace call to fflush with call to debug_flush.
1300 (monitor_show_help): Mention set debug-format.
1301 (parse_debug_format_options): New function.
1302 (handle_monitor_command): Handle "monitor set debug-format".
1303 (gdbserver_usage): Mention --debug-format.
1304 (main): Parse --debug-format.
1305 * server.h (debug_threads): Declaration moved to debug.h.
1306 #include "debug.h".
1307 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
1308 trace_debug_1 that uses debug_printf.
1309 (tracepoint_look_up_symbols): Update all debugging printfs to use
1310 debug_printf instead of fprintf.
1311
e671835b
BS
13122014-01-20 Baruch Siach <baruch@tkos.co.il>
1313
1314 * linux-xtensa-low.c: Include asm/ptrace.h instead of
1315 sys/ptrace.h.
1316
b5737fa9
PA
13172014-01-17 Pedro Alves <palves@redhat.com>
1318
ea38d2a9 1319 PR build/16445
c7faa97a
PA
1320 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
1321 defined after including gdb_proc_service.h.
b5737fa9 1322
40ed484e
DE
13232014-01-16 Doug Evans <dje@google.com>
1324
1325 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
1326 (match_dll): Use it.
1327
969c39fb
MM
13282014-01-16 Markus Metzger <markus.t.metzger@intel.com>
1329
1330 * target.h (target_ops) <read_btrace>: Change parameters and
1331 return type to allow error reporting.
1332 * server.c (handle_qxfer_btrace): Support delta reads. Pass
1333 trace reading errors on.
1334 * linux-low.c (linux_low_read_btrace): Pass trace reading
1335 errors on.
1336 (linux_low_disable_btrace): New.
1337
ab7f45ba
DE
13382014-01-15 Doug Evans <dje@google.com>
1339
1340 * inferiors.c (thread_id_to_gdb_id): Delete.
1341 * inferiors.h (thread_id_to_gdb_id): Delete.
1342
66af0f44
EZ
13432014-01-13 Eli Zaretskii <eliz@gnu.org>
1344
1345 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
1346 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
1347 versions.
1348
9939e131
PA
13492014-01-08 Pedro Alves <palves@redhat.com>
1350
1351 * server.c (handle_status): Don't discard previous queued stop
1352 replies or thread's pending status here.
1353 (main) <disconnection>: Do it here instead.
1354
b7ea362b
PA
13552014-01-08 Pedro Alves <palves@redhat.com>
1356
1357 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
1358 * server.c (visit_actioned_threads, handle_pending_status): New
1359 function.
1360 (handle_v_cont): Factor out parts to ...
1361 (resume): ... this new function. If in all-stop, and a thread
1362 being resumed has a pending status, report it without actually
1363 resuming.
1364 (myresume): Adjust to use the new 'resume' function.
1365 (clear_pending_status_callback, set_pending_status_callback)
1366 (find_status_pending_thread_callback): New functions.
1367 (handle_status): Handle the case of multiple threads having
1368 interesting statuses to report. Report threads' real last signal
1369 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
1370 with an interesting thread to report the status for, instead of
1371 always reporting the status of the first thread.
1372
28498c42
JB
13732014-01-01 Joel Brobecker <brobecker@adacore.com>
1374
1375 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
1376 * gdbreplay.c (gdbreplay_version): Likewise.
1377
f45c82da
YZ
13782013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
1379
1380 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
1381 iov.iov_len with the real length in use.
1382
379a5e2d
JB
13832013-12-13 Joel Brobecker <brobecker@adacore.com>
1384
1385 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
1386 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
1387 for all targets that use win32-low.c.
1388 * win32-low.c (win32_ensure_ntdll_loaded): New function.
1389 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
1390
4210d83e
PA
13912013-12-13 Pedro Alves <palves@redhat.com>
1392
1393 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
1394 if equal to TARGET_WAITKIND_LOADED.
1395 * win32-low.c (cached_status): New static global.
1396 (win32_wait): Add declaration.
1397 (do_initial_child_stuff): Flush all initial pending debug events
1398 up to the initial breakpoint.
1399 (win32_wait): If CACHED_STATUS was set, return that instead
1400 of doing a real wait. Remove the code resuming the execution
1401 of the inferior after receiving a TARGET_WAITKIND_LOADED event
1402 during the initial phase. Also remove the code changing
1403 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
1404 TARGET_WAITKIND_STOPPED.
1405
e7f0d979
YQ
14062013-12-11 Yao Qi <yao@codesourcery.com>
1407
1408 * notif.c (handle_notif_ack): Return 0 if no notification
1409 matches.
1410
ebcf782c
DE
14112013-11-20 Doug Evans <dje@google.com>
1412
1413 * linux-low.c (linux_set_resume_request): Fix comment.
1414
20ad9378
DE
14152013-11-20 Doug Evans <dje@google.com>
1416
1417 * linux-low.c (resume_status_pending_p): Tweak comment.
1418
a196ebeb
WT
14192013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
1420
1421 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
1422 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
1423 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
1424 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
1425 (srv_amd64_regobj): Add amd64-mpx.o.
1426 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
1427 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
1428 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
1429 * i387-fp.c (num_pl_bnd_register) Added constant.
1430 (num_pl_bnd_cfg_registers) Added constant.
1431 (struct i387_xsave) Added reserved area and MPX fields.
1432 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
1433 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
1434 function.
1435 (tdesc_i386_mpx_linux): Add MPX amd64 target.
1436 (init_registers_amd64_mpx_linux): Declare new function.
1437 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
1438 (x86_64_regmap): Add MPX registers.
1439 (x86_linux_read_description): Add MPX case.
1440 (initialize_low_arch): Initialize MPX targets.
1441
0080a2f6
TT
14422013-11-18 Tom Tromey <tromey@redhat.com>
1443
1444 * configure: Rebuild.
1445 * configure.ac: Don't check for stdlib.h.
1446 * gdbreplay.c: Unconditionally include stdlib.h.
1447
2978b111
TT
14482013-11-18 Tom Tromey <tromey@redhat.com>
1449
1450 * config.in: Rebuild.
1451 * configure: Rebuild.
1452 * configure.ac: Don't use AC_HEADER_DIRENT.
1453
a3d08894
TT
14542013-11-18 Tom Tromey <tromey@redhat.com>
1455
1456 * server.h: Don't check HAVE_STRING_H.
1457 * gdbreplay.c: Don't check HAVE_STRING_H.
1458 * configure: Rebuild.
1459
0a5dd17d
TT
14602013-11-18 Tom Tromey <tromey@redhat.com>
1461
1462 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
1463 LIBGNU.
1464
1bd2f0ba
TT
14652013-11-08 Tom Tromey <tromey@redhat.com>
1466
1467 * configure, config.in: Rebuild.
1468 * configure.ac: Remove unused configury.
1469
3266f10b
TT
14702013-11-08 Tom Tromey <tromey@redhat.com>
1471
1472 * acinclude.m4: Include common.m4, codeset.m4.
1473 * configure, config.in: Rebuild.
1474 * configure.ac: Use GDB_AC_COMMON.
1475
6682d959
AA
14762013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
1477
1478 * linux-s390-low.c (HWCAP_S390_TE): New define.
1479 (s390_arch_setup): Consider the TE field in the HWCAP for
1480 determining 'have_regset_tdb'.
1481
fd0a4d76
SDJ
14822013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
1483
1484 PR gdb/16014
1485 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
1486 call to sizeof.
1487
1a3d890b
PA
14882013-10-02 Pedro Alves <palves@redhat.com>
1489
1490 * server.c (process_serial_event): Don't output "GDBserver
1491 exiting" if GDB is connected through stdio.
1492 * target.c (mywait): Likewise, be silent if GDB is connected
1493 through stdio.
1494
97ad4581
JB
14952013-10-01 Joel Brobecker <brobecker@adacore.com>
1496
1497 * lynx-low.c (lynx_add_threads_after_attach): New function.
1498 (lynx_attach): Remove call to add_thread. Add call to
1499 lynx_add_threads_after_attach instead.
1500
5b4e221c
MF
15012013-09-28 Mike Frysinger <vapier@gentoo.org>
1502
1503 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
1504 * config.in, configure: Regenerated.
1505
ee47b2f8
YQ
15062013-09-18 Yao Qi <yao@codesourcery.com>
1507
1508 PR server/15959
1509 * server.c (start_inferior): Clear 'resume_info'.
1510
d6707650 15112013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 1512
d6707650
JW
1513 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
1514 for each register.
1515
9243dd0e 15162013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 1517
9243dd0e
JW
1518 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
1519 linux-tile-low.o to srv_tgtobj.
1520
c623a6ef
WN
15212013-09-16 Will Newton <will.newton@linaro.org>
1522
1523 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
1524 out regs.
1525
fb71d39e
PA
15262013-09-06 Pedro Alves <palves@redhat.com>
1527
1528 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
1529 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
1530 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
1531 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
1532 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
1533 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
1534
8e7e9910
PA
15352013-09-06 Pedro Alves <palves@redhat.com>
1536
1537 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
1538 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
1539
7c3a12ca
PA
15402013-09-06 Pedro Alves <palves@redhat.com>
1541
1542 * linux-amd64-ipa.c: Include tracepoint.h.
1543 * linux-i386-ipa.c: Include tracepoint.h.
1544
8eb3d7b6
RW
15452013-09-06 Ricard Wanderlof <ricardw@axis.com>
1546
1547 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
1548 (ps_get_thread_area): New function.
1549
eddddb9d
RW
15502013-09-06 Ricard Wanderlof <ricardw@axis.com>
1551
1552 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
1553 (initialize_low_arch): Call init_registers_crisv32 rather than
1554 init_register_crisv32.
1555
533b0600
PA
15562013-09-05 Pedro Alves <palves@redhat.com>
1557
1558 * server.h (handle_vFile, hostio_last_error_from_errno): Move
1559 to ...
1560 * hostio.h: ... this new file.
1561 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
1562 win32-low.c: Include hostio.h.
1563
0ce3d3b5
PA
15642013-09-05 Pedro Alves <palves@redhat.com>
1565
1566 * server.h (gdb_client_data, handler_func, callback_handler_func)
1567 (delete_file_handler, add_file_handler, append_callback_event)
1568 (delete_callback_event, start_event_loop, initialize_event_loop):
1569 Move to event-loop.h and include it.
1570 * event-loop.h: New file.
1571
799cdc37
PA
15722013-09-05 Pedro Alves <palves@redhat.com>
1573
1574 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
1575 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
1576 (loaded_dll, unloaded_dll): Move to ...
1577 * dll.h: ... this new file.
1578 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
1579
6a6bbd9d
PA
15802013-09-05 Pedro Alves <palves@redhat.com>
1581
1582 * server.h (current_process, get_thread_process, all_processes)
1583 (add_inferior_to_list, for_each_inferior, current_inferior)
1584 (remove_inferior, add_process, remove_process, find_process_pid)
1585 (have_started_inferiors_p, have_attached_inferiors_p)
1586 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
1587 (clear_inferiors, find_inferior, find_inferior_id)
1588 (inferior_target_data, set_inferior_target_data)
1589 (inferior_regcache_data, set_inferior_regcache_data): Move to
1590 inferiors.h, and include it.
1591 * inferiors.h: New file.
1592
f699aaba
PA
15932013-09-05 Pedro Alves <palves@redhat.com>
1594
1595 * server.h (struct emit_ops, current_insn_ptr, emit_error):
1596 Move ...
1597 * ax.h: ... here.
1598
c144c7a0
PA
15992013-09-05 Pedro Alves <palves@redhat.com>
1600
1601 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
1602 tracepoint.h.
1603 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
1604 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
1605 (handle_tracepoint_general_set, handle_tracepoint_query)
1606 (tracepoint_finished_step, tracepoint_was_hit)
1607 (release_while_stepping_state_list, current_traceframe)
1608 (in_readonly_region, traceframe_read_mem)
1609 (fetch_traceframe_registers, traceframe_read_sdata)
1610 (traceframe_read_info, struct fast_tpoint_collect_status)
1611 (fast_tracepoint_collecting, force_unlock_trace_buffer)
1612 (handle_tracepoit_bkpts, initialize_low_tracepoint)
1613 (supply_fast_tracepoint_registers)
1614 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
1615 (ipa_tdesc, claim_trampoline_space)
1616 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
1617 (agent_mem_read, agent_get_trace_state_variable_value)
1618 (agent_set_trace_state_variable_value, agent_tsv_read)
1619 (agent_mem_read_string, get_raw_reg_func_addr)
1620 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
1621 * tracepoint.h: ... this new file.
1622
ff42e6ab
PA
16232013-09-05 Pedro Alves <palves@redhat.com>
1624
1625 * server.h (perror_with_name, error, fatal, warning, paddress)
1626 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
1627 include it.
1628 * utils.h: New file.
1629
541af0f4
PA
16302013-09-05 Pedro Alves <palves@redhat.com>
1631
1632 * server.h (remote_debug, noack_mode, transport_is_reliable)
1633 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
1634 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
1635 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
1636 (write_enn, initialize_async_io, enable_async_io)
1637 (disable_async_io, check_remote_input_interrupt_request)
1638 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
1639 (dead_thread_notify, prepare_resume_reply)
1640 (decode_address_to_semicolon, decode_address, decode_m_packet)
1641 (decode_M_packet, decode_X_packet, decode_xfer_write)
1642 (decode_search_memory_packet, unhexify, hexify)
1643 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
1644 (look_up_one_symbol, relocate_instruction)
1645 (monitor_output): Move to remote-utils.h, and include it.
1646 * remote-utils.h: New file.
1647
eebdf26b
PA
16482013-09-05 Pedro Alves <palves@redhat.com>
1649
1650 * server.h (_): Delete.
1651
3aafd2ff
PA
16522013-09-02 Pedro Alves <palves@redhat.com>
1653
1654 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
1655 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
1656 allocated.
1657 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
1658
cee83bcb
PM
16592013-09-02 Pierre Muller <muller@sourceware.org>
1660
1661 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
1662 or WriteProcessMemory complete successfully and handle
1663 ERROR_PARTIAL_COPY error.
1664
9a13b2fa
PA
16652013-09-02 Pedro Alves <palves@redhat.com>
1666
1667 * server.c (gdb_read_memory): Return -1 on traceframe memory read
1668 error instead of EIO.
1669
602e3198
JK
16702013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
1671
1672 PR server/15604
1673 * linux-low.c: Include filestuff.h.
1674 (linux_create_inferior) <pid == 0>: Call close_most_fds.
1675 * lynx-low.c: Include filestuff.h.
1676 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
1677 * server.c: Include filestuff.h.
1678 (main): Call notice_open_fds.
1679 * spu-low.c: Include filestuff.h.
1680 (spu_create_inferior) <pid == 0>: Call close_most_fds.
1681
96d7229d
LM
16822013-08-22 Luis Machado <lgustavo@codesourcery.com>
1683
1684 * Makefile.in: Explain why ../target and ../nat are not
1685 listed as include file search paths.
1686 (linux-waitpid.o): New object file rule.
1687 * configure.srv (srv_native_linux_obj): New variable.
1688 Replace all occurrences of linux native object files with
1689 $srv_native_linux_obj.
1690 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
1691 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
1692 (linux_enable_event_reporting): Remove declaration.
1693 (my_waitpid): Moved to common/linux-waitpid.c.
1694 (linux_wait_for_event): Pass ptid when calling
1695 linux_enable_event_reporting.
1696 (linux_supports_tracefork_flag): Remove.
1697 (linux_enable_event_reporting): Likewise.
1698 (linux_tracefork_grandchild): Remove.
1699 (STACK_SIZE): Moved to common/linux-ptrace.c.
1700 (linux_tracefork_child): Remove.
1701 (linux_test_for_tracefork): Remove.
1702 (linux_look_up_symbols): Call linux_supports_traceclone.
1703 (initialize_low): Remove call to linux_test_for_tracefork.
1704 * linux-low.h (PTRACE_TYPE_ARG3): Move to
1705 common/linux-ptrace.h.
1706 (PTRACE_TYPE_ARG4): Likewise.
1707 Include linux-ptrace.h.
1708
32940073
PA
17092013-08-21 Pedro Alves <palves@redhat.com>
1710
1711 * config.in: Renegerate.
1712
33b60d58 17132013-08-19 Luis Machado <lgustavo@codesourcery.com>
a261b8f5 1714
33b60d58
LM
1715 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
1716 (SFILES): Remove $(srcdir)/common/target-common.c and
1717 add $(srcdir)/target/waitstatus.c.
1718 (OBS): Remove target-common.o and add waitstatus.o.
1719 (server_h): Remove $(srcdir)/../common/target-common.h and
1720 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
1721 and $(srcdir)/../target/waitstatus.h.
1722 (target-common.o): Remove.
1723 (waitstatus.o): New target object file.
1724 * target.h: Do not include target-common.h and
1725 include target/resume.h, target/wait.h and
1726 target/waitstatus.h.
1727
b8e1b30e
LM
17282013-08-13 Luis Machado <lgustavo@codesourcery.com>
1729
1730 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
1731 to PTRACE_TYPE_ARG3.
1732 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
1733 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
1734 PTRACE_TYPE_ARG4.
1735 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
1736 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
1737
7a60ad40
YQ
17382013-07-27 Jie Zhang <jie@codesourcery.com>
1739 Daniel Jacobowitz <dan@codesourcery.com>
1740 Yao Qi <yao@codesourcery.com>
1741
1742 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
1743 (mips-linux-watch.o): New rule.
1744 (mips_linux_watch_h): New variable.
1745 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
1746 srv_tgtobj.
1747 * linux-mips-low.c: Include mips-linux-watch.h.
1748 (struct arch_process_info, struct arch_lwp_info): New.
1749 (update_watch_registers_callback): New function.
1750 (mips_linux_new_process, mips_linux_new_thread) New functions.
1751 (mips_linux_prepare_to_resume, mips_insert_point): New
1752 functions.
1753 (mips_remove_point, mips_stopped_by_watchpoint): New
1754 functions.
1755 (rsp_bp_type_to_target_hw_bp_type): New function.
1756 (mips_stopped_data_address): New function.
1757 (the_low_target): Add watchpoint support functions.
1758
de6f69ad
YQ
17592013-07-27 Yao Qi <yao@codesourcery.com>
1760
1761 * i386-low.c: Include break-common.h.
1762 (enum target_hw_bp_type): Remove.
1763
3360c0bf
LM
17642013-07-24 Luis Machado <lgustavo@codesourcery.com>
1765
1766 * Makefile.in (SFILES): /common/target-common.c.
1767 (OBS): Add target-common.o.
1768 (server_h): Add $(srcdir)/../common/target-common.h.
1769 (target-common.o): New target.
1770 * server.c (queue_stop_reply_callback): Free
1771 status string after use.
1772 * target.c (target_waitstatus_to_string): Remove.
1773 * target.h: Include target-common.h.
1774 (resume_kind): Likewise.
1775 (target_waitkind): Likewise.
1776 (target_waitstatus): Likewise.
1777 (TARGET_WNOHANG): Likewise.
1778
bd885420
YQ
17792013-07-04 Yao Qi <yao@codesourcery.com>
1780
1781 * Makefile.in (host_alias): Use @host_noncanonical@.
1782 (target_alias): Use @target_noncanonical@.
1783 * configure.ac: Use ACX_NONCANONICAL_TARGET and
1784 ACX_NONCANONICAL_HOST.
1785 * configure: Regenerated.
1786
1787 Revert:
1788 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
1789
1790 * configure.ac (version_host, version_target): Set and AC_SUBST them.
1791 * configure: Rebuild.
1792 * Makefile.in (version_host, version_target): Get from configure.
1793 (version.c): Use $(version_host) and $(version_target).
1794
17ef446e
PA
17952013-07-03 Pedro Alves <palves@redhat.com>
1796
1797 * Makefile.in (config.status): Depend on development.sh.
1798 * acinclude.m4: Include libmcheck.m4.
1799 * configure: Regenerate.
1800
7a9a7487
MG
18012013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
1802
1803 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
1804 attribute inside the parentheses.
1805 (winapi_DebugSetProcessKillOnExit): Ditto.
1806 (winapi_DebugBreakProcess): Ditto.
1807 (winapi_GenerateConsoleCtrlEvent): Ditto.
a261b8f5 1808
49b64de6
MG
18092013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
1810
1811 * notif.h (notif_event): Add a dummy member to avoid compiler
1812 errors.
1813
d5749ee7
PA
18142013-07-01 Pedro Alves <palves@redhat.com>
1815
1816 * hostio.c (HOSTIO_PATH_MAX): Define.
1817 (require_filename, handle_open, handle_unlink, handle_readlink):
1818 Use it.
1819
d8d2a3ee
PA
18202013-07-01 Pedro Alves <palves@redhat.com>
1821
1822 * server.h: Include "pathmax.h".
1823 * linux-low.c: Don't include sys/param.h.
1824 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
1825 MAXPATHLEN.
1826 * win32-low.c: Don't include sys/param.h.
1827 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
1828
bc7dea8d
PA
18292013-07-01 Pedro Alves <palves@redhat.com>
1830
1831 * event-loop.c: Don't check HAVE_UNISTD_H before including
1832 <unistd.h>.
1833 * gdbreplay.c: Likewise.
1834 * remote-utils.c: Likewise.
1835 * server.c: Likewise.
1836 * configure.ac: Don't check for unistd.h.
1837 * configure: Regenerate.
1838
d6c2da54
TT
18392013-06-28 Tom Tromey <tromey@redhat.com>
1840
1841 * Makefile.in (version.c): Use version.in, not
1842 common/version.in.
1843
257b6bec
MG
18442013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
1845
1846 * configure.ac (version_host, version_target): Set and AC_SUBST them.
1847 * configure: Rebuild.
1848 * Makefile.in (version_host, version_target): Get from configure.
1849 (version.c): Use $(version_host) and $(version_target).
1850
86ebe149
DK
18512013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
1852
1853 Fix trace-status to output user name without trailing colon.
1854 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
1855
f30aa5af
DK
18562013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
1857
1858 Fix trace-status to output proper start-time and stop-time.
1859 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
1860 output start time and stop time in hex as gdb expects.
1861
28a93511
YQ
18622013-06-26 Pedro Alves <pedro@codesourcery.com>
1863
1864 * tracepoint.c (build_traceframe_info_xml): Output trace state
1865 variables present in the trace buffer.
1866
01208463
TT
18672013-06-24 Tom Tromey <tromey@redhat.com>
1868
1869 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
1870 create-version.sh.
1871 (version.o): Remove.
1872 * gdbreplay.c: Include version.h.
1873 (version, host_name): Don't declare.
1874 * server.h: Include version.h.
1875 (version, host_name): Don't declare.
1876
760256f9
PA
18772013-06-12 Pedro Alves <palves@redhat.com>
1878
1879 * linux-x86-low.c (linux_is_elf64): Delete global.
1880 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
1881 with local linux_pid_exe_is_elf_64_file use.
1882
030031ee
PA
18832013-06-11 Pedro Alves <palves@redhat.com>
1884
1885 * linux-low.c (regset_disabled, disable_regset): New functions.
1886 (regsets_fetch_inferior_registers)
1887 (regsets_store_inferior_registers): Use them.
1888 (initialize_regsets_info); Don't allocate the disabled_regsets
1889 array here.
1890 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
1891 comment.
1892
5da6eb0a
PA
18932013-06-11 Pedro Alves <palves@redhat.com>
1894
1895 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
1896 xmalloc.
1897
7e5aaa09
PA
18982013-06-11 Pedro Alves <palves@redhat.com>
1899
1900 * linux-x86-low.c (initialize_low_arch): Call
1901 init_registers_x32_avx_linux.
1902
d878444c
JK
19032013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
1904
1905 Fix compatibility with Android Bionic.
1906 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
1907 it is not empty.
1908
3aee8918
PA
19092013-06-07 Pedro Alves <palves@redhat.com>
1910
5f2b57b5 1911 PR server/14823
3aee8918
PA
1912 * Makefile.in (OBS): Add tdesc.o.
1913 (IPA_OBJS): Add tdesc-ipa.o.
1914 (tdesc-ipa.o): New rule.
1915 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
1916 interface.
1917 * linux-low.c (new_inferior): Delete.
1918 (disabled_regsets, num_regsets): Delete.
1919 (linux_add_process): Adjust to set the new per-process
1920 new_inferior flag.
1921 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
1922 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
1923 was a stop. When calling arch_setup, switch the current inferior
1924 to the thread that got an event.
1925 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
1926 (regsets_fetch_inferior_registers)
1927 (regsets_store_inferior_registers): New regsets_info parameter.
1928 Adjust to use it.
1929 (linux_register_in_regsets): New regs_info parameter. Adjust to
1930 use it.
1931 (register_addr, fetch_register, store_register): New usrregs_info
1932 parameter. Adjust to use it.
1933 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
1934 parameter regs_info. Adjust to use it.
1935 (linux_fetch_registers): Get the current inferior's regs_info, and
1936 adjust to use it.
1937 (linux_store_registers): Ditto.
1938 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
1939 (initialize_low): Don't initialize the target_regsets here. Call
1940 initialize_low_arch.
1941 * linux-low.h (target_regsets): Delete declaration.
1942 (struct regsets_info): New.
1943 (struct usrregs_info): New.
1944 (struct regs_info): New.
1945 (struct process_info_private) <new_inferior>: New field.
1946 (struct linux_target_ops): Delete the num_regs, regmap, and
1947 regset_bitmap fields. New field regs_info.
1948 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
1949 * i387-fp.c (num_xmm_registers): Delete.
1950 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
1951 calls to new interface.
1952 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
1953 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
1954 Infer the number of xmm registers from the regcache's target
1955 description.
1956 * i387-fp.h (num_xmm_registers): Delete.
1957 * inferiors.c (add_thread): Don't install the thread's regcache
1958 here.
1959 * proc-service.c (gregset_info): Fetch the current inferior's
1960 regs_info. Adjust to use it.
1961 * regcache.c: Include tdesc.h.
1962 (register_bytes, reg_defs, num_registers)
1963 (gdbserver_expedite_regs): Delete.
1964 (get_thread_regcache): If the thread doesn't have a regcache yet,
1965 create one, instead of aborting gdbserver.
1966 (regcache_invalidate_one): Rename to ...
1967 (regcache_invalidate_thread): ... this.
1968 (regcache_invalidate_one): New.
1969 (regcache_invalidate): Only invalidate registers of the current
1970 process.
1971 (init_register_cache): Add target_desc parameter, and use it.
1972 (new_register_cache): Ditto. Assert the target description has a
1973 non zero registers_size.
1974 (regcache_cpy): Add assertions. Adjust.
1975 (realloc_register_cache, set_register_cache): Delete.
1976 (registers_to_string, registers_from_string): Adjust.
1977 (find_register_by_name, find_regno, find_register_by_number)
1978 (register_cache_size): Add target_desc parameter, and use it.
1979 (free_register_cache_thread, free_register_cache_thread_one)
1980 (regcache_release, register_cache_size): New.
1981 (register_size): Add target_desc parameter, and use it.
1982 (register_data, supply_register, supply_register_zeroed)
1983 (supply_regblock, supply_register_by_name, collect_register)
1984 (collect_register_as_string, collect_register_by_name): Adjust.
1985 * regcache.h (struct target_desc): Forward declare.
1986 (struct regcache) <tdesc>: New field.
1987 (init_register_cache, new_register_cache): Add target_desc
1988 parameter.
1989 (regcache_invalidate_thread): Declare.
1990 (regcache_invalidate_one): Delete declaration.
1991 (regcache_release): Declare.
1992 (find_register_by_number, register_cache_size, register_size)
1993 (find_regno): Add target_desc parameter.
1994 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
1995 declarations.
1996 * remote-utils.c: Include tdesc.h.
1997 (outreg, prepare_resume_reply): Adjust.
1998 * server.c: Include tdesc.h.
1999 (gdbserver_xmltarget): Delete declaration.
2000 (get_features_xml, process_serial_event): Adjust.
2001 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
2002 declare.
2003 (struct process_info) <tdesc>: New field.
2004 (ipa_tdesc): Declare.
2005 * tdesc.c: New file.
2006 * tdesc.h: New file.
2007 * tracepoint.c: Include tdesc.h.
2008 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
2009 (get_context_regcache): Adjust to pass ipa_tdesc down.
2010 (do_action_at_tracepoint): Adjust to get the register cache size
2011 from the context regcache's description.
2012 (traceframe_walk_blocks): Adjust to get the register cache size
2013 from the current trace frame's description.
2014 (traceframe_get_pc): Adjust to get current trace frame's
2015 description and pass it down.
2016 (gdb_collect): Adjust to get the register cache size from the
2017 IPA's description.
2018 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
2019 (gdbserver_xmltarget): Delete.
2020 (initialize_low_tracepoint): Set the ipa's target description.
2021 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
2022 (initialize_low_tracepoint): Set the ipa's target description.
2023 * linux-x86-low.c: Include tdesc.h.
2024 [__x86_64__] (is_64bit_tdesc): New.
2025 (ps_get_thread_area, x86_get_thread_area): Use it.
2026 (i386_cannot_store_register): Rename to ...
2027 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
2028 (i386_cannot_fetch_register): Rename to ...
2029 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
2030 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
2031 to new interface.
2032 (target_regsets): Rename to ...
2033 (x86_regsets): ... this.
2034 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
2035 interface.
2036 (x86_siginfo_fixup): Use is_64bit_tdesc.
2037 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
2038 (tdesc_x32_avx_linux, tdesc_x32_linux)
2039 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
2040 Declare.
2041 (x86_linux_update_xmltarget): Delete.
2042 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
2043 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
2044 (AMD64_LINUX_USER64_CS): New.
2045 (x86_linux_read_description): New, based on
2046 x86_linux_update_xmltarget.
2047 (same_process_callback): New.
2048 (x86_arch_setup_process_callback): New.
2049 (x86_linux_update_xmltarget): New.
2050 (x86_regsets_info): New.
2051 (amd64_linux_regs_info): New.
2052 (i386_linux_usrregs_info): New.
2053 (i386_linux_regs_info): New.
2054 (x86_linux_regs_info): New.
2055 (x86_arch_setup): Reimplement.
2056 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
2057 (x86_emit_ops): Ditto.
2058 (the_low_target): Adjust. Install x86_linux_regs_info,
2059 x86_cannot_fetch_register, and x86_cannot_store_register.
2060 (initialize_low_arch): New.
2061 * linux-ia64-low.c (tdesc_ia64): Declare.
2062 (ia64_fetch_register): Adjust.
2063 (ia64_usrregs_info, regs_info): New globals.
2064 (ia64_regs_info): New function.
2065 (the_low_target): Adjust.
2066 (initialize_low_arch): New function.
2067 * linux-sparc-low.c (tdesc_sparc64): Declare.
2068 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
2069 Adjust.
2070 (sparc_arch_setup): New function.
2071 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
2072 (the_low_target): Adjust.
2073 (initialize_low_arch): New function.
2074 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
2075 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
2076 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
2077 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
2078 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
2079 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
2080 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
2081 (tdesc_powerpc_isa205_vsx64l): Declare.
2082 (ppc_cannot_store_register, ppc_collect_ptrace_register)
2083 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
2084 (ppc_set_pc, ppc_get_hwcap): Adjust.
2085 (ppc_usrregs_info): Forward declare.
2086 (!__powerpc64__) ppc_regmap_adjusted: New global.
2087 (ppc_arch_setup): Adjust to the current process'es target
2088 description.
2089 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
2090 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
2091 (ppc_store_evrregset): Adjust.
2092 (target_regsets): Rename to ...
2093 (ppc_regsets): ... this, and make static.
2094 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
2095 (ppc_regs_info): New function.
2096 (the_low_target): Adjust.
2097 (initialize_low_arch): New function.
2098 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
2099 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
2100 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
2101 (tdesc_s390x_linux64v2): Declare.
2102 (s390_collect_ptrace_register, s390_supply_ptrace_register)
2103 (s390_fill_gregset, s390_store_last_break): Adjust.
2104 (target_regsets): Rename to ...
2105 (s390_regsets): ... this, and make static.
2106 (s390_get_pc, s390_set_pc): Adjust.
2107 (s390_get_hwcap): New target_desc parameter, and use it.
2108 [__s390x__] (have_hwcap_s390_high_gprs): New global.
2109 (s390_arch_setup): Adjust to set the current process'es target
2110 description. Don't adjust the regmap.
2111 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
2112 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
2113 (regs_info_3264): New globals.
2114 (s390_regs_info): New function.
2115 (the_low_target): Adjust.
2116 (initialize_low_arch): New function.
2117 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
2118 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
2119 [__mips64] (init_registers_mips_linux)
2120 (init_registers_mips_dsp_linux): Delete defines.
2121 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
2122 (have_dsp): New global.
2123 (mips_read_description): New, based on mips_arch_setup.
2124 (mips_arch_setup): Reimplement.
2125 (get_usrregs_info): New function.
2126 (mips_cannot_fetch_register, mips_cannot_store_register)
2127 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
2128 (mips_fill_fpregset, mips_store_fpregset): Adjust.
2129 (target_regsets): Rename to ...
2130 (mips_regsets): ... this, and make static.
2131 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
2132 (dsp_regs_info, regs_info): New globals.
2133 (mips_regs_info): New function.
2134 (the_low_target): Adjust.
2135 (initialize_low_arch): New function.
2136 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
2137 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
2138 Declare.
2139 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
2140 (arm_read_description): New, with bits factored from
2141 arm_arch_setup.
2142 (arm_arch_setup): Reimplement.
2143 (target_regsets): Rename to ...
2144 (arm_regsets): ... this, and make static.
2145 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
2146 (arm_regs_info): New function.
2147 (the_low_target): Adjust.
2148 (initialize_low_arch): New function.
2149 * linux-m68k-low.c (tdesc_m68k): Declare.
2150 (target_regsets): Rename to ...
2151 (m68k_regsets): ... this, and make static.
2152 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
2153 (m68k_regs_info): New function.
2154 (m68k_arch_setup): New function.
2155 (the_low_target): Adjust.
2156 (initialize_low_arch): New function.
2157 * linux-sh-low.c (tdesc_sharch): Declare.
2158 (target_regsets): Rename to ...
2159 (sh_regsets): ... this, and make static.
2160 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
2161 (sh_regs_info, sh_arch_setup): New functions.
2162 (the_low_target): Adjust.
2163 (initialize_low_arch): New function.
2164 * linux-bfin-low.c (tdesc_bfin): Declare.
2165 (bfin_arch_setup): New function.
2166 (bfin_usrregs_info, regs_info): New globals.
2167 (bfin_regs_info): New function.
2168 (the_low_target): Adjust.
2169 (initialize_low_arch): New function.
2170 * linux-cris-low.c (tdesc_cris): Declare.
2171 (cris_arch_setup): New function.
2172 (cris_usrregs_info, regs_info): New globals.
2173 (cris_regs_info): New function.
2174 (the_low_target): Adjust.
2175 (initialize_low_arch): New function.
2176 * linux-cris-low.c (tdesc_crisv32): Declare.
2177 (cris_arch_setup): New function.
2178 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
2179 (cris_regs_info): New function.
2180 (the_low_target): Adjust.
2181 (initialize_low_arch): New function.
2182 * linux-m32r-low.c (tdesc_m32r): Declare.
2183 (m32r_arch_setup): New function.
2184 (m32r_usrregs_info, regs_info): New globals.
2185 (m32r_regs_info): Adjust.
2186 (initialize_low_arch): New function.
2187 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
2188 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
2189 (tic6x_usrregs_info): Forward declare.
2190 (tic6x_read_description): New function, based on ...
2191 (tic6x_arch_setup): ... this. Reimplement.
2192 (target_regsets): Rename to ...
2193 (tic6x_regsets): ... this, and make static.
2194 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
2195 (tic6x_regs_info): New function.
2196 (the_low_target): Adjust.
2197 (initialize_low_arch): New function.
2198 * linux-xtensa-low.c (tdesc_xtensa): Declare.
2199 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
2200 (target_regsets): Rename to ...
2201 (xtensa_regsets): ... this, and make static.
2202 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
2203 globals.
2204 (xtensa_arch_setup, xtensa_regs_info): New functions.
2205 (the_low_target): Adjust.
2206 (initialize_low_arch): New function.
2207 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
2208 (nios2_arch_setup): Set the current process'es tdesc.
2209 (target_regsets): Rename to ...
2210 (nios2_regsets): ... this.
2211 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
2212 (nios2_regs_info): New function.
2213 (the_low_target): Adjust.
2214 (initialize_low_arch): New function.
a261b8f5
PA
2215 * linux-aarch64-low.c (tdesc_aarch64): Declare.
2216 (aarch64_arch_setup): Set the current process'es tdesc.
2217 (target_regsets): Rename to ...
2218 (aarch64_regsets): ... this.
2219 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
2220 (aarch64_regs_info): New function.
2221 (the_low_target): Adjust.
2222 (initialize_low_arch): New function.
3aee8918
PA
2223 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
2224 globals.
2225 (target_regsets): Rename to ...
2226 (tile_regsets): ... this.
2227 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
2228 (tile_regs_info): New function.
2229 (tile_arch_setup): Set the current process'es tdesc.
2230 (the_low_target): Adjust.
2231 (initialize_low_arch): New function.
2232 * spu-low.c (tdesc_spu): Declare.
2233 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
2234 * win32-arm-low.c (tdesc_arm): Declare.
2235 (arm_arch_setup): New function.
2236 (the_low_target): Install arm_arch_setup instead of
2237 init_registers_arm.
2238 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
2239 (init_windows_x86): Rename to ...
2240 (i386_arch_setup): ... this. Set `win32_tdesc'.
2241 (the_low_target): Adjust.
2242 * win32-low.c (win32_tdesc): New global.
2243 (child_add_thread): Don't create the thread cache here.
2244 (do_initial_child_stuff): Set the new process'es tdesc.
2245 * win32-low.h (struct target_desc): Forward declare.
2246 (win32_tdesc): Declare.
2247 * lynx-i386-low.c (tdesc_i386): Declare global.
2248 (lynx_i386_arch_setup): Set `lynx_tdesc'.
2249 * lynx-low.c (lynx_tdesc): New global.
2250 (lynx_add_process): Set the new process'es tdesc.
2251 * lynx-low.h (struct target_desc): Forward declare.
2252 (lynx_tdesc): Declare global.
2253 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
2254 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
2255 * nto-low.c (nto_tdesc): New global.
2256 (do_attach): Set the new process'es tdesc.
2257 * nto-low.h (struct target_desc): Forward declare.
2258 (nto_tdesc): Declare.
2259 * nto-x86-low.c (tdesc_i386): Declare.
2260 (nto_x86_arch_setup): Set `nto_tdesc'.
2261
b1fbec62
GB
22622013-06-04 Gary Benson <gbenson@redhat.com>
2263
2264 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
2265 to qSupported response when appropriate.
2266 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
2267 with nonzero-length annex.
2268 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
2269 arguments supplied in annex.
2270
d1ec4ce7
DE
22712013-05-31 Doug Evans <dje@google.com>
2272
ac44adcb 2273 PR server/15594
d1ec4ce7
DE
2274 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
2275 64 bits in 64-cross-32 environment.
2276
9b25f2d3
PA
22772013-05-28 Pedro Alves <palves@redhat.com>
2278
2279 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
2280 (aarch64-without-fpu.c): Delete rule.
2281 * configure.srv (aarch64*-*-linux*): Remove references to
2282 aarch64-without-fpu.o and aarch64-without-fpu.xml.
2283 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
2284 declaration.
2285
6740dc9c
PA
22862013-05-24 Pedro Alves <palves@redhat.com>
2287
2288 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
2289 instead of strchr/decode_address. Error if the range isn't split
2290 with a ','. Don't assume there's be a ':' in the action.
2291
c2d6af84
PA
22922013-05-23 Yao Qi <yao@codesourcery.com>
2293 Pedro Alves <palves@redhat.com>
2294
2295 * linux-low.c (lwp_in_step_range): New function.
2296 (linux_wait_1): If the thread was range stepping and stopped
2297 outside the stepping range, report the stop to GDB. Otherwise,
2298 continue stepping. Add range stepping debug output.
2299 (linux_set_resume_request): Copy the step range from the resume
2300 request to the lwp.
2301 (linux_supports_range_stepping): New.
2302 (linux_target_ops) <supports_range_stepping>: Set to
2303 linux_supports_range_stepping.
2304 * linux-low.h (struct linux_target_ops)
2305 <supports_range_stepping>: New field.
2306 (struct lwp_info) <step_range_start, step_range_end>: New fields.
2307 * linux-x86-low.c (x86_supports_range_stepping): New.
2308 (the_low_target) <supports_range_stepping>: Set to
2309 x86_supports_range_stepping.
2310 * server.c (handle_v_cont): Handle 'r' action.
2311 (handle_v_requests): Append ";r" if the target supports range
2312 stepping.
2313 * target.h (struct thread_resume) <step_range_start,
2314 step_range_end>: New fields.
2315 (struct target_ops) <supports_range_stepping>:
2316 New field.
2317 (target_supports_range_stepping): New macro.
2318
58794e1a
JB
23192013-05-17 Joel Brobecker <brobecker@adacore.com>
2320
2321 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
2322 confusion in comment.
2323
d631c5a7
JB
23242013-05-17 Joel Brobecker <brobecker@adacore.com>
2325
2326 * lynx-low.c (struct process_info_private): New type.
2327 (lynx_add_process): New function.
2328 (lynx_create_inferior, lynx_attach): Replace calls to
2329 add_process by calls to lynx_add_process.
2330 (lynx_resume): If PTID is null, then try using
2331 current_process()->private->last_wait_event_ptid.
2332 Add comments.
2333 (lynx_clear_inferiors): Delete. The contents of that function
2334 has been inlined in lynx_mourn;
2335 (lynx_wait_1): Save the ptid in the process's private data.
2336 (lynx_mourn): Free the process' private data. Replace call
2337 to lynx_clear_inferiors by call to clear_inferiors.
2338
96f7a20f
YQ
23392013-05-17 Yao Qi <yao@codesourcery.com>
2340
2341 * i386-low.c (i386_length_and_rw_bits): Move the comment to
2342 the right place.
2343
db0dfaa0
LM
23442013-05-16 Luis Machado <lgustavo@codesourcery.com>
2345
2346 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
2347 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
2348 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
2349 PT_TEXT_END_ADDR guards. Update comments.
2350 (linux_target_op) <read_offsets>: Conditionally define to
2351 linux_read_offsets if the target is UCLIBC and if it defines
2352 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
2353
68f5f838
SL
23542013-05-06 Sandra Loosemore <sandra@codesourcery.com>
2355 Andrew Jenner <andrew@codesourcery.com>
2356
2357 * Makefile.in (SFILES): Add linux-nios2-low.c.
2358 (clean): Add action to delete nios2-linux.c.
2359 (nios2-linux.c): New rule.
2360 * configure.srv: Add nios2*-*-linux*.
2361 * linux-nios2-low.c: New.
2362
1ebff1fd
HAQ
23632013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
2364
2365 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
2366
f6150862
HZ
23672013-04-25 Hui Zhu <hui@codesourcery.com>
2368
2369 PR gdb/15186
f6150862
HZ
2370 * ax.c (ax_printf): Add fflush.
2371
614c279d
TT
23722013-04-22 Tom Tromey <tromey@redhat.com>
2373
2374 * Makefile.in (SFILES): Add filestuff.c.
2375 (OBS): Add filestuff.o.
2376 (filestuff.o): New target.
2377 * config.in, configure: Rebuild.
2378 * configure.ac: Check for fdwalk, pipe2.
2379
7d4e5717
PA
23802013-04-17 Pedro Alves <palves@redhat.com>
2381
2382 * configure.ac (USE_THREAD_DB): Delete variable.
2383 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
2384 Don't AC_SUBST USE_THREAD_DB.
2385 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
2386 * config.in, configure: Regenerate.
2387
d5c93e41
PA
23882013-04-16 Pedro Alves <palves@redhat.com>
2389
2390 * linux-low.h (struct lwp_info) <thread_known>: Move under
2391 the USE_THREAD_DB #ifdef.
2392
04f5fe89
PA
23932013-04-16 Pedro Alves <palves@redhat.com>
2394
2395 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
2396 (linux-low.o): Delete rule.
2397 * linux-low.h: Always include "gdb_thread_db.h" instead of
2398 conditionally including thread_db.h.
2399 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
2400 HAVE_THREAD_DB_H.
2401
480b27bf
JK
24022013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
2403
2404 * Makefile.in (install-only): Fix make install regression.
2405
43662968
JK
24062013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
2407
2408 Convert man pages to texinfo, new gdbinit.5 texinfo page.
2409 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
2410 installation.
2411 * gdbserver.1: Remove.
2412
3e74e146
PA
24132013-03-22 Pedro Alves <palves@redhat.com>
2414
2415 * linux-low.c (handle_extended_wait): Don't call
2416 linux_enable_event_reporting.
2417
a8347a2a
TT
24182013-03-15 Tony Theodore <tonyt@logyst.com>
2419
2420 PR build/9098:
2421 * Makefile.in (SHELL): Use @SHELL@.
2422
eeb56fa7
SDJ
24232013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
2424
2425 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
2426 compiler warning.
2427
4fa7e2ff
JB
24282013-03-13 Joel Brobecker <brobecker@adacore.com>
2429
2430 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
2431 Remove extraneous NULL element.
2432
8ddb1965
YQ
24332013-03-13 Yao Qi <yao@codesourcery.com>
2434
2435 * tracepoint.c (traceframe_read_tsv): Look for the last matched
2436 'V' block in trace frame.
2437
9accd112
MM
24382013-03-11 Markus Metzger <markus.t.metzger@intel.com>
2439
2440 * target.h (struct target_ops): Add btrace ops.
2441 (target_supports_btrace): New macro.
2442 (target_enable_btrace): New macro.
2443 (target_disable_btrace): New macro.
2444 (target_read_btrace): New macro.
2445 * gdbthread.h (struct thread_info): Add btrace field.
2446 * server.c: Include btrace-common.h.
2447 (handle_btrace_general_set): New function.
2448 (handle_btrace_enable): New function.
2449 (handle_btrace_disable): New function.
2450 (handle_general_set): Call handle_btrace_general_set.
2451 (handle_qxfer_btrace): New function.
2452 (struct qxfer qxfer_packets[]): Add btrace entry.
2453 * inferiors.c (remove_thread): Disable btrace.
2454 * linux-low: Include linux-btrace.h.
2455 (linux_low_enable_btrace): New function.
2456 (linux_low_read_btrace): New function.
2457 (linux_target_ops): Add btrace ops.
2458 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
2459 Add srv_linux_btrace=yes.
2460 (x86_64-*-linux*): Add linux-btrace.o.
2461 Add srv_linux_btrace=yes.
2462 * configure.ac: Define HAVE_LINUX_BTRACE.
2463 * config.in: Regenerated.
2464 * configure: Regenerated.
2465
5cc22e4c
MM
24662013-03-11 Markus Metzger <markus.t.metzger@intel.com>
2467
2468 * server.c (handle_qxfer): Preserve error message if -3 is
2469 returned.
2470 (qxfer): Document the -3 return value.
2471
7c97f91e
MM
24722013-03-11 Markus Metzger <markus.t.metzger@intel.com>
2473
2474 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
2475 (linux_btrace_h): New variable.
2476 (linux-btrace.o): New rule.
2477
be9a119c 24782013-03-08 Stan Shebs <stan@codesourcery.com>
f6f899bf
HAQ
2479 Hafiz Abid Qadeer <abidh@codesourcery.com>
2480
2481 * tracepoint.c (trace_buffer_size): New global.
2482 (DEFAULT_TRACE_BUFFER_SIZE): New define.
2483 (init_trace_buffer): Change to one-argument function. Allocate
2484 trace buffer memory.
2485 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
2486 handle QTBuffer:size packet.
2487 (cmd_bigqtbuffer_size): New function.
2488 (initialize_tracepoint): Call init_trace_buffer with
2489 DEFAULT_TRACE_BUFFER_SIZE.
2490 * server.c (handle_query): Add QTBuffer:size in the
2491 supported packets.
2492
e64f7499
YQ
24932013-03-07 Yao Qi <yao@codesourcery.com>
2494
2495 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
2496 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
2497 of -1.
2498 (cmd_qtsp): Adjust condition. Do post increment.
2499 Set cur_action and cur_step_action back to 0.
2500
f0ae6fc3
PA
25012013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
2502
2503 PR server/15236
2504 * linux-low.c (linux_write_memory): Return early success if LEN is
2505 zero.
2506
b5b0b0af
CV
25072013-03-05 Corinna Vinschen <vinschen@redhat.de>
2508
334ad4a8 2509 * configure.srv: Add x86_64-*-cygwin* as target.
b5b0b0af 2510
589bc927
TT
25112013-02-28 Tom Tromey <tromey@redhat.com>
2512
2513 * configure.ac: Invoke AC_SYS_LARGEFILE.
2514 * configure, config.in: Rebuild.
2515
dfe07582
CV
25162013-02-28 Corinna Vinschen <vinschen@redhat.com>
2517
2518 * win32-low.c: Throughout, fix format strings and casts of
2519 printf-like functions to avoid type related warnings on all
2520 platforms.
2521 (get_child_debug_event): Print dwDebugEventCode as hex since
2522 that's how it's usually documented.
2523
736cd585
YQ
25242013-02-28 Yao Qi <yao@codesourcery.com>
2525
2526 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
2527 pulongest.
2528
e1f58301
JW
25292013-02-27 Jiong Wang <jiwang@tilera.com>
2530
2531 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
2532 (reg-tilegx32.c): New rule.
2533 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
2534 * linux-tile-low.c (tile_arch_setup): New function. Invoke
2535 different register info initializer according to elf class.
2536 (init_registers_tilgx32): New function. The tilegx32 register info
2537 initializer.
2538 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
2539 (tile_store_gregset): Likewise.
2540
d171ca78
YQ
25412013-02-27 Yao Qi <yao@codesourcery.com>
2542
2543 * server.c (process_point_options): Print debug message when
2544 debug_threads is true.
2545
282bbdf3
YQ
25462013-02-26 Yao Qi <yao@codesourcery.com>
2547
2548 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
2549
aca22551
PA
25502013-02-19 Pedro Alves <palves@redhat.com>
2551 Kai Tietz <ktietz@redhat.com>
2552
2553 PR gdb/15161
2554
2555 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
2556 instead of strtoul to extract address from packet.
2557 (process_serial_event) <'z'>: Likewise.
2558
4f3cee1c
YQ
25592013-02-18 Yao Qi <yao@codesourcery.com>
2560
2561 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
2562
8e1d55a3
PA
25632013-02-14 Pedro Alves <palves@redhat.com>
2564
2565 Plug memory leak.
2566
2567 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
2568 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
2569
458820da
PA
25702013-02-14 Pedro Alves <palves@redhat.com>
2571
2572 * tracepoint.c (cmd_qtdpsrc): Use savestring.
2573
baea0dae
PA
25742013-02-14 Pedro Alves <palves@redhat.com>
2575
2576 * tracepoint.c (save_string): Delete.
2577 (add_tracepoint_action): Use savestring instead of save_string.
2578
0b1afbb3
PA
25792013-02-12 Pedro Alves <palves@redhat.com>
2580
2581 * linux-xtensa-low.c: Ditto.
2582 * xtensa-xtregs.c: Ditto.
2583
8a4ac37e
PA
25842013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
2585
2586 * thread-db.c (thread_db_get_tls_address): NULL pointer check
2587 thread_db.
2588
148de6bb
MS
25892013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
2590
2591 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
2592 aarch64_num_wp_regs and aarch64_num_bp_regs to
2593 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
2594
55fac6e0
MS
25952013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
2596
2597 * linux-aarch64-low.c (ps_get_thread_area): Replace
2598 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
2599
176eb98c
MS
26002013-02-04 Jim MacArthur <jim.macarthur@arm.com>
2601 Marcus Shawcroft <marcus.shawcroft@arm.com>
2602 Nigel Stephens <nigel.stephens@arm.com>
2603 Yufeng Zhang <yufeng.zhang@arm.com>
2604
2605 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
2606 (aarch64.c, aarch64-without-fpu.c): New targets.
2607 * configure.srv (aarch64*-*-linux*): New.
2608 * linux-aarch64-low.c: New file.
2609
56f7af9c
MS
26102013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
2611
43aaf8b6 2612 * linux-low.c (handle_extended_wait, linux_create_inferior)
56f7af9c
MS
2613 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
2614 (dequeue_one_deferred_signal, linux_resume_one_thread)
2615 (fetch_register, linux_write_memory, linux_enable_event_reporting)
2616 (linux_tracefork_grandchild, linux_test_for_tracefork)
2617 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
2618 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
2619 where the argument is 0.
2620
60f662b0
YQ
26212013-01-25 Yao Qi <yao@codesourcery.com>
2622
2623 * event-loop.c: Include "queue.h".
2624 (gdb_event_p): New typedef.
2625 (struct gdb_event) <next_event>: Remove.
2626 (event_queue): Change to QUEUE(gdb_event_p).
2627 (async_queue_event): Remove.
2628 (gdb_event_xfree): New.
2629 (initialize_event_loop): New.
2630 (process_event): Use API from QUEUE.
2631 (wait_for_event): Likewise.
2632 * server.c (main): Call initialize_event_loop.
2633 * server.h (initialize_event_loop): Declare.
2634
5ae4861a
YQ
26352013-01-18 Yao Qi <yao@codesourcery.com>
2636
2637 * ax.h (struct eval_agent_expr_context): New.
2638 (gdb_eval_agent_expr): Update declaration.
2639 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
2640 TFRAME. Add new argument CTX.
2641 * server.h (struct eval_agent_expr_context): Declare.
2642 (agent_mem_read, agent_tsv_read): Update declaration.
2643 (agent_mem_read_string): Likewise.
2644 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
2645 (add_traceframe_block): Add new argument TPOINT.
2646 Increase TPOINT->traceframe_usage.
2647 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
2648 eval_tracepoint_agent_expr.
2649 (condition_true_at_tracepoint): Likewise.
2650 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
2651 (agent_mem_read_string, agent_tsv_read): Likewise.
2652
85e00e85
YQ
26532013-01-16 Yao Qi <yao@codesourcery.com>
2654
2655 * linux-low.c (linux_resume_one_lwp): Don't check
2656 'lwp->bp_reinsert != 0'.
2657
4039cf45
JB
26582013-01-07 Joel Brobecker <brobecker@adacore.com>
2659 Pedro Alves <palves@redhat.com>
2660
2661 * lynx-low.c (ptrace_request_to_str): Define a temporary
2662 macro and use it to simplify this function's implementation.
2663
9044dee2
JB
26642013-01-07 Joel Brobecker <brobecker@adacore.com>
2665
2666 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
2667 sets errno.
2668
e6352c8f
JB
26692013-01-07 Joel Brobecker <brobecker@adacore.com>
2670
2671 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
2672
50681a27
JB
26732013-01-07 Joel Brobecker <brobecker@adacore.com>
2674
2675 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
2676
3f6e77ef
JB
26772013-01-07 Joel Brobecker <brobecker@adacore.com>
2678
2679 * lynx-low.c (lynx_resume): Use the resume_info parameter
2680 to determine the ptid for the lynx_ptrace call, unless
2681 it is equal to minus_one_ptid, in which case we use the
2682 ptid of the current_inferior.
2683 (lynx_wait_1): After having received a thread create/exit
2684 event, resume the inferior's execution using the signaling
2685 thread's ptid, rather than the old ptid.
2686
7fda33ae
JB
26872013-01-07 Joel Brobecker <brobecker@adacore.com>
2688
2689 * lynx-low.c (lynx_resume): Delete variable ret.
2690
b9786c74
JB
26912013-01-01 Joel Brobecker <brobecker@adacore.com>
2692
2693 * gdbreplay.c (gdbreplay_version): Update copyright year.
2694 * server.c (gdbserver_version): Likewise.
2695
8b93d60f
JB
26962012-12-17 Joel Brobecker <brobecker@adacore.com>
2697
2698 * lynx-low.c (lynx_wait_1): Add debug trace before adding
2699 new thread.
2700
037335a7
JB
27012012-12-17 Joel Brobecker <brobecker@adacore.com>
2702
2703 * lynx-low.c (ptrace_request_to_str): Add handling for
2704 PTRACE_GETTRACESIG.
2705
52d4cbd8
JB
27062012-12-17 Joel Brobecker <brobecker@adacore.com>
2707
2708 * lynx-low.c (lynx_attach): Delete variable new_process.
2709
ab8f6ca9
JB
27102012-12-17 Joel Brobecker <brobecker@adacore.com>
2711
2712 * lynx-low.c (lynx_create_inferior): Delete variable
2713 new_process.
2714
78cbc024
JB
27152012-12-17 Joel Brobecker <brobecker@adacore.com>
2716
2717 * lynx-low.c (ptrace_request_to_str): Do not handle
2718 PTRACE_GETTHREADLIST if this macro does not exist.
2719
14a00470
YQ
27202012-12-15 Yao Qi <yao@codesourcery.com>
2721
2722 * Makefile.in (OBS): Add notif.o.
2723 * notif.c, notif.h: New.
2724 * server.c: Include "notif.h".
2725 (struct vstop_notif) <next>: Remove.
2726 <base>: New field.
2727 (queue_stop_reply): Update.
2728 (push_event, send_next_stop_reply): Remove.
2729 (discard_queued_stop_replies): Update.
2730 (notif_stop): New variable.
2731 (handle_v_stopped): Remove.
2732 (handle_v_requests): Don't call handle_v_stopped. Call
2733 handle_ack_notif instead.
2734 (queue_stop_reply_callback): Call notif_event_enque instead
2735 of queue_stop_reply.
2736 (handle_status): Don't call send_next_stop_reply, call
2737 notif_write_event instead.
2738 (kill_inferior_callback): Likewise.
2739 (detach_or_kill_inferior_callback): Likewise.
2740 (main): Call initialize_notif.
2741 (process_serial_event): Call QUEUE_is_empty.
2742 (handle_target_event): Call notif_push instead of push event.
2743 * server.h (push_event): Remove declaration.
2744
61c125b9
TT
27452012-12-10 Tom Tromey <tromey@redhat.com>
2746
2747 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
2748 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
2749 macros.
2750 (.c.o): Rewrite.
2751 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
2752 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
2753 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
2754 (amd64-linux-ipa.o, ax.o): Rewrite.
2755 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
2756 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
2757 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
2758 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
2759 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
2760 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
2761 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
2762 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
2763 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
2764 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
2765 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
2766 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
2767 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
2768 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
2769 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
2770 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
2771 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
2772 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
2773 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
2774 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
2775 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
2776 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
2777 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
2778 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
2779 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
2780 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
2781 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
2782 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
2783 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
2784 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
2785 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
2786 (reg-tilegx.o): Remove.
2787 (all_object_files): New macro.
2788 Include .deps files.
2789 * aclocal.m4, configure: Rebuild.
2790 * acinclude.m4: Include depstand.m4, lead-dot.m4.
2791 * configure.ac: Invoke ZW_CREATE_DEPDIR,
2792 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
2793
e90e9ad9
TT
27942012-12-05 Tom Tromey <tromey@redhat.com>
2795
2796 PR gdb/14917:
2797 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
2798
02d403bf 27992012-11-28 Markus Metzger <markus.t.metzger@intel.com>
945bf713
MM
2800
2801 * configure.ac: Check for linux/perf_event.h.
2802 * config.in: Regenerated.
2803 * configure: Regenerated.
2804
0270a750
PA
28052012-11-26 Maxime Villard <rustyBSD@gmx.fr>
2806
2807 * hostio.c (handle_readlink): Decrease buffer size
2808 parameter passed to readlink by one byte.
2809
8c29b58e
YQ
28102012-11-26 Yao Qi <yao@codesourcery.com>
2811
2812 * configure.ac (build_warnings): Append '-Wempty-body'.
2813 * configure: Regenerated.
2814 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
2815 body.
2816
8bdce1ff
PM
28172012-11-15 Pierre Muller <muller@sourceware.org>
2818
2819 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
2820 * config.in: Regenerate.
2821 * configure: Regenerate.
2822 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
2823 Use "gdb_wait.h" header instead of <sys/wait.h> header.
2824 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
2825 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
2826 header.
2827 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
2828 instead of <sys/wait.h> header.
2829 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
2830
02d403bf 28312012-11-13 Markus Metzger <markus.t.metzger@intel.com>
3ba6ad0f
MM
2832
2833 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
2834 (various make rules): Remove -DGDBSERVER
2835
fbd5db48
YQ
28362012-11-09 Yao Qi <yao@codesourcery.com>
2837
2838 * spu-low.c (current_ptid): Move it to ..
2839 * gdbthread.h: ... here. New.
2840 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
2841 * server.c (myresume, process_serial_event): Likewise.
2842 * thread-db.c (thread_db_find_new_threads): Likewise.
2843 * tracepoint.c (run_inferior_command): Likewise.
2844
b3dc46ff
AB
28452012-10-01 Andrew Burgess <aburgess@broadcom.com>
2846
2847 * server.c (handle_search_memory_1): Include access length in
2848 warning message.
2849
07c04788
HPN
28502012-09-05 Michael Brandt <michael.brandt@axis.com>
2851
2852 * linux-crisv32-low.c: Fix compile errors.
2853
918d227b
YQ
28542012-09-04 Yao Qi <yao@codesourcery.com>
2855
2856 * tracepoint.c (cmd_qtsv): Adjust debug message.
2857 Don't check CUR_TPOINT.
2858
18c1b81a
YQ
28592012-08-28 Yao Qi <yao@codesourcery.com>
2860
2861 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
2862 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
2863 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
2864 Remove declarations of xmalloc, xreallloc, xstrdup and
2865 freeargv.
2866 * Makefile.in (libiberty_h): New.
2867 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
2868 (linux-bfin-low.o): Append dependency 'libiberty.h'.
2869
dc82f37b
YQ
28702012-08-23 Yao Qi <yao@codesourcery.com>
2871
2872 * server.h: Remove declaration of 'xsnprintf'.
2873
406b1477
KS
28742012-08-22 Keith Seitz <keiths@redhat.com>
2875
2876 * server.h: Include build-gnulib-gbserver/config.h.
2877 * gdbreplay.c: Likewise.
2878
e6712ff1
DE
28792012-08-08 Doug Evans <dje@google.com>
2880
2881 * Makefile.in (SFILES): Add gdb_vecs.c.
2882 (OBS): Add gdb_vecs.o.
2883 (gdb_vecs_h, host_defs_h): New variables.
2884 (thread-db.o): Add $(gdb_vecs_h) dependency.
2885 (gdb_vecs.o): New rule.
2886 * thread-db.c: #include "gdb_vecs.h".
2887 (thread_db_load_search): Use a vector to iterate over path elements.
2888 Handle text appearing after "$pdir".
2889
2890 * configure.ac: Add check for strstr.
2891 * config.in: Regenerate.
2892 * configure: Regenerate.
2893
7c3270ae
UW
28942012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
2895
2896 * hostio.c (handle_pread): If pread fails, fall back to attempting
2897 lseek/read.
2898 (handle_pwrite): Likewise for pwrite.
2899
b62e2b27
UW
29002012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
2901
2902 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
2903 between unsupported TYPE and unimplementable ADDR/LEN combination.
2904 (arm_insert_point): Act on new return value.
2905
78a99e91
PA
29062012-07-31 Pedro Alves <palves@redhat.com>
2907
2908 * server.c (process_point_options): Only skip tokens if we find
2909 one that is unrecognized. Don't treat 'X' specially while
2910 skipping unrecognized tokens.
2911
fcf303ab
UW
29122012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
2913
2914 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
2915 to 4-byte-align HW breakpoint addresses for Thumb.
2916
7255706c
YQ
29172012-07-27 Yao Qi <yao@codesourcery.com>
2918
2919 PR remote/14161.
2920
2921 * server.h: Declare gdb_agent_about_to_close.
2922 * target.c (kill_inferior): Include "agent.h".
2923 New. Send command 'kill'.
2924 * target.h (kill_inferior): Removed macro.
2925 * tracepoint.c (gdb_agent_about_to_close): New.
2926 (gdb_agent_helper_thread): Handle command 'close'.
2927 Wait endlessly until the inferior stops.
2928 Install gdb_agent_remove_socket to atexit hook.
2929 (agent_socket_name): New static variable.
2930 (gdb_agent_socket_init): Replace local variable 'name' with
2931 'agent_socket_name'.
2932 (gdb_agent_remove_socket): New.
2933
5a3f286f
YQ
29342012-07-27 Yao Qi <yao@codesourcery.com>
2935
2936 * server.c (process_point_options): Stop at 'X' when parsing.
2937
961bd387
ME
29382012-07-19 Michael Eager <eager@eagercon.com>
2939
a261b8f5 2940 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
961bd387
ME
2941 to hw_execute.
2942 * linux-x86-low.c (x86_insert_point, x86_remove_point):
2943 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
2944 hardware breakpoint.
2945
aa7c7447
JK
29462012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
2947
2948 * gdbserver/linux-low.c (initialize_low): Call
2949 linux_ptrace_init_warnings.
2950
7f216e7c
DE
29512012-07-02 Doug Evans <dje@google.com>
2952
2953 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
2954 pointer to int.
2955
d3ce09f5
SS
29562012-07-02 Stan Shebs <stan@codesourcery.com>
2957
2958 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
2959 (ax.o): Add it to build rule.
2960 (ax-ipa.o): Ditto.
2961 (OBS): Add format.o.
2962 (IPA_OBS): Add format.o.
2963 * server.c (handle_query): Claim support for breakpoint commands.
2964 (process_point_options): Add command case.
2965 (process_serial_event): Leave running if there are printfs in
2966 effect.
2967 * mem-break.h (any_persistent_commands): Declare.
2968 (add_breakpoint_commands): Declare.
2969 (gdb_no_commands_at_breakpoint): Declare.
2970 (run_breakpoint_commands): Declare.
2971 * mem-break.c (struct point_command_list): New struct.
2972 (struct breakpoint): New field command_list.
2973 (any_persistent_commands): New function.
2974 (add_commands_to_breakpoint): New function.
2975 (add_breakpoint_commands): New function.
2976 (gdb_no_commands_at_breakpoint): New function.
2977 (run_breakpoint_commands): New function.
2978 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
2979 locally.
2980 * ax.c: Include format.h.
2981 (ax_printf): New function.
2982 (gdb_eval_agent_expr): Add printf opcode.
2983
2f8f6aed
YQ
29842012-06-13 Yao Qi <yao@codesourcery.com>
2985
2986 * server.c (start_inferior): Remove duplicated writes to fields
2987 'last_resume_kind' and 'last_status' of 'current_inferior'.
2988
0c9070b3
YQ
29892012-06-12 Yao Qi <yao@codesourcery.com>
2990 Pedro Alves <palves@redhat.com>
2991
2992 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
2993 comment.
2994 * server.c (handle_v_cont): Extend comment.
2995
c52daf70
YQ
29962012-06-11 Yao Qi <yao@codesourcery.com>
2997
2998 * linux-low.c (linux_attach): Add 'static'.
2999
d38bbb0a
YQ
30002012-06-06 Yao Qi <yao@codesourcery.com>
3001
3002 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
3003
89dc0afd
JK
30042012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
3005
3006 Fix gcc -flto compilation warning.
3007 * server.c (main): Make variable multi_mode and attach volatile.
3008
75f62ce7
TJB
30092012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
3010
3011 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
3012 if the platform doesn't know about it.
3013
65f479b6
PA
30142012-05-30 Jeff Kenton <jkenton@tilera.com>
3015
3016 * Makefile.in (SFILES): Add linux-tile-low.c.
3017 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
3018 * configure.srv: Handle tilegx-*-linux*.
3019 * linux-tile-low.c: New file.
3020
0c5bf5a9
JK
30212012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
3022
3023 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
3024
a493e3e2
PA
30252012-05-24 Pedro Alves <palves@redhat.com>
3026
3027 PR gdb/7205
3028
43aaf8b6 3029 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
a493e3e2 3030
2ea28649
PA
30312012-05-24 Pedro Alves <palves@redhat.com>
3032
3033 PR gdb/7205
3034
3035 Replace target_signal with gdb_signal throughout.
3036
8d409d16
MR
30372012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
3038
3039 * linux-low.c (linux_store_registers): Avoid the copying sequence
3040 when no data has been retrieved by ptrace.
3041
23512c01
MGD
30422012-05-22 Will Deacon <will.deacon@arm.com>
3043
3044 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
3045 Include asm/ptrace.h.
3046 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
3047 already defined.
3048
4934b29e
MR
30492012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
3050
3051 * linux-low.c (linux_store_registers): Don't re-retrieve data
3052 with ptrace that has already been obtained from /proc. Always
3053 copy any data retrieved with ptrace to the buffer supplied.
3054
bde24c0a
PA
30552012-05-11 Yao Qi <yao@codesourcery.com>
3056 Pedro Alves <palves@redhat.com>
3057
3058 * linux-low.c (enum stopping_threads_kind): New.
3059 (stopping_threads): Change type to `enum stopping_threads_kind'.
3060 (handle_extended_wait): If stopping and suspending threads, leave
3061 the new_lwp suspended too.
3062 (linux_wait_for_event): Adjust.
3063 (stop_all_lwps): Set `stopping_threads' to
3064 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
3065 whether we're suspending threads or just stopping them. Assert no
3066 recursion happens.
3067
623b6bdf
YQ
30682012-04-29 Yao Qi <yao@codesourcery.com>
3069
3070 * server.h: Move some code to ...
3071 * gdbthread.h: ... here. New.
3072 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
3073 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
3074 (nto-low.o, win32-low.o): Likewise.
3075 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
3076 * regcache.c, remote-utils.c, server.c: Likewise.
3077 * target.c, tracepoint.c, win32-low.c: Likewise.
3078
f15f9948
TJB
30792012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
3080
3081 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
3082 (PTRACE_ARG4_TYPE): Likewise.
3083 (PTRACE_XFER_TYPE): Likewise.
3084 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
3085 ptrace to PTRACE_ARG3_TYPE.
3086 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
3087 (PTRACE_ARG4_TYPE): Likewise.
3088 (PTRACE_XFER_TYPE): Likewise.
3089 (linux_detach_one_lwp): Cast fourth argument of
3090 ptrace to long then PTRACE_ARG4_TYPE.
3091 (regsets_fetch_inferior_registers): Cast third argument of
3092 ptrace to long then PTRACE_ARG3_TYPE.
3093 (regsets_store_inferior_registers): Likewise.
3094
38ea300a
PA
30952012-04-20 Pedro Alves <palves@redhat.com>
3096
3097 * configure: Regenerate.
3098
c971b7fa
PA
30992012-04-19 Pedro Alves <palves@redhat.com>
3100
43aaf8b6 3101 * Makefile.in (GNULIB_BUILDDIR): New.
c971b7fa 3102 (LIBGNU, INCGNU, GNULIB_H): Adjust.
43aaf8b6
PA
3103 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
3104 (all, install-only, uninstall, clean-info, all-lib, clean): No
3105 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
3106 (maintainer-clean realclean distclean): Use subdir_do.
3107 (subdir_do): New.
3108 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
c971b7fa 3109 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
43aaf8b6
PA
3110 * acinclude.m4: Include acx_configure_dir.m4.
3111 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
3112 calls. Call AC_PROG_RANLIB. Configure gnulib using
3113 ACX_CONFIGURE_DIR.
3114 (GNULIB): New.
3115 (GNULIB_STDINT_H): Adjust.
3116 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
3117 * gdbreplay.c: Include build-gnulib/config.h.
3118 * server.h: Likewise.
3119 * aclocal.m4: Regenerate.
3120 * config.in: Regenerate.
3121 * configure: Regenerate.
c971b7fa 3122
809277f8
PA
31232012-04-19 Pedro Alves <palves@redhat.com>
3124
3125 * Makefile.in (LIBGNU, INCGNU): Adjust.
3126 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
3127 (all, install-only, uninstall, clean-info, all-lib, clean)
3128 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
3129 * configure.ac: Adjust AC_OUTPUT output.
3130 * aclocal.m4: Regenerate.
3131 * configure: Regenerate.
3132
fd9bb8b8
PA
31332012-04-19 Pedro Alves <palves@redhat.com>
3134
3135 * Makefile.in (generated_files): New.
3136 (server_h): Remove the explicit dependency on config.h, and depend
3137 on $generated_files.
3138
1c298c66
PA
31392012-04-19 Pedro Alves <palves@redhat.com>
3140
3141 * Makefile.in (INCGNU): Add -Ignulib.
3142
57c4b50b
PA
31432012-04-19 Pedro Alves <palves@redhat.com>
3144
3145 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
3146 (INCGNU): ... this, and spell out -I here.
3147 (GNULIB_LIB): Rename to ...
3148 (LIBGNU): ... this.
3149 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
3150
1030e047
PA
31512012-04-19 Pedro Alves <palves@redhat.com>
3152
3153 * config.in: Regenerate.
3154
447d4319
PA
31552012-04-19 Pedro Alves <palves@redhat.com>
3156
3157 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
3158 * server.h (memmem): Remove declaration.
3159 * config.in: Regenerate.
3160 * configure: Regenerate.
3161
aad9eab9
YQ
31622012-04-19 Yao Qi <yao@codesourcery.com>
3163
3164 * Makefile.in (SFILES): Add common/vec.c.
3165 (OBS): Add vec.o.
3166 (vec.o): New rule.
3167
3e10640f
YQ
31682012-04-19 Yao Qi <yao@codesourcery.com>
3169
3170 * remote-utils.c (prepare_resume_reply): Replace with macro
3171 target_core_of_thread.
3172 * server.c (handle_qxfer_threads_proper): Likewise.
3173 * target.h (traget_core_of_thread): New macro.
3174
71622373
PA
31752012-04-18 Pedro Alves <palves@redhat.com>
3176
3177 * aclocal.m4: Regenerate.
3178 * configure: Regenerate.
3179
80d26939
YQ
31802012-04-16 Yao Qi <yao@codesourcery.com>
3181
3182 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
3183 duplicated on address.
3184
42476b70
YQ
31852012-04-16 Yao Qi <yao@codesourcery.com>
3186
3187 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
3188 (struct tracepoint_action_ops) <send>: New field.
3189 (m_tracepoint_action_send, r_tracepoint_action_send): New.
3190 (agent_expr_send, x_tracepoint_action_send): New.
3191 (l_tracepoint_action_send): New.
3192 (cmd_qtdp): Download and install tracepoint
3193 according to `use_agent'.
3194 (run_inferior_command): Add one more parameter `len'.
3195 Update callers.
3196 (tracepoint_send_agent): New.
3197 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
3198
7bc83639
YQ
31992012-04-16 Yao Qi <yao@codesourcery.com>
3200
3201 * tracepoint.c (download_tracepoints): Moved to ...
3202 (cmd_qtstart): ... here.
3203
5f18041e
YQ
32042012-04-14 Yao Qi <yao@codesourcery.com>
3205
3206 * tracepoint.c: Include inttypes.h.
3207 (struct collect_memory_action): Use sized types.
3208 (struct tracepoint): Likewise.
3209 (cmd_qtdp, stop_tracing): Update print specifiers.
3210 (cmd_qtp, response_tracepoint): Likewise.
3211 (collect_data_at_tracepoint): Likewise.
3212 (collect_data_at_step): Likewise.
3213
55a8c076
YQ
32142012-04-14 Yao Qi <yao@codesourcery.com>
3215
3216 Import gnulib module inttypes.
3217 * aclocal.m4, config.in, configure: Regenerated.
3218
dc750257
YQ
32192012-04-14 Yao Qi <yao@codesourcery.com>
3220
3221 * Makefile.in (maintainer-clean, realclean, distclean): Remove
3222 Makefile and config.status at last.
3223
0ab5faf9
YQ
32242012-04-13 Yao Qi <yao@codesourcery.com>
3225
3226 * tracepoint.c: Include stdint.h unconditionally.
3227
18f5fd81
TJB
32282012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
3229
3230 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
3231 on BFD_HAVE_SYS_PROCFS_TYPE.
3232 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
3233 * configure: Regenerate.
3234 * config.in: Likewise.
3235
4d47af5c
L
32362012-04-13 H.J. Lu <hongjiu.lu@intel.com>
3237
3238 * Makefile.in (clean): Also remove x32.c x32-linux.c
3239 x32-avx.c x32-avx-linux.c.
3240 (x32.o): New target.
3241 (x32.c): Likewise.
3242 (x32-linux.o): Likewise.
3243 (x32-linux.c): Likewise.
3244 (x32-avx.o): Likewise.
3245 (x32-avx.c): Likewise.
3246 (x32-avx-linux.o): Likewise.
3247 (x32-avx-linux.c): Likewise.
3248
3249 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
3250 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
3251 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
3252 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
3253 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
3254 i386/x32-avx-linux.xml.
3255
3256 * linux-x86-low.c (init_registers_x32_linux): New prototype.
3257 (init_registers_x32_avx_linux): Likwise.
3258 (x86_linux_update_xmltarget): Call init_registers_x32_linux
3259 or init_registers_x32_avx_linux if linux_is_elf64 is false.
3260
ecedbe58
PA
32612012-04-13 Pedro Alves <palves@redhat.com>
3262
3263 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
3264 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
3265 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
3266 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
3267 the sub-make.
3268
c92b5177
L
32692012-04-12 H.J. Lu <hongjiu.lu@intel.com>
3270
3271 * linux-x86-low.c (compat_x32_clock_t): New.
3272 (compat_x32_siginfo_t): Likewise.
3273 (compat_x32_siginfo_from_siginfo): Likewise.
3274 (siginfo_from_compat_x32_siginfo): Likewise.
3275 (linux_is_elf64): Likewise.
3276 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
3277 and siginfo_from_compat_x32_siginfo for x32.
3278 (x86_arch_setup): Set linux_is_elf64.
3279
214d508e
L
32802012-04-12 H.J. Lu <hongjiu.lu@intel.com>
3281
3282 PR gdb/13969
3283 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
3284 e_machine field.
3285 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
3286 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
3287 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
3288 compatible with process.
3289
c9a1864a
YQ
32902012-04-12 Yao Qi <yao@codesourcery.com>
3291
3292 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
3293 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
3294 (install-only, install-info, clean): Handle sub dir gnulib.
3295 (all-lib, am--refresh): New targets.
3296 (memmem.o): Remove target.
3297 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
3298 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
3299 (AC_REPLACE_FUNCS): Remove memmem.
3300 Invoke gl_INIT and AM_INIT_AUTOMAKE.
3301 (AC_OUTPUT): Generate Makefile in gnulib/.
3302 * aclocal.m4, config.in, configure: Regenerated.
3303
367ba2c2
MR
33042012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
3305
3306 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
3307
9d236627
PA
33082012-04-05 Pedro Alves <palves@redhat.com>
3309
3310 -Werror=strict-aliasing
3311
3312 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
3313 pointer.
3314
111217b3
PA
33152012-04-04 Pedro Alves <palves@redhat.com>
3316
3317 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
3318 (sparc_store_gregset_from_stack, sparc_store_gregset)
3319 (sparc_breakpoint_at): Fix formatting.
3320
8365dcf5
TJB
33212012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
3322
3323 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
3324 are available.
3325 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
3326 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
3327 * config.in: Regenerate.
3328 * configure: Likewise.
3329
689cc2ae
PA
33302012-03-29 Pedro Alves <palves@redhat.com>
3331
3332 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
3333 Correct ptrace arguments.
3334
c14dfd32
PA
33352012-03-28 Pedro Alves <palves@redhat.com>
3336
3337 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
3338 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
3339 (IA64_FR1_REGNUM): New defines.
3340 (ia64_fetch_register): New.
3341 (the_low_target): Install it.
3342 * linux-low.h (struct linux_target_ops) <fetch_register>: New
3343 field.
3344 * linux-low.c (linux_fetch_registers): Try the
3345 the_low_target.fetch_register hook first.
3346
3347 * linux-arm-low.c (the_low_target): Adjust.
3348 * linux-bfin-low.c (the_low_target): Adjust.
3349 * linux-cris-low.c (the_low_target): Adjust.
3350 * linux-crisv32-low.c (the_low_target): Adjust.
3351 * linux-m32r-low.c (the_low_target): Adjust.
3352 * linux-m68k-low.c (the_low_target): Adjust.
3353 * linux-mips-low.c (the_low_target): Adjust.
3354 * linux-ppc-low.c (the_low_target): Adjust.
3355 * linux-s390-low.c (the_low_target): Adjust.
3356 * linux-sh-low.c (the_low_target): Adjust.
3357 * linux-sparc-low.c (the_low_target): Adjust.
3358 * linux-tic6x-low.c (the_low_target): Adjust.
3359 * linux-x86-low.c (the_low_target): Adjust.
3360 * linux-xtensa-low.c (the_low_target): Adjust.
3361
63c88e13
PA
33622012-03-26 Pedro Alves <palves@redhat.com>
3363
3364 * server.c (handle_qxfer_libraries): Don't bail early if
3365 the_target->qxfer_libraries_svr4 is not NULL.
3366
fb723180
PA
33672012-03-26 Pedro Alves <palves@redhat.com>
3368
3369 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
3370
0afae3cf
PA
33712012-03-23 Pedro Alves <palves@redhat.com>
3372
3373 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
3374 "library-list-svr4" element's start tag when the the DSO list is
3375 empty.
3376
485f1ee4
PA
33772012-03-23 Pedro Alves <palves@redhat.com>
3378
3379 * linux-low.c (read_one_ptr): Read the inferior's pointer through
3380 a variable whose type size is the same as the inferior's pointer
3381 size.
3382
a5362b9a
TS
33832012-03-21 Thomas Schwinge <thomas@codesourcery.com>
3384
3385 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
3386 struct siginfo.
3387 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
3388 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
3389 * linux-low.h: Include <signal.h>.
3390 (struct siginfo): Remove forward declaration.
3391 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
3392 struct siginfo.
3393
d226c142
MF
33942012-03-21 Mike Frysinger <vapier@gentoo.org>
3395
3396 * .gitignore: Ignore more files.
3397
122f36ef
PA
33982012-03-19 Pedro Alves <palves@redhat.com>
3399 Jan Kratochvil <jan.kratochvil@redhat.com>
3400
3401 * server.c (cont_thread, general_thread): Add describing comments.
3402 (start_inferior): Clear `cont_thread'.
3403 (handle_v_cont): Don't set `cont_thread' if resuming all threads
3404 of a process.
3405
fc3e5175
YQ
34062012-03-15 Yao Qi <yao@codesourcery.com>
3407
3408 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
3409 handling to ...
3410 (cmd_qtdp): ... here.
3411
8d0d92cd
YQ
34122012-03-15 Yao Qi <yao@codesourcery.com>
3413
3414 * tracepoint.c (struct tracepoint_action_ops): New.
3415 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
3416 (m_tracepoint_action_download): New.
3417 (r_tracepoint_action_download): New.
3418 (x_tracepoint_action_download): New.
3419 (l_tracepoint_action_download): New.
3420 (add_tracepoint_action): Install `action->ops' according type.
3421 (download_tracepoint_1): Move code `download' function pointer
3422 of various tracepoint_action_ops.
3423
87b0bb13
JK
34242012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
3425
3426 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
3427 linux_ptrace_attach_warnings.
3428
5f572dec
JK
34292012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
3430
3431 * Makefile.in (linux-ptrace.o): New.
3432 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
3433 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
3434 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
3435 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
3436 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
3437 of these targets.
3438 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
3439
f4647387
YQ
34402012-03-08 Yao Qi <yao@codesourcery.com>
3441 Pedro Alves <palves@redhat.com>
3442
3443 Fix PR server/13392.
3444 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
3445 offset of JMP insn.
3446 * tracepoint.c (remove_tracepoint): New.
3447 (cmd_qtdp): Call remove_tracepoint when failed to install.
3448
9b224c5e
PA
34492012-03-07 Pedro Alves <palves@redhat.com>
3450
3451 * linux-low.c (get_detach_signal): New.
3452 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
3453 Pass on pending signals to PTRACE_DETACH. Check the result of the
3454 ptrace call.
3455 * server.c (program_signals, program_signals_p): New.
3456 (handle_general_set): Handle QProgramSignals.
3457 * server.h (program_signals, program_signals_p): Declare.
3458
e237a7e2
JK
34592012-03-05 Pedro Alves <palves@redhat.com>
3460 Jan Kratochvil <jan.kratochvil@redhat.com>
3461
3462 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
3463 New comment why.
3464
5808517f
YQ
34652012-03-03 Yao Qi <yao@codesourcery.com>
3466
3467 * tracepoint.c (tracepoint_look_up_symbols): Update call to
3468 agent_look_up_symbols.
3469
58b4daa5
YQ
34702012-03-03 Yao Qi <yao@codesourcery.com>
3471
3472 * Makefile.in (linux-low.o): Keep dependence on agent.h.
3473 (linux-x86-low.o): Likewise.
3474 * server.h: Remove in_process_agent_loaded.
3475 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
3476 common/agent.c.
3477 Update callers.
3478
8ffcbaaf
YQ
34792012-03-03 Yao Qi <yao@codesourcery.com>
3480
3481 * tracepoint.c (gdb_agent_capability): New global.
3482 (in_process_agent_loaded_ust): Renamed to
3483 `in_process_agent_supports_ust'.
3484 Update callers.
3485 (in_process_agent_supports_ust): Call agent_capability_check.
3486 (clear_installed_tracepoints): Assert that agent supports
3487 agent.
3488
d1feda86
YQ
34892012-03-03 Yao Qi <yao@codesourcery.com>
3490
3491 * linux-low.c (linux_supports_agent): New.
3492 (linux_target_ops): Initialize field `supports_agent' with
3493 linux_supports_agent.
3494 * target.h (struct target_ops) <supports_agent>: New.
3495 (target_supports_agent): New macro.
3496 * server.c (handle_general_set): Handle packet 'QAgent'.
3497 (handle_query): Send `QAgent+'.
3498 * Makefile.in (server.o): Depends on agent.h.
3499
2fa291ac
YQ
35002012-03-03 Yao Qi <yao@codesourcery.com>
3501
3502 * Makefile.in (OBS): Add agent.o.
3503 Add new rule for agent.o.
3504 Track dependence of tracepoint.c on agent.h.
3505 * tracepoint.c (run_inferior_command_1):
3506 (run_inferior_command): Call agent_run_command.
3507 (gdb_ust_connect_sync_socket): Deleted. Move it to
3508 common/agent.c.
3509 (resume_thread, stop_thread): Likewise.
3510 (gdb_ust_socket_init): Renamed to ...
3511 (gdb_agent_socket_init): ... New.
3512 (gdb_ust_thread): Renamed to ...
3513 (gdb_agent_helper_thread): ... New.
3514 (gdb_ust_init): Move some code to ...
3515 (gdb_agent_init): ... here. New.
3516 [HAVE_UST]: Call gdb_ust_init.
3517 (initialize_tracepoint_ftlib): Call gdb_agent_init.
3518 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
3519 * config.in, configure: Regenerated.
3520
05044653
PA
35212012-03-02 Pedro Alves <palves@redhat.com>
3522
3523 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
3524 * linux-low.c (struct simple_pid_list): New.
3525 (stopped_pids): New a struct simple_pid_list pointer.
3526 (add_to_pid_list, pull_pid_from_list): New.
3527 (handle_extended_wait): Don't assume the first signal new children
3528 report is SIGSTOP. Adjust call to pull_pid_from_list.
3529 (linux_wait_for_lwp): Adjust.
3530
8d00225b
YQ
35312012-03-02 Yao Qi <yao@codesourcery.com>
3532
3533 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
3534 debug log.
3535
19560ba5
YQ
35362012-03-02 Yao Qi <yao@codesourcery.com>
3537
3538 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
3539 `stop_pc' and `tpoint'. Update caller.
3540
1faeff08
MR
35412012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
3542
3543 * linux-low.h (linux_target_ops): Add regset_bitmap member.
3544 * linux-low.c (use_linux_regsets): New macro.
3545 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
3546 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
3547 (linux_register_in_regsets): New function.
3548 (usr_fetch_inferior_registers): Skip registers covered by
3549 regsets.
3550 (usr_store_inferior_registers): Likewise.
3551 (usr_fetch_inferior_registers): New macro.
3552 (usr_store_inferior_registers): Likewise.
3553 (linux_fetch_registers): Handle mixed regset/non-regset targets.
3554 (linux_store_registers): Likewise.
3555 * linux-mips-low.c (init_registers_mips_dsp_linux): New
3556 prototype.
3557 (init_registers_mips64_dsp_linux): Likewise.
3558 (init_registers_mips_linux): New macro.
3559 (init_registers_mips_dsp_linux): Likewise.
3560 (mips_dsp_num_regs): Likewise.
3561 (DSP_BASE, DSP_CONTROL): New fallback macros.
3562 (mips_base_regs): New macro.
3563 (mips_regmap): Use it. Fix the size.
3564 (mips_dsp_regmap): New variable.
3565 (mips_dsp_regset_bitmap): Likewise.
3566 (mips_arch_setup): New function.
3567 (mips_cannot_fetch_register): Use the_low_target.regmap rather
3568 than mips_regmap.
3569 (mips_cannot_store_register): Likewise.
3570 (the_low_target): Update .arch_setup, .num_regs and .regmap
3571 initializers. Add .regset_bitmap initializer.
3572 * linux-arm-low.c (the_low_target): Add .regset_bitmap
3573 initializer.
3574 * linux-bfin-low.c (the_low_target): Likewise.
3575 * linux-cris-low.c (the_low_target): Likewise.
3576 * linux-crisv32-low.c (the_low_target): Likewise.
3577 * linux-ia64-low.c (the_low_target): Likewise.
3578 * linux-m32r-low.c (the_low_target): Likewise.
3579 * linux-m68k-low.c (the_low_target): Likewise.
3580 * linux-ppc-low.c (the_low_target): Likewise.
3581 * linux-s390-low.c (the_low_target): Likewise.
3582 * linux-sh-low.c (the_low_target): Likewise.
3583 * linux-sparc-low.c (the_low_target): Likewise.
3584 * linux-tic6x-low.c (the_low_target): Likewise.
3585 * linux-x86-low.c (the_low_target): Likewise.
3586 * linux-xtensa-low.c (the_low_target): Likewise.
3587 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
3588 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
3589 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
3590 srv_xmlfiles.
3591 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
3592 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
3593
c03e6ccc
YQ
35942012-02-29 Yao Qi <yao@codesourcery.com>
3595 Pedro Alves <palves@redhat.com>
3596
3597 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
3598 `step_over_finished' is true.
3599
644cebc9
PA
36002012-02-27 Pedro Alves <palves@redhat.com>
3601
3602 * linux-low.c (pid_is_stopped): Delete, moved to common/.
3603 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
3604
c14d7ab2
PA
36052012-02-27 Pedro Alves <palves@redhat.com>
3606
3607 PR server/9684
3608 * linux-low.c (pid_is_stopped): New.
3609 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
3610
412c89dd
LM
36112012-02-25 Luis Machado <lgustavo@codesourcery.com>
3612
3613 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
3614 of conditions.
3615
b745defe
MR
36162012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
3617
3618 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
3619
9f3a5c85
LM
36202012-02-24 Luis Machado <lgustavo@codesourcery>
3621
3622 * server.c (handle_query): Advertise support for target-side
3623 breakpoint condition evaluation.
3624 (process_point_options): New function.
3625 (process_serial_event): When inserting a breakpoint, check for
3626 a target-side condition that should be evaluated.
3627
3628 * mem-break.c: Include regcache.h and ax.h.
3629 (point_cond_list_t): New data structure.
3630 (breakpoint) <cond_list>: New field.
3631 (find_gdb_breakpoint_at): Make non-static.
3632 (delete_gdb_breakpoint_at): Clear any target-side
3633 conditions.
3634 (clear_gdb_breakpoint_conditions): New function.
3635 (add_condition_to_breakpoint): Likewise.
3636 (add_breakpoint_condition): Likewise.
3637 (gdb_condition_true_at_breakpoint): Likewise.
3638 (gdb_breakpoint_here): Return result directly instead
3639 of going through a local variable.
3640
3641 * mem-break.h (find_gdb_breakpoint_at): New prototype.
3642 (clear_gdb_breakpoint_conditions): Likewise.
3643 (add_breakpoint_condition): Likewise.
3644 (gdb_condition_true_at_breakpoint): Likewise.
3645
3646 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
3647 (need_step_over_p): Take target-side breakpoint condition into
3648 consideration.
3649
5e1dc496
LM
36502012-02-24 Luis Machado <lgustavo@codesourcery>
3651
3652 * server.h: Include tracepoint.h.
3653 (agent_mem_read, agent_get_trace_state_variable_value,
3654 agent_set_trace_state_variable_value,
3655 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
3656 get_set_tsv_func_addr): New prototypes.
3657
3658 * ax.h: New include file.
3659 * ax.c: New source file.
3660
3661 * tracepoint.c: Include ax.h.
3662 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
3663 agent_expr, eval_result_type): Move to ax.h.
3664 (parse_agent_expr): Rename to ...
3665 (gdb_parse_agent_expr): ... this, make it non-static and move
3666 to ax.h.
3667 (unparse_agent_expr) Rename to ...
3668 (gdb_unparse_agent_expr): ... this, make it non-static and move
3669 to ax.h.
3670 (eval_agent_expr): Rename to ...
3671 (eval_tracepoint_agent_expr): ... this.
3672 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
3673 forward declarations.
3674 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
3675 (agent_get_trace_state_variable_value): New function.
3676 (agent_set_trace_state_variable_value): New function.
3677 (cmd_qtdp): Call gdb_parse_agent_expr (...).
3678 (response_tracepoint): Call gdb_unparse_agent_expr (...).
3679 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
3680 (condition_true_at_tracepoint): Likewise.
3681 (parse_agent_expr): Rename to ...
3682 (gdb_parse_agent_expr): ... this and move to ax.c.
3683 (unparse_agent_expr): Rename to ...
3684 (gdb_unparse_agent_expr): ... this and move to ax.c.
3685 (gdb_agent_op_name): Move to ax.c.
3686 (eval_agent_expr): Rename to ...
3687 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
3688 and move to ax.c.
3689 (eval_tracepoint_agent_expr): New function.
3690 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
43aaf8b6 3691 non-static.
5e1dc496
LM
3692 (current_insn_ptr, emit_error, struct bytecode_address): Move to
3693 ax.c.
3694 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
3695 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
3696 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
3697 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
3698 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
3699 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
3700 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
3701 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
3702 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
3703 (compile_bytecodes): Remove forward declaration.
3704 (is_goto_target): Move to ax.c.
3705 (compile_bytecodes): Move to ax.c and call
3706 agent_get_trace_state_variable_value (...) and
3707 agent_set_trace_state_variable_value (...).
3708
3709 * Makefile.in: Update ax.c and IPA dependencies.
3710
277e4e52
PA
37112012-02-24 Pedro Alves <palves@redhat.com>
3712
3713 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
3714 (cmd_bigqtbuffer_circular): ... this. Only handle
3715 'QTBuffer:circular:'.
3716 (handle_tracepoint_general_set): Adjust.
3717
bf4c19f7
YQ
37182012-02-16 Yao Qi <yao@codesourcery.com>
3719
3720 * inferiors.c: Move code to ...
3721 * dll.c: .... here. New.
3722 * server.h: Declare clear_dlls.
3723 * Makefile.in (SFILES): Add dll.c.
3724 (OBS): Add dll.o
3725 (dll.o): New rule.
3726
d73f2619
YQ
37272012-02-11 Yao Qi <yao@codesourcery.com>
3728
3729 * server.c: (handle_monitor_command): Add a new parameter
3730 `own_buf'.
3731 (handle_query): Update caller.
3732
f8255c2a
JB
37332012-02-09 Joel Brobecker <brobecker@adacore.com>
3734
3735 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
3736 * configure, config.in: Regenerate.
3737 * hostio.c: Provide an alternate implementation if HAVE_READLINK
3738 is not defined.
3739
da84f473
PA
37402012-02-02 Pedro Alves <palves@redhat.com>
3741
3742 Try SIGKILL first, then PTRACE_KILL.
3743 * linux-low.c (linux_kill_one_lwp): New.
3744 (linux_kill_one_lwp): Rename to ...
3745 (kill_one_lwp_callback): ... this. Use the new
3746 linux_kill_one_lwp.
3747
e886a173
PA
37482012-02-02 Pedro Alves <palves@redhat.com>
3749
3750 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
3751 inferior.
3752
be07f1a2
PA
37532012-01-27 Pedro Alves <palves@redhat.com>
3754
3755 * linux-low.c (linux_child_pid_to_exec_file): Delete.
3756 (elf_64_file_p): Make static.
3757 (linux_pid_exe_is_elf_64_file): New.
3758 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
3759 Delete declarations.
3760 (linux_pid_exe_is_elf_64_file): Declare.
3761 * linux-x86-low.c (x86_arch_setup): Use
3762 linux_pid_exe_is_elf_64_file.
3763
d8301ad1
JK
37642012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
3765
3766 * linux-low.c (linux_wait_for_event_1): Rename to ...
3767 (linux_wait_for_event): ... here and merge it with former
3768 linux_wait_for_event - new variable wait_ptid, use it.
3769 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
3770
01b17894
PA
37712012-01-23 Pedro Alves <palves@redhat.com>
3772
3773 * server.c (main): Avoid yet another case of infinite loop while
3774 detaching/killing after a longjmp.
3775
e825046f
JK
37762012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
3777
3778 Code cleanup.
3779 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
3780
b9e7b9c3
UW
37812012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
3782
3783 * hostio.c (handle_readlink): New function.
3784 (handle_vFile): Call it to handle "vFile:readlink" packets.
3785
901f9912
UW
37862012-01-20 Pedro Alves <palves@redhat.com>
3787 Ulrich Weigand <ulrich.weigand@linaro.org>
3788
3789 * server.c (handle_v_requests): Only support vAttach and vRun to
3790 start multiple processes when in extended protocol mode.
3791
fc1ab1a0
PA
37922012-01-17 Pedro Alves <palves@redhat.com>
3793
3794 * tracepoint.c (initialize_tracepoint): Use mmap instead of
3795 memalign plus mprotect to allocate the scratch buffer.
3796
7d5d4e98
PA
37972012-01-13 Pedro Alves <palves@redhat.com>
3798
3799 * server.c (attach_inferior): Clear `cont_thread'.
3800
f128d5e9
PA
38012012-01-13 Pedro Alves <palves@redhat.com>
3802
3803 * server.c (main): Avoid infinite loop while detaching/killing
3804 after a longjmp.
3805
06db92f0
DE
38062012-01-09 Doug Evans <dje@google.com>
3807
3808 * server.c (start_inferior): Set last_ptid in --wrapper case.
3809
32d92999
YQ
38102012-01-06 Yao Qi <yao@codesourcery.com>
3811
3812 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
3813 defined.
3814 [IN_PROCESS_AGENT] (debug_agent): New global variable.
3815
5e0a92a9
YQ
38162012-01-04 Yao Qi <yao@codesourcery.com>
3817
3818 * tracepoint.c (cmd_qtdp): Print debug message
3819 for static tracepoint.
3820
ae639e8c
YQ
38212012-01-04 Yao Qi <yao@codesourcery.com>
3822
3823 * tracepoint.c (trace_vdebug): Differentiate debug message
3824 between gdbserver and IPA.
3825
f72429c5
YQ
38262012-01-03 Yao Qi <yao@codesourcery.com>
3827
3828 * tracepoint.c (tracepoint_was_hit): Don't collect for
3829 static tracepoint.
3830
12c3e59c
JB
38312012-01-02 Joel Brobecker <brobecker@adacore.com>
3832
3833 * terminal.h: Reformat copyright header.
3834
67827812
JB
38352012-01-02 Joel Brobecker <brobecker@adacore.com>
3836
3837 * server.c (gdbserver_version): Update copyright year.
3838 * gdbreplay.c (gdbreplay_version): Likewise.
3839
3e52c33d
JK
38402011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
3841
3842 * linux-low.c (linux_create_inferior): Put empty if clause for write.
3843
3844 Revert:
3845 2011-12-18 Hui Zhu <teawater@gmail.com>
3846 * linux-low.c (linux_create_inferior): Save return value to ret.
3847
66f1260e
HZ
38482011-12-18 Hui Zhu <teawater@gmail.com>
3849
3850 * linux-low.c (linux_create_inferior): Save return value to ret.
3851
e77616d7
DE
38522011-12-16 Doug Evans <dje@google.com>
3853
e7b06c57
DE
3854 * linux-low.c (linux_create_inferior): If stdio connection,
3855 redirect stdin from /dev/null, stdout to stderr.
3856 * remote-utils.c (remote_is_stdio): New static global.
3857 (remote_connection_is_stdio): New function.
3858 (remote_prepare): Handle stdio connection.
3859 (remote_open): Ditto.
3860 (remote_close): Don't close stdin for stdio connections.
3861 (read_prim,write_prim): New functions. Replace all calls to
3862 read/write to these.
3863 * server.c (main): Watch for "-" argument. Move call to
3864 remote_prepare before start_inferior.
3865 * server.h (STDIO_CONNECTION_NAME): New macro.
3866 (remote_connection_is_stdio): Declare.
3867
e77616d7
DE
3868 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
3869 in debugging output.
3870
82067193
YQ
38712011-12-15 Yao Qi <yao@codesourcery.com>
3872
3873 * tracepoint.c: Include sys/syscall.h.
3874 (gdb_ust_thread): Remove preprocessor conditional.
3875
82bfbe7e
PA
38762011-12-14 Pedro Alves <pedro@codesourcery.com>
3877
3878 * linux-low.c (linux_detach_one_lwp): Call
3879 the_low_target.prepare_to_resume before detaching.
3880
712c6575
YQ
38812011-12-14 Yao Qi <yao@codesourcery.com>
3882
3883 * tracepoint.c (gdb_ust_thread): Don't ignore return value
3884 of write.
3885
d54d1edf
YQ
38862011-12-14 Yao Qi <yao@codesourcery.com>
3887
3888 * i386-low.c (i386_low_stopped_data_address): Initialize local
3889 variable `control'.
3890
6210a125
PA
38912011-12-13 Pedro Alves <pedro@codesourcery.com>
3892
3893 PR remote/13492
3894
3895 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
3896 DR_CONTROL unless necessary. Extend comments.
3897 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
3898 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
3899
2ece8244
YQ
39002011-12-13 Yao Qi <yao@codesourcery.com>
3901
3902 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
3903 macros.
3904 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
3905
784867a5
JK
39062011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
3907
3908 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
3909 Print new debug message for such case.
3910
6bf36717
JK
39112011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
3912
3913 Fix overlapping memcpy.
3914 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
3915 the read_inferior_memory transfer.
3916 (delete_fast_tracepoint_jump): New variable buf. Use it for the
3917 write_inferior_memory transfer.
3918 (set_fast_tracepoint_jump): New variable buf. Use it for the
3919 read_inferior_memory and write_inferior_memory transfers.
3920 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
3921 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
3922 Use it for the write_inferior_memory transfer.
3923 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
3924 buffers.
3925
50275556
MR
39262011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
3927
3928 * linux-low.c (fetch_register, store_register): Make code
3929 consistent, fix formatting.
3930
7325beb4
MR
39312011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
3932
3933 * linux-low.c (usr_store_inferior_registers): Factor out code
3934 to handle individual registers into...
3935 (store_register): ... this new function.
3936
c642a434
UW
39372011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
3938
3939 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
3940 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
3941 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
3942 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
3943 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
3944 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
3945 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
3946 (srv_xmlfiles): Add new XML files.
3947
3948 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
3949 and <sys/uio.h>.
3950 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
3951 (init_registers_s390_linux32v1): Add prototype.
3952 (init_registers_s390_linux32v2): Likewise.
3953 (init_registers_s390_linux64v1): Likewise.
3954 (init_registers_s390_linux64v2): Likewise.
3955 (init_registers_s390x_linux64v1): Likewise.
3956 (init_registers_s390x_linux64v2): Likewise.
3957 (s390_num_regs): Increment to 52.
3958 (s390_regmap): Add orig_r2 register.
3959 (s390_num_regs_3264): Increment to 68.
3960 (s390_regmap_3264): Add orig_r2 register.
3961 (s390_collect_ptrace_register): Handle orig_r2 register.
3962 (s390_supply_ptrace_register): Likewise.
3963 (s390_fill_last_break): New function.
3964 (s390_store_last_break): Likewise.
3965 (s390_fill_system_call): New function.
3966 (s390_store_system_call): Likewise.
3967 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
3968 register sets.
3969 (s390_check_regset): New function.
3970 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
3971 NT_S390_SYSTEM_CALL regsets and use appropriate description.
3972 Update target_regsets for available register sets.
3973
2268b414
JK
39742011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
3975 Jan Kratochvil <jan.kratochvil@redhat.com>
3976
3977 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
3978 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
3979 New.
3980 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
3981 * linux-low.h (struct process_info_private): New member r_debug.
3982 * server.c (handle_qxfer_libraries): Call
3983 the_target->qxfer_libraries_svr4.
3984 (handle_qxfer_libraries_svr4): New function.
3985 (qxfer_packets): New entry "libraries-svr4".
3986 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
3987 * target.h (struct target_ops): New member qxfer_libraries_svr4.
3988 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
3989 PACKET_qXfer_libraries_svr4.
3990
d6db1fab
UW
39912011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
3992
3993 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
3994 PSW address/mask between 8-byte and 16-byte formats.
3995 (s390_supply_ptrace_register): Likewise.
3996 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
3997 basic addressing mode bit.
3998
242f5f1c
SS
39992011-11-24 Stan Shebs <stan@codesourcery.com>
4000
4001 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
4002
f196051f
SS
40032011-11-17 Stan Shebs <stan@codesourcery.com>
4004
4005 * tracepoint.c (struct tracepoint): New field traceframe_usage.
4006 (tracing_start_time): New global.
4007 (tracing_stop_time): New global.
4008 (tracing_user_name): New global.
4009 (tracing_notes): New global.
4010 (tracing_stop_note): New global.
4011 (cmd_qtstart): Set traceframe_usage, start_time.
4012 (stop_tracing): Set stop_time.
4013 (cmd_qtstatus): Report additional status.
4014 (cmd_qtp): New function.
4015 (handle_tracepoint_query): Call it.
4016 (cmd_qtnotes): New function.
4017 (handle_tracepoint_general_set): Call it.
4018 (get_timestamp): Rename from tsv_get_timestamp.
4019
405f8e94
SS
40202011-11-14 Stan Shebs <stan@codesourcery.com>
4021 Kwok Cheung Yeung <kcy@codesourcery.com>
4022
4023 * linux-x86-low.c (small_jump_insn): New.
4024 (i386_install_fast_tracepoint_jump_pad): Add arguments for
4025 trampoline and error message, build a trampoline and issue a small
4026 jump instruction to it.
4027 (x86_install_fast_tracepoint_jump_pad): Add arguments for
4028 trampoline and error message.
4029 (x86_get_min_fast_tracepoint_insn_len): New.
4030 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
4031 * linux-low.h (struct linux_target_ops): Add arguments to
4032 install_fast_tracepoint_jump_pad operation, add new operation.
4033 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
4034 arguments.
4035 (linux_get_min_fast_tracepoint_insn_len): New function.
4036 (linux_target_op): Add new operation.
4037 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
4038 (gdb_trampoline_buffer_end): Ditto.
4039 (gdb_trampoline_buffer_error): Ditto.
4040 (struct ipa_sym_addresses): Add fields for new IPA variables.
4041 (symbol_list): Add entries for new IPA variables.
4042 (struct tracepoint): Add fields to hold the address range of the
4043 trampoline used by the tracepoint.
4044 (trampoline_buffer_head): New static variable.
4045 (trampoline_buffer_tail): Ditto.
4046 (claim_trampoline_space): New function.
4047 (have_fast_tracepoint_trampoline_buffer): New function.
4048 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
4049 structure.
4050 (install_fast_tracepoint): Ditto, also add error buffer argument.
4051 (cmd_qtminftpilen): New function.
4052 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
4053 (fast_tracepoint_from_trampoline_address): New function.
4054 (fast_tracepoint_collecting): Handle trampoline as part of jump
4055 pad space.
4056 (set_trampoline_buffer_space): New function.
4057 (initialize_tracepoint): Initialize new IPA variables.
4058 * target.h (struct target_ops): Add arguments to
4059 install_fast_tracepoint_jump_pad operation, add new
4060 get_min_fast_tracepoint_insn_len operation.
4061 (target_get_min_fast_tracepoint_insn_len): New.
4062 (install_fast_tracepoint_jump_pad): Add arguments.
4063 * server.h (IPA_BUFSIZ): Define.
4064 * linux-i386-ipa.c: Include extra header files.
4065 (initialize_fast_tracepoint_trampoline_buffer): New function.
4066 (initialize_low_tracepoint): Call it.
4067 * server.h (set_trampoline_buffer_space): Declare.
4068 (claim_trampoline_space): Ditto.
4069 (have_fast_tracepoint_trampoline_buffer): Ditto.
4070
1e4d1764
YQ
40712011-11-14 Yao Qi <yao@codesourcery.com>
4072
4073 * server.c (handle_query): Handle InstallInTrace for qSupported.
4074 * tracepoint.c (add_tracepoint): Sort list.
4075 (install_tracepoint, download_tracepoint): New.
4076 (cmd_qtdp): Call them to install and download tracepoints.
4077 (sort_tracepoints): Removed.
4078 (cmd_qtstart): Update.
4079
5c73ff4e
YQ
40802011-11-14 Yao Qi <yao@codesourcery.com>
4081
4082 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
4083 * mem-break.h: Declare.
4084 * tracepoint.c (cmd_qtstart): Move some code to ...
4085 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
4086 New.
4087 (download_tracepoints): Move some code to ...
4088 (download_tracepoint_1): ... here. New.
4089
86a30030
YQ
40902011-11-08 Yao Qi <yao@codesourcery.com>
4091
4092 * remote-utils.c (relocate_instruction): A comment fix.
4093
8d26e50c
JB
40942011-11-07 Joel Brobecker <brobecker@adacore.com>
4095
4096 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
4097 (i386_dr_low_get_control, i386_dr_low_get_status): Use
4098 dr_status_mirror and dr_control_mirror from debug_reg_state.
4099 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
4100 (i386_initial_stuff): Remove use of deleted globals.
4101 (i386_get_thread_context, i386_set_thread_context,
4102 i386_thread_added): Use dr_status_mirror and dr_control_mirror
4103 from debug_reg_state.
4104
a59306a3
YQ
41052011-11-05 Yao Qi <yao@codesourcery.com>
4106
4107 * tracepoint.c (gdb_collect): Loop over tracepoints of same
4108 address as TPOINT's.
4109
3065dfb6
SS
41102011-11-02 Stan Shebs <stan@codesourcery.com>
4111
4112 * tracepoint.c (agent_mem_read_string): New function.
4113 (eval_agent_expr): Call it for tracenz.
4114 * server.c (handle_query): Report support for tracenz.
4115
fd0d8c7c
YQ
41162011-11-02 Yao Qi <yao@codesourcery.com>
4117
4118 * tracepoint.c (cmd_qtstart): Remove unused local variables.
4119
609086b1
YQ
41202011-11-02 Yao Qi <yao@codesourcery.com>
4121
4122 * target.h: Fix a typo in comment.
4123
b9fd1791
PA
41242011-10-31 Pedro Alves <pedro@codesourcery.com>
4125
4126 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
4127 clobber the breakpoints' shadows with fast tracepoint jumps.
4128 * mem-break.h (check_mem_write): Add `myaddr' parameter.
4129 * target.c (write_inferior_memory): Also pass MYADDR down to
4130 check_mem_write.
4131
03583c20
UW
41322011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
4133
4134 * configure.ac: Check support for personality routine.
4135 * configure: Regenerate.
4136 * config.in: Likewise.
4137 * linux-low.c: Include <sys/personality.h>.
4138 Define ADDR_NO_RANDOMIZE if necessary.
4139 (linux_create_inferior): Disable address space randomization when
4140 forking inferior, if requested.
4141 (linux_supports_disable_randomization): New function.
4142 (linux_target_ops): Install it.
4143 * server.h (disable_randomization): Declare.
4144 * server.c (disable_randomization): New global variable.
4145 (handle_general_set): Handle QDisableRandomization.
4146 (handle_query): Likewise for qSupported.
4147 (main): Support --disable-randomization and --no-disable-randomization
4148 command line arguments.
4149 * target.h (struct target_ops): Add supports_disable_randomization.
4150 (target_supports_disable_randomization): New macro.
4151
723b724b
MF
41522011-09-29 Mike Frysinger <vapier@gentoo.org>
4153
4154 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
4155 ifdef check.
4156 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
4157 [!PT_GETDSBT] (target_loadmap): New definition.
4158 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
4159 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
4160 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
4161 and PT_GETDSBT to LINUX_LOADMAP.
4162 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
4163 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
4164
55329a5c 41652011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
71487fd7
UW
4166
4167 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
4168 (arm_linux_hwbp_cap): New static variable.
4169 (arm_linux_get_hwbp_cap): Replace by ...
4170 (arm_linux_init_hwbp_cap): ... this new function.
4171 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
4172 (arm_linux_get_hw_watchpoint_count): Likewise.
4173 (arm_linux_get_hw_watchpoint_max_length): Likewise.
4174 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
4175 (arm_prepare_to_resume): Use perror_with_name instead of error.
4176
55329a5c 41772011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
09b4ad9f
UW
4178
4179 * linux-arm-low.c: Include <signal.h>.
4180 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
4181 (struct arm_linux_hwbp_cap): New data type.
4182 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
4183 (struct arm_linux_hw_breakpoint): New data type.
4184 (MAX_BPTS, MAX_WPTS): Define.
4185 (struct arch_process_info, struct arch_lwp_info): New data types.
4186 (arm_linux_get_hwbp_cap): New function.
4187 (arm_linux_get_hw_breakpoint_count): Likewise.
4188 (arm_linux_get_hw_watchpoint_count): Likewise.
4189 (arm_linux_get_hw_watchpoint_max_length): Likewise.
4190 (arm_hwbp_control_initialize): Likewise.
4191 (arm_hwbp_control_is_enabled): Likewise.
4192 (arm_hwbp_control_is_initialized): Likewise.
4193 (arm_hwbp_control_disable): Likewise.
4194 (arm_linux_hw_breakpoint_equal): Likewise.
4195 (arm_linux_hw_point_initialize): Likewise.
4196 (struct update_registers_data): New data structure.
4197 (update_registers_callback: New function.
4198 (arm_insert_point): Likewise.
4199 (arm_remove_point): Likewise.
4200 (arm_stopped_by_watchpoint): Likewise.
4201 (arm_stopped_data_address): Likewise.
4202 (arm_new_process): Likewise.
4203 (arm_new_thread): Likewise.
4204 (arm_prepare_to_resume): Likewise.
4205 (the_low_target): Register arm_insert_point, arm_remove_point,
4206 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
4207 arm_new_thread, and arm_prepare_to_resume.
4208
6b9801d4
SS
42092011-09-15 Stan Shebs <stan@codesourcery.com>
4210
4211 * server.h (struct emit_ops): Add compare-goto fields.
4212 * tracepoint.c (gdb_agent_op_sizes): New table.
4213 (emit_eq_goto): New function.
4214 (emit_ne_goto): New function.
4215 (emit_lt_goto): New function.
4216 (emit_le_goto): New function.
4217 (emit_gt_goto): New function.
4218 (emit_ge_goto): New function.
4219 (is_goto_target): New function.
4220 (compile_bytecodes): Recognize special cases of compare-goto
4221 combinations and call specialized emitters for them.
4222 * linux-x86-low.c (amd64_emit_eq_goto): New function.
4223 (amd64_emit_ne_goto): New function.
4224 (amd64_emit_lt_goto): New function.
4225 (amd64_emit_le_goto): New function.
4226 (amd64_emit_gt_goto): New function.
4227 (amd64_emit_ge_goto): New function.
4228 (amd64_emit_ops): Add the new functions.
4229 (i386_emit_eq_goto): New function.
4230 (i386_emit_ne_goto): New function.
4231 (i386_emit_lt_goto): New function.
4232 (i386_emit_le_goto): New function.
4233 (i386_emit_gt_goto): New function.
4234 (i386_emit_ge_goto): New function.
4235 (i386_emit_ops): Add the new functions.
4236
bf15cbda
SS
42372011-09-08 Stan Shebs <stan@codesourcery.com>
4238
4239 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
4240 (i386_emit_epilogue): Restore %ebx.
4241
943ca1dd
JZ
42422011-08-31 Jie Zhang <jzhang918@gmail.com>
4243
4244 * server.c (step_thread): Remove definition.
4245 (process_serial_event): Don't handle Hs.
4246 * server.h (step_thread): Remove declaration.
4247 * target.c (set_desired_inferior): Remove use of step_thread.
4248
e3deef73
LM
42492011-08-24 Luis Machado <lgustavo@codesourcery.com>
4250
4251 * linux-low.c: Include linux-procfs.h.
4252 (linux_attach_lwp_1): Update comments.
4253 (linux_attach): Scan for existing threads when attaching to a
4254 process that is the tgid.
4255 * Makefile.in: Update dependencies.
4256
13da1c97
LM
42572011-08-24 Luis Machado <lgustavo@codesourcery.com>
4258
4259 * configure.srv: Add linux-procfs.o dependencies.
4260
881127c9
YQ
42612011-08-14 Yao Qi <yao@codesourcery.com>
4262
4263 * target.h (struct target_ops): Fix indent.
4264 * win32-low.c (win32_target_ops): Fix comment.
4265
58dbd541
YQ
42662011-08-14 Andrew Jenner <andrew@codesourcery.com>
4267 Yao Qi <yao@codesourcery.com>
4268
4269 * Makefile.in (clean): Remove tic6x-*.c files.
4270 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
4271 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
4272 (tic6x-c64xp-linux.c): Likewise.
4273 * configure.srv: Add support for tic6x-*-uclinux.
4274 * linux-tic6x-low.c: New.
4275 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
4276
78d85199
YQ
42772011-08-14 Andrew Stubbs <ams@codesourcery.com>
4278 Yao Qi <yao@codesourcery.com>
4279
4280 * target.h (struct target_ops): Add read_loadmap.
4281 * linux-low.c (struct target_loadseg): New type.
4282 (struct target_loadmap): New type.
4283 (linux_read_loadmap): New function.
4284 (linux_target_ops): Add linux_read_loadmap.
4285 * server.c (handle_query): Support qXfer:fdpic:read packet.
43aaf8b6
PA
4286 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
4287 to NULL.
78d85199 4288
a959a88d
EZ
42892011-08-05 Eli Zaretskii <eliz@gnu.org>
4290
4291 * win32-low.c: Include <stdint.h>.
4292
1ced966e
PA
42932011-07-22 Pedro Alves <pedro@codesourcery.com>
4294
4295 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
4296 to the inferior here.
4297 (i386_remove_aligned_watchpoint): Ditto.
4298 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
4299 fit part of the watchpoint in the debug registers.
4300 (i386_update_inferior_debug_regs): New.
4301 (i386_low_insert_watchpoint): Work on a local mirror of the debug
4302 registers, and only update the inferior on success.
4303 (i386_low_remove_watchpoint): Ditto.
4304
d26e3629
KY
43052011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
4306
4307 * linux-low.c (compare_ints, unique, list_threads, show_process,
4308 linux_core_of_thread): Delete.
4309 (linux_target_ops): Change linux_core_of_thread to
4310 linux_common_core_of_thread.
4311 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
4312 * utils.c (malloc_failure): Change type of argument.
4313 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
4314 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
4315 common/linux-osdata.c, common/ptid.c and common/buffer.c.
4316 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
4317 (IPA_OBJS): Add common-utils-ipa.o.
4318 (ptid_h, linux_osdata_h): New macros.
4319 (server_h): Add common/common-utils.h, common/xml-utils.h,
4320 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
4321 common/ptid.h.
4322 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
4323 ptid.o, buffer.o): New rules.
4324 (linux-low.o): Add common/linux-osdata.h as a dependency.
4325 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
4326 * configure.ac: Add AC_HEADER_DIRENT check.
4327 * config.in: Regenerate.
4328 * configure: Regenerate.
4329 * remote-utils.c (xml_escape_text): Delete.
4330 (buffer_grow, buffer_free, buffer_init, buffer_finish,
4331 buffer_xml_printf): Move to common/buffer.c.
4332 * server.c (main): Remove call to initialize_inferiors.
4333 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
4334 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
4335 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
4336 internal_error, gdb_assert, gdb_assert_fail): Delete.
4337 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
4338 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
4339 common/buffer.h.
4340 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
4341 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
4342 initialize_inferiors): Delete.
4343
2275a1a7
PA
43442011-07-20 Pedro Alves <pedro@codesourcery.com>
4345
4346 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
4347 symbol error.
4348
0a5b1e09
PA
43492011-05-31 Pedro Alves <pedro@codesourcery.com>
4350
4351 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
4352 assertion.
4353 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
4354
6938fd34
YQ
43552011-05-26 Yao Qi <yao@codesourcery.com>
4356
4357 * Makefile.in (thread-db.o): Track dependence to
4358 common/gdb_thread_db.h.
4359 * thread-db.c: include gdb_thread_db.h from right place.
4360
b481f9e0
TT
43612011-05-16 Adrian Cornish <gnu@bluedreamer.com>
4362
4363 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
4364 __FILE__ and __LINE__ to internal_error.
4365
98a5dd13
DE
43662011-05-13 Doug Evans <dje@google.com>
4367
4368 * thread-db.c (try_thread_db_load_from_sdir): New function.
4369 (try_thread_db_load_from_dir): New function.
4370 (thread_db_load_search): Handle $sdir, ignore $pdir.
4371 Remove trying of system directories if search of
4372 libthread-db-search-path fails, that is now done via $sdir.
4373
d248b706
KY
43742011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
4375
4376 * server.c (handle_query): Add EnableDisableTracepoints to the list
4377 of supported features.
43aaf8b6 4378 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
d248b706 4379 tracepoints.
43aaf8b6
PA
4380 (cmd_qtenable_disable): New.
4381 (cmd_qtstart): Install tracepoints even if disabled.
4382 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
4383 receiving a QTEnable or QTDisable packet.
4384 (gdb_collect): Skip data collection if fast tracepoint is disabled.
4385 (ust_marker_to_static_tracepoint): Do not ignore disabled static
4386 tracepoints.
4387 (gdb_probe): Skip data collection if static tracepoint is disabled.
d248b706 4388
84e578fb
DE
43892011-05-10 Doug Evans <dje@google.com>
4390
4391 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
4392
71f55dd8
DE
43932011-05-04 Doug Evans <dje@google.com>
4394
4395 * linux-low.c (linux_join): Skip process lookup.
4396 * spu-low.c (spu_join): Ditto.
4397 * server.c (join_inferiors_callback): Delete.
4398 (process_serial_event): For 'D' packet (detach) call join_inferior
4399 directly.
4400
4d393d60
JM
44012011-05-04 Joseph Myers <joseph@codesourcery.com>
4402
4403 * README: Don't mention xscale*-*-linux*.
4404 * configure.srv (xscale*-*-linux*): Don't handle target.
4405
b00ad6ff
NF
44062011-04-27 Nathan Froyd <froydnj@codesourcery.com>
4407
4408 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
4409 casting pointers.
4410 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
4411 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
4412 (i386_emit_void_call_2): Likewise.
4413
af96c192
YQ
44142011-04-26 Yao Qi <yao@codesourcery.com>
4415
43aaf8b6
PA
4416 * linux-low.c: Move common macros to linux-ptrace.h.
4417 Include linux-ptrace.h.
af96c192
YQ
4418 * Makefile.in (linux_ptrace_h): New.
4419 (linux-low.o): Depends on linux-ptrace.h.
4420
03f2bd59
JK
44212011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
4422
4423 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
4424 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
4425 (remote_prepare): New function with most of the TCP code from ...
4426 (remote_open): ... here. Detect PORT here unconditionally. Move also
4427 setting transport_is_reliable.
4428 * server.c (run_once): New variable.
4429 (gdbserver_usage): Document it.
4430 (main): Set run_once for `--once'. Call remote_prepare. Exit after
4431 the first run if RUN_ONCE.
4432 * server.h (run_once, remote_prepare): New declarations.
4433
7a9dd1b2
TT
44342011-04-19 Tom Tromey <tromey@redhat.com>
4435
4436 * win32-low.c (handle_load_dll): Remove duplicate "the".
4437
81239425
PM
44382011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
4439
4440 Remove support for old Cygwin 1.5 versions.
4441 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
4442 function to avoid warning.
4443 (win32_add_one_solib): Use cygwin_conv_path function to avoid
4444 warning.
4445
9e0627f1
PM
44462011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
4447
4448 * gdbserver/server.h (Macro _): Define it if not available.
4449
588eebee
MS
44502011-03-14 Michael Snyder <msnyder@vmware.com>
4451
348af9f7 4452 * hostio.c (handle_close): Remove unnecessary null test.
588eebee 4453
43f70d4c
JB
44542011-03-10 Joel Brobecker <brobecker@adacore.com>
4455
4456 * Makefile.in (maintainer-clean realclean distclean): Remove
4457 "make ... subdir_do" command.
4458
348af9f7
MS
44592011-03-10 Michael Snyder <msnyder@vmware.com>
4460
4461 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
4462
4463 * server.c (handle_v_run): Free alloced buffer on early return.
4464
e637a4f5
YQ
44652011-03-09 Yao Qi <yao@codesourcery.com>
4466
4467 Revert:
4468 2011-03-04 Yao Qi <yao@codesourcery.com>
4469
4470 * Makefile.in: Remove GNU make feature --directory.
4471
4472 2011-03-05 Yao Qi <yao@codesourcery.com>
4473
4474 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
4475 (subdir_do): New make target. Copied from gdb/Makefile.
4476 (maintainer-clean, realclean, distclean, clean): Call corresponding
4477 make targets in common/Makefile.
4478
4479 2011-02-11 Yao Qi <yao@codesourcery.com>
4480
4481 * configure.ac: Call AC_PROG_RANLIB.
4482 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
4483 * configure: Regenerate.
4484
e6edda56
JK
44852011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
4486
4487 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
4488
e5141119
JB
44892011-03-06 Yao Qi <yao@codesourcery.com>
4490
4491 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
4492
64794aa4
JB
44932011-03-05 Yao Qi <yao@codesourcery.com>
4494
4495 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
4496 (subdir_do): New make target. Copied from gdb/Makefile.
4497 (maintainer-clean, realclean, distclean, clean): Call corresponding
4498 make targets in common/Makefile.
4499
7a762829
YQ
45002011-03-04 Yao Qi <yao@codesourcery.com>
4501
4502 * Makefile.in: Remove GNU make feature --directory.
4503
348af9f7
MS
45042011-03-04 Michael Snyder <msnyder@vmware.com>
4505
4506 * server.c (queue_stop_reply): Call xmalloc not malloc.
4507
45082011-03-02 Michael Snyder <msnyder@vmware.com>
4509
4510 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
4511
9f72fee2
MS
45122011-02-28 Michael Snyder <msnyder@vmware.com>
4513
588eebee
MS
4514 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
4515 (cmd_qtframe): Ditto.
4516 (cmd_qtbuffer): Ditto.
4517 (cmd_bigqtbuffer): Ditto.
4518
9f72fee2
MS
4519 * utils.c (decimal2str): Initialize 'width' to nine, then
4520 don't mess with it.
4521
8040bd49
UW
45222011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
4523
4524 * hostio.c (require_data): Free *data, not data.
4525
7e52cbd0
JK
45262011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
4527
4528 * hostio.c (require_data): Use free, not xfree.
4529
9130f83e
MS
45302011-02-27 Michael Snyder <msnyder@vmware.com>
4531
4b812f4e
MS
4532 * server.c (handle_query): Discard unused value.
4533
9130f83e
MS
4534 * hostio.c (require_data): Free malloc memory before returning
4535 error.
4536
69d37113
MS
45372011-02-26 Michael Snyder <msnyder@vmware.com>
4538
4539 * linux-low.c (list_threads): Call closedir for dirent.
4540
35f5825a
MS
45412011-02-27 Michael Snyder <msnyder@vmware.com>
4542
2a589cef
MS
4543 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
4544 a case statement falls through.
4545
0adea5f7
MS
4546 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
4547
35f5825a
MS
4548 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
4549 in comparison.
4550
238f1c74
MS
45512011-02-26 Michael Snyder <msnyder@vmware.com>
4552
4553 * utils.c (decimal2str): Eliminate dead code and dead param.
4554 (pulongest): Drop dead param from call to decimal2str.
4555 (plongest): Ditto.
4556
633ff500
JB
45572011-02-24 Joel Brobecker <brobecker@adacore.com>
4558
4559 Revert the following patch (not approved yet):
4560 2011-02-21 Hui Zhu <teawater@gmail.com>
4561 * tracepoint.c (tp_printf): New function.
4562 (eval_agent_expr): Handle gdb_agent_op_printf.
4563
f9c6ff72
HZ
45642011-02-21 Hui Zhu <teawater@gmail.com>
4565
4566 * tracepoint.c (tp_printf): New function.
4567 (eval_agent_expr): Handle gdb_agent_op_printf.
4568
94d5e490
TT
45692011-02-18 Tom Tromey <tromey@redhat.com>
4570
4571 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
4572 (tracepoint.o): Likewise.
4573 * tracepoint.c (enum gdb_agent_op): Use ax.def.
4574 (gdb_agent_op_names): Likewise.
4575
c7f96d2b
TT
45762011-02-18 Tom Tromey <tromey@redhat.com>
4577
4578 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
4579 gdb_agent_op_rot>: New constants.
4580 (gdb_agent_op_names): Add pick and roll.
4581 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
4582 cases.
4583
0feedb2c
JK
45842011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
4585
4586 * aclocal.m4: Regenerated with aclocal-1.11.1.
4587
b3b9301e
PA
45882011-02-14 Pedro Alves <pedro@codesourcery.com>
4589
4590 * server.c (handle_qxfer_traceframe_info): New.
4591 (qxfer_packets): Register "traceframe-info".
4592 (handle_query): Report support for qXfer:traceframe-info:read+.
4593 * tracepoint.c (match_blocktype): New.
4594 (traceframe_find_block_type): Rename to ...
4595 (traceframe_walk_blocks): ... this. Add callback filter argument,
4596 and use it.
4597 (traceframe_find_block_type): New, reimplemented on top of
4598 traceframe_walk_blocks.
4599 (build_traceframe_info_xml): New.
4600 (traceframe_read_info): New.
4601 * server.h (traceframe_read_info): Declare.
4602
4f3e6fb7
YQ
46032011-02-11 Yao Qi <yao@codesourcery.com>
4604
4605 * configure.ac: Call AC_PROG_RANLIB.
4606 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
4607 * configure: Regenerate.
4608
764880b7
PA
46092011-02-07 Pedro Alves <pedro@codesourcery.com>
4610
4611 * server.c (gdb_read_memory): Change return semantics to allow
4612 partial transfers.
4613 (handle_search_memory_1): Adjust.
4614 (process_serial_event) <'m' packet>: Handle partial transfers.
4615 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
4616
1c79eb8a
PA
46172011-01-28 Pedro Alves <pedro@codesourcery.com>
4618
4619 * regcache.c (init_register_cache): Initialize
4620 regcache->register_status.
4621 (free_register_cache): Release regcache->register_status.
4622 (regcache_cpy): Copy register_status.
4623 (registers_to_string): Print 'x's for unavailable registers.
4624 (supply_register): Mark the register's status valid or
4625 unavailable, depending on whether a buffer was passed in or not.
4626 (supply_register_zeroed): New.
4627 (supply_regblock): Mark the registers' status valid or
4628 unavailable, depending on whether a buffer was passed in or not.
4629 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
4630 (struct regcache): New `register_status' field.
4631 (supply_register_zeroed): Declare.
4632 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
4633 supply_register_zeroed, rather than passing a NULL buffer to
4634 supply_register.
4635 * tracepoint.c (fetch_traceframe_registers): Update comment.
4636
85724a0e
PA
46372011-01-28 Pedro Alves <pedro@codesourcery.com>
4638
4639 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
4640 buffer explicit.
4641
d08aafef
PA
46422011-01-25 Pedro Alves <pedro@codesourcery.com>
4643
4644 * server.h (decode_xfer_write): Change prototype.
4645 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
4646 and don't extract the annex here.
4647 * server.c (decode_xfer_read): Remove `annex' parameter,
4648 and don't extract the annex here.
4649 (decode_xfer): New.
4650 (struct qxfer): New.
4651 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
4652 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
4653 (handle_qxfer_statictrace): New functions, abstracted out from
4654 handle_query, and made to use the struct qxfer interface.
4655 (handle_threads_qxfer_proper): Rename to ...
4656 (handle_qxfer_threads_proper): ... this.
4657 (handle_threads_qxfer): Rename to ...
4658 (handle_qxfer_threads): ... this. Adjust.
4659 (qxfer_packets): New array.
4660 (handle_qxfer): New function.
4661 (handle_query): Use handle_qxfer.
4662
493e2a69
MS
46632011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
4664
4665 * gdbreplay.c: Shorten lines of >= 80 columns.
4666 * linux-low.c: Ditto.
4667 * linux-ppc-low.c: Ditto.
4668 * linux-s390-low.c: Ditto.
4669 * linux-sparc-low.c: Ditto.
4670 * linux-x86-low.c: Ditto.
4671 * linux-xtensa-low.c: Ditto.
4672 * mem-break.c: Ditto.
4673 * nto-low.c: Ditto.
4674 * regcache.h: Ditto.
4675 * remote-utils.c: Ditto.
4676 * server.c: Ditto.
4677 * server.h: Ditto.
4678 * thread-db.c: Ditto.
4679 * tracepoint.c: Ditto.
4680 * utils.c: Ditto.
4681 * win32-low.h: Ditto.
4682
44944448
JB
46832011-01-05 Joel Brobecker <brobecker@adacore.com>
4684
4685 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
4686 update.
4687
71ce852c
JB
46882011-01-01 Joel Brobecker <brobecker@adacore.com>
4689
4690 * server.c (gdbserver_version): Update copyright year in version
4691 output.
4692 * gdbreplay.c (gdbreplay_version): Ditto.
4693
eb826dc6
MF
46942010-12-29 Jie Zhang <jie.zhang@analog.com>
4695
4696 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
4697 * linux-bfin-low.c: New file.
4698 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
4699 PT_DATA_ADDR for BFIN targets.
4700 * Makefile.in (SFILES): Add linux-bfin-low.c.
4701 (clean): Remove reg-bfin.c.
4702 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
4703 * README: Mention supported Blackfin targets.
4704
39ab222a
MF
47052010-12-23 Mike Frysinger <vapier@gentoo.org>
4706
4707 * .gitignore: New file.
4708
a1f2ce7d
MF
47092010-11-16 Mike Frysinger <vapier@gentoo.org>
4710
4711 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
4712
f474844c
JZ
47132010-10-22 Jie Zhang <jie@codesourcery.com>
4714
4715 * Makefile.in: Add FLAGS_TO_PASS variable.
4716 (install): Remove dependency of install-only and recursively
4717 invoke make for install-only.
4718
f1048712
DE
47192010-10-04 Doug Evans <dje@google.com>
4720
4721 * Makefile.in (uninstall): Use $(DESTDIR).
4722
b53a1623
PA
47232010-09-24 Pedro Alves <pedro@codesourcery.com>
4724
e6ee044d
PA
4725 PR gdb/11842
4726
b53a1623
PA
4727 * linux-x86-low.c (compat_siginfo_from_siginfo)
4728 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
4729 si_code is < 0. Check for si_code == SI_TIMER before checking for
4730 si_code < 0.
4731
fa1bd1e4
JB
47322010-09-13 Joel Brobecker <brobecker@adacore.com>
4733
4734 * lynx-i386-low.c: New file.
4735 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
4736
47fac8f8
JB
47372010-09-13 Joel Brobecker <brobecker@adacore.com>
4738
4739 * lynx-low.c (ptrace_request_to_str): Remove handling for
4740 request values that have been removed in LynxOS 5.x.
4741
1adfc54d
JB
47422010-09-13 Joel Brobecker <brobecker@adacore.com>
4743
4744 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
4745 <ptrace.h>
4746
c2a66c29
NS
47472010-09-09 Nathan Sidwell <nathan@codesourcery.com>
4748
4749 * configure.ac: Add --enable-inprocess-agent option.
4750 * configure: Rebuilt.
4751
32fcada3
YQ
47522010-09-06 Yao Qi <yao@codesourcery.com>
4753
4754 * linux-low.c (linux_kill): Remove unused variable.
4755 (linux_stabilize_threads): Likewise.
4756 * server.c (start_inferior): Likewise.
4757 (queue_stop_reply_callback): Likewise.
4758 * tracepoint.c (do_action_at_tracepoint): Likewise.
4759
0cccb683
YQ
47602010-09-06 Yao Qi <yao@codesourcery.com>
4761
4762 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
4763 on return.
4764
423ec54c
JK
47652010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
4766
4767 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
4768
12ac6819
PA
47692010-09-06 Pedro Alves <pedro@codesourcery.com>
4770
4771 * Makefile.in (install-only): Replace $IPA_DEPFILES with
4772 "$(IPA_DEPFILES)".
4773
8ed54b31
JB
47742010-09-01 Joel Brobecker <brobecker@adacore.com>
4775
4776 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
4777 gdbserver/lynx-ppc-low.c: New files.
4778 * Makefile.in (lynx_low_h): New variable.
4779 (lynx-low.o, lynx-ppc-low.o): New rules.
4780 * configure.ac: On LynxOS, link with -lnetinet.
4781 * configure.srv: Add handling of powerpc-*-lynxos* targets.
4782 * configure: regenerate.
4783
bb0116a4
JB
47842010-09-01 Joel Brobecker <brobecker@adacore.com>
4785
4786 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
4787 * configure.ac: Add check for vasprintf and vsnprintf.
4788 * configure, config.in: Regenerate.
4789 * server.h (vasprintf, vsnprintf): Add conditional declarations.
4790
a778ab81 47912010-09-01 Joel Brobecker <brobecker@adacore.com>
4792
4793 * gdbreplay.c: Move include of alloca.h up, next to include of
4794 malloc.h.
4795 * server.h: Add include of malloc.h.
4796 * mem-break.c: Remove include of malloc.h.
4797 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
4798
8b034a19 47992010-09-01 Joel Brobecker <brobecker@adacore.com>
4800
4801 * Makefile.in (memmem.o): Build with -Wno-error.
4802
48032010-09-01 Joel Brobecker <brobecker@adacore.com>
4804
4805 * utils.c (xsnprintf): Make non-static.
4806 * server.h: Add xsnprintf declaration.
4807 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
4808 replace calls to snprintf by calls to xsnprintf throughout.
4809
48102010-09-01 Joel Brobecker <brobecker@adacore.com>
4811
4812 * configure.ac: Add configure check for alloca.
4813 * configure, config.in: Regenerate.
4814 * server.h: Include alloca.h if it exists.
4815 * gdbreplay.c: Include alloca.h if it exists.
4816
1a981360
PA
48172010-08-28 Pedro Alves <pedro@codesourcery.com>
4818
4819 * linux-low.c (__SIGRTMIN): Define if not already defined.
4820 (linux_create_inferior): Check for __ANDROID__ rather than
4821 __SIGRTMIN.
4822 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
4823 are already deferred.
4824 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
4825 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
4826 stopped and already has a pending signal to report.
4827 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
4828 a pending signal to report or is moving out of a jump pad.
4829 (linux_init_signals): Check for __ANDROID__ rather than
4830 __SIGRTMIN.
4831
b4d51a55
PA
48322010-08-28 Pedro Alves <pedro@codesourcery.com>
4833
4834 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
4835 debug_threads check. Avoid a linear search when not doing debug
4836 output.
4837
ec48365d
PA
48382010-08-27 Pedro Alves <pedro@codesourcery.com>
4839
4840 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
4841 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
4842 (struct file_handler) <fd>: Change type to gdb_fildes_t.
4843 (process_event): Change local fd's type to gdb_fildes_t.
4844 (create_file_handler): Adjust prototype.
4845 (delete_file_handler): Adjust prototype.
4846 (handle_file_event): Adjust prototype. Use pfildes.
4847 (create_file_event): Adjsut prototype.
4848 * remote-utils.c (remote_desc, listen_desc): Change type to
4849 gdb_fildes_t.
4850 * server.h: New gdb_fildes_t typedef.
4851 [USE_WIN32API]: Include winsock2.h.
4852 (delete_file_handler, add_file_handler): Adjust prototypes.
4853 (pfildes): Declare.
4854 * utils.c (pfildes): New.
4855
854d88f0
PA
48562010-08-27 Pedro Alves <pedro@codesourcery.com>
4857
4858 * configure.ac (build_warnings): Add -Wno-char-subscripts.
4859 * configure: Regenerate.
4860
0146f85b
PA
48612010-08-27 Pedro Alves <pedro@codesourcery.com>
4862
4863 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
4864 (linux_done_accessing_memory): ... this.
4865 (linux_target_ops): Adjust.
4866 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
4867 * nto-low.c (nto_target_ops): Adjust comment.
4868 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
4869 * spu-low.c (spu_target_ops): Adjust comment.
4870 * target.h (target_ops): Rename unprepare_to_access_memory field
4871 to done_accessing_memory.
4872 (unprepare_to_access_memory): Rename to ...
4873 (done_accessing_memory): ... this.
4874
90d74c30
PA
48752010-08-26 Pedro Alves <pedro@codesourcery.com>
4876
4877 * linux-low.c (linux_prepare_to_access_memory): New.
4878 (linux_unprepare_to_access_memory): New.
4879 (linux_target_ops): Install them.
4880 * server.c (read_memory): Rename to ...
4881 (gdb_read_memory): ... this. Use
4882 prepare_to_access_memory/prepare_to_access_memory.
4883 (write_memory): Rename to ...
4884 (gdb_write_memory): ... this. Use
4885 prepare_to_access_memory/prepare_to_access_memory.
4886 (handle_search_memory_1): Adjust.
4887 (process_serial_event): Adjust.
4888 * target.h (struct target_ops): New fields
4889 prepare_to_access_memory and unprepare_to_access_memory.
4890 (prepare_to_access_memory, unprepare_to_access_memory): New.
4891 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
4892 prepare_to_access_memory/prepare_to_access_memory.
4893 * nto-low.c (nto_target_ops): Adjust.
4894 * spu-low.c (spu_target_ops): Adjust.
4895 * win32-low.c (win32_target_ops): Adjust.
4896
fd467969
PA
48972010-08-26 Pedro Alves <pedro@codesourcery.com>
4898
4899 * Makefile.in (WARN_CFLAGS): Get it from configure.
4900 (WERROR_CFLAGS): New.
4901 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
4902 * configure.ac: Introduce --enable-werror, which adds -Werror to
4903 the compiler command line. Enabled by default. Disable with
4904 --disable-werror. Add -Wdeclaration-after-statement
4905 Wpointer-arith and -Wformat-nonliteral to warning flags.
4906 * configure: Regenerate.
4907
331e2f5f
PA
49082010-08-26 Pedro Alves <pedro@codesourcery.com>
4909
4910 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
4911
e581f2b4
PA
49122010-08-26 Pedro Alves <pedro@codesourcery.com>
4913
4914 * gdbreplay.c (remote_error): New.
4915 (gdbchar): New.
4916 (expect): Use gdbchar. Check for error reading from GDB.
4917 Clarify sync error output.
4918 (play): Check for errors writing to GDB.
4919 * linux-low.c (sigchld_handler): Really ignore `write' errors.
4920 * remote-utils.c (getpkt): Check for errors writing to the remote
4921 descriptor.
4922
3c11dd79
PA
49232010-08-25 Pedro Alves <pedro@codesourcery.com>
4924
4925 * linux-low.c (linux_wait_1): Move non-debugging code out of
4926 `debug_threads' control.
4927
d20a8ad9
PA
49282010-08-25 Pedro Alves <pedro@codesourcery.com>
4929
4930 * linux-low.c (linux_wait_1): Don't set last_status here.
4931 * server.c (push_event, queue_stop_reply_callback): Assert we're
4932 not pushing a TARGET_WAITKIND_IGNORE event.
4933 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
4934 (myresume, handle_target_event): Set the thread's last_resume_kind
4935 and last_status from the target returned status.
4936
964e4306
PA
49372010-08-25 Pedro Alves <pedro@codesourcery.com>
4938
4939 PR threads/10729
4940
4941 * linux-x86-low.c (update_debug_registers_callback): New.
4942 (i386_dr_low_set_addr): Use it.
4943 (i386_dr_low_get_addr): New.
4944 (i386_dr_low_set_control): Use update_debug_registers_callback.
4945 (i386_dr_low_get_control): New.
4946 (i386_dr_low_get_status): Adjust.
4947 * linux-low.c (linux_stop_lwp): New.
4948 * linux-low.h (linux_stop_lwp): Declare.
4949
4950 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
4951 argument instead of a i386_debug_reg_state.
4952 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
4953 a i386_debug_reg_state.
4954 (i386_insert_aligned_watchpoint): Adjust.
4955 (i386_remove_aligned_watchpoint): Adjust.
4956 (i386_low_stopped_data_address): Read the debug registers from the
4957 inferior instead of from the mirrors.
4958 * i386-low.h (struct i386_debug_reg_state): Extend comment.
4959 (i386_dr_low_get_addr): Declare.
4960 (i386_dr_low_get_control): Declare.
4961 (i386_dr_low_get_status): Change prototype.
4962
4963 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
4964 (i386_dr_low_get_addr): New.
4965 (i386_dr_low_get_control): New.
4966 (i386_dr_low_get_status): Adjust prototype. Return
4967 dr_status_mirror.
4968 (i386_initial_stuff): Clear dr_status_mirror and
4969 dr_control_mirror.
4970 (i386_get_thread_context): Adjust.
4971 (i386_set_thread_context): Adjust.
4972 (i386_thread_added): Adjust.
4973
5f21a75b
PA
49742010-08-24 Pedro Alves <pedro@codesourcery.com>
4975
4976 * linux-low.h (linux_thread_area): Delete declaration.
4977
3e4c1235
TS
49782010-08-11 Thomas Schwinge <thomas@codesourcery.com>
4979
4980 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
4981 after its termination.
4982
1971b033
PA
49832010-08-09 Pedro Alves <pedro@codesourcery.com>
4984
4985 * linux-low.c (gdb_wants_lwp_stopped): Delete.
4986 (gdb_wants_all_stopped): Delete.
4987 (linux_wait_1): Don't call them.
4988 * server.c (handle_v_cont): Tag all threads as want-stopped.
4989 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
4990 stopped as "client-wants-stopped".
4991
310444ac
PA
49922010-07-31 Pedro Alves <pedro@codesourcery.com>
4993
4994 * Makefile.in (signals_h): New.
4995 (server_h): Depend on it.
4996 (server.o): Don't depend on $(signals_def).
4997 (signals.o): Depend on $(signals_def).
4998
a19cae16
JK
49992010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
5000
5001 * Makefile.in (signals_def): New.
5002 (server_h): Append include/gdb/signals.h and signals_def.
5003 (server.o): Append signals_def.
5004
30d50328
JK
50052010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
5006
5007 * server.c (handle_target_event): Use target_signal_to_host for
5008 resume_info.sig initialization.
5009 * target.h (struct thread_resume) <sig>: New comment.
5010
5c3216e2
OS
50112010-07-20 Ozkan Sezer <sezeroz@gmail.com>
5012
c6f46ca0
OS
5013 * server.c (handle_query): strcpy() the returned string from paddress()
5014 instead of sprintf().
5c3216e2
OS
5015 * utils.c (paddress): Return phex_nz().
5016
6bd31874
JB
50172010-07-07 Joel Brobecker <brobecker@adacore.com>
5018
5019 * server.c (handle_v_cont): Call mourn_inferior if process
5020 just exited.
5021 (myresume): Likewise.
5022
0fb4aa4b
PA
50232010-07-01 Pedro Alves <pedro@codesourcery.com>
5024
5025 Static tracepoints, and integration with UST.
5026
5027 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
5028 * mem-break.c (uninsert_all_breakpoints)
5029 (reinsert_all_breakpoints): New.
5030 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
5031 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
5032 (gdb_agent_ust_loaded, helper_thread_id)
5033 (gdb_agent_helper_thread_id): New macros.
5034 (struct ipa_sym_addresses): Add addr_ust_loaded,
5035 addr_helper_thread_id, addr_cmd_buf.
5036 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
5037 (in_process_agent_loaded_ust): New.
5038 (write_e_ust_not_loaded): New.
5039 (maybe_write_ipa_ust_not_loaded): New.
5040 (struct collect_static_trace_data_action): New.
5041 (enum tracepoint_type) <static_tracepoint>: New.
5042 (struct tracepoint) <handle>: Mention static tracepoints.
5043 (struct static_tracepoint_ctx): New.
5044 (CMD_BUF_SIZE): New.
5045 (add_tracepoint_action): Handle static tracepoint actions.
5046 (unprobe_marker_at): New.
5047 (clear_installed_tracepoints): Handle static tracepoints.
5048 (cmd_qtdp): Handle static tracepoints.
5049 (probe_marker_at): New.
5050 (cmd_qtstart): Handle static tracepoints.
5051 (response_tracepoint): Handle static tracepoints.
5052 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
5053 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
5054 (get_context_regcache): Handle static tracepoints.
5055 (do_action_at_tracepoint): Handle static tracepoint actions.
5056 (traceframe_find_block_type): Handle static trace data blocks.
5057 (traceframe_read_sdata): New.
5058 (download_tracepoints): Download static tracepoint actions.
5059 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
5060 (GDB_PROBE_NAME): New.
5061 (ust_ops): New.
5062 (GET_UST_SYM): New.
5063 (USTF): New.
5064 (dlsym_ust): New.
5065 (ust_marker_to_static_tracepoint): New.
5066 (gdb_probe): New.
5067 (collect_ust_data_at_tracepoint): New.
5068 (gdb_ust_probe): New.
5069 (UNIX_PATH_MAX, SOCK_DIR): New.
5070 (gdb_ust_connect_sync_socket): New.
5071 (resume_thread, stop_thread): New.
5072 (run_inferior_command): New.
5073 (init_named_socket): New.
5074 (gdb_ust_socket_init): New.
5075 (cstr_to_hexstr): New.
5076 (next_st): New.
5077 (first_marker, next_marker): New.
5078 (response_ust_marker): New.
5079 (cmd_qtfstm, cmd_qtsstm): New.
5080 (unprobe_marker_at, probe_marker_at): New.
5081 (cmd_qtstmat, gdb_ust_thread): New.
5082 (gdb_ust_init): New.
5083 (initialize_tracepoint_ftlib): Call gdb_ust_init.
5084 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
5085 (ST_REGENTRY): New.
5086 (x86_64_st_collect_regmap): New.
5087 (X86_64_NUM_ST_COLLECT_GREGS): New.
5088 (AMD64_RIP_REGNUM): New.
5089 (supply_static_tracepoint_registers): New.
5090 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
5091 (ST_REGENTRY): New.
5092 (i386_st_collect_regmap): New.
5093 (i386_NUM_ST_COLLECT_GREGS): New.
5094 (supply_static_tracepoint_registers): New.
5095 * server.c (handle_query): Handle qXfer:statictrace:read.
5096 <qSupported>: Report support for StaticTracepoints, and
5097 qXfer:statictrace:read features.
5098 * server.h (traceframe_read_sdata)
5099 (supply_static_tracepoint_registers): Declare.
5100 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
5101 (unpack_varlen_hex): Include in IPA build.
5102 * Makefile.in (ustlibs, ustinc): New.
5103 (IPA_OBJS): Add remote-utils-ipa.o.
5104 ($(IPA_LIB)): Link -ldl and -lpthread.
5105 (UST_CFLAGS): New.
5106 (IPAGENT_CFLAGS): Add UST_CFLAGS.
5107 * config.in, configure: Regenerate.
5108
9e4344e5
PA
51092010-06-20 Ian Lance Taylor <iant@google.com>
5110 Pedro Alves <pedro@codesourcery.com>
5111
5112 * linux-x86-low.c (always_true): Delete.
5113 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
5114 trying to fool the compiler with always_true.
5115
c6beb2cb
PA
51162010-06-20 Pedro Alves <pedro@codesourcery.com>
5117
5118 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
5119 conditions in gdbserver.
5120
d2ed6730
UW
51212010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
5122
5123 * spu-low.c (spu_read_memory): Wrap around local store limit.
5124 (spu_write_memory): Likewise.
5125
4e29fb54
PA
51262010-06-15 Pedro Alves <pedro@codesourcery.com>
5127
5128 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
5129 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
5130 LONGEST uses.
5131 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
5132 uses.
5133 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
5134 uses with LONGEST uses.
5135
6a271cae
PA
51362010-06-14 Stan Shebs <stan@codesourcery.com>
5137 Pedro Alves <pedro@codesourcery.com>
5138
5139 Bytecode compiler.
5140
5141 * linux-x86-low.c: Include limits.h.
5142 (add_insns): New.
5143 (always_true): New.
5144 (EMIT_ASM): New.
5145 (EMIT_ASM32): New.
5146 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
5147 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
5148 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
5149 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
5150 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
5151 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
5152 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
5153 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
5154 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
5155 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
5156 (amd64_emit_void_call_2): New.
5157 (amd64_emit_ops): New.
5158 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
5159 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
5160 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
5161 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
5162 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
5163 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
5164 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
5165 (i386_emit_call, i386_emit_reg, i386_emit_pop)
5166 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
5167 (i386_emit_stack_adjust, i386_emit_int_call_1)
5168 (i386_emit_void_call_2): New.
5169 (i386_emit_ops): New.
5170 (x86_emit_ops): New.
5171 (the_low_target): Install x86_emit_ops.
5172 * server.h (struct emit_ops): New.
5173 (get_raw_reg_func_addr): Declare.
5174 (current_insn_ptr, emit_error): Declare.
5175 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
5176 (set_trace_state_variable_value): New defines.
5177 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
5178 addr_get_trace_state_variable_value and
5179 addr_set_trace_state_variable_value.
5180 (symbol_list): New fields for get_raw_reg,
5181 get_trace_state_variable_value and set_trace_state_variable_value.
5182 (condfn): New typedef.
5183 (struct tracepoint): New field `compiled_cond'.
5184 (do_action_at_tracepoint): Clear compiled_cond.
5185 (get_trace_state_variable_value, set_trace_state_variable_value):
5186 Export in the IPA.
5187 (condition_true_at_tracepoint): If there's a compiled condition,
5188 run that.
5189 (current_insn_ptr, emit_error): New globals.
5190 (struct bytecode_address): New.
5191 (get_raw_reg_func_addr): New.
5192 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
5193 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
5194 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
5195 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
5196 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
5197 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
5198 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
5199 (compile_tracepoint_condition, compile_bytecodes): New.
5200 * target.h (emit_ops): Forward declare.
5201 (struct target_ops): New field emit_ops.
5202 (target_emit_ops): New.
5203 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
5204 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
5205 * linux-low.c (linux_emit_ops): New.
5206 (linux_target_ops): Install it.
5207 * linux-low.h (struct linux_target_ops): New field emit_ops.
5208
92b72907
UW
52092010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
5210
5211 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
5212 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
5213
fa593d66
PA
52142010-06-01 Pedro Alves <pedro@codesourcery.com>
5215 Stan Shebs <stan@codesourcery.com>
5216
5217 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
5218 (all): Depend on $(extra_libraries).
5219 (install-only): Install the IPA.
5220 (IPA_OBJS, IPA_LIB): New.
5221 (clean): Remove the IPA lib.
5222 (IPAGENT_CFLAGS): New.
5223 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
5224 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
5225 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
5226 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
5227 * configure.ac: Check for atomic builtins support in the compiler.
5228 (IPA_DEPFILES, extra_libraries): Define.
5229 * configure.srv (ipa_obj): Add description.
5230 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
5231 (i[34567]86-*-linux*): Set ipa_obj.
5232 (x86_64-*-linux*): Set ipa_obj.
5233 * linux-low.c (stabilizing_threads): New.
5234 (supports_fast_tracepoints): New.
5235 (linux_detach): Stabilize threads before detaching.
5236 (handle_tracepoints): Handle internal tracing breakpoints. Assert
5237 the lwp is either not stabilizing, or is moving out of a jump pad.
5238 (linux_fast_tracepoint_collecting): New.
5239 (maybe_move_out_of_jump_pad): New.
5240 (enqueue_one_deferred_signal): New.
5241 (dequeue_one_deferred_signal): New.
5242 (linux_wait_for_event_1): If moving out of a jump pad, defer
5243 pending signals to later.
5244 (linux_stabilize_threads): New.
5245 (linux_wait_1): Check if threads need moving out of jump pads, and
5246 do it if so.
5247 (stuck_in_jump_pad_callback): New.
5248 (move_out_of_jump_pad_callback): New.
5249 (lwp_running): New.
5250 (linux_resume_one_lwp): Handle moving out of jump pads.
5251 (linux_set_resume_request): Dequeue deferred signals.
5252 (need_step_over_p): Also step over fast tracepoint jumps.
5253 (start_step_over): Also uninsert fast tracepoint jumps.
5254 (finish_step_over): Also reinsert fast tracepoint jumps.
5255 (linux_install_fast_tracepoint_jump): New.
5256 (linux_target_ops): Install linux_stabilize_threads and
5257 linux_install_fast_tracepoint_jump_pad.
5258 * linux-low.h (linux_target_ops) <get_thread_area,
5259 install_fast_tracepoint_jump_pad>: New fields.
5260 (struct lwp_info) <collecting_fast_tracepoint,
5261 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
5262 (linux_get_thread_area): Declare.
5263 * linux-x86-low.c (jump_insn): New.
5264 (x86_get_thread_area): New.
5265 (append_insns): New.
5266 (push_opcode): New.
5267 (amd64_install_fast_tracepoint_jump_pad): New.
5268 (i386_install_fast_tracepoint_jump_pad): New.
5269 (x86_install_fast_tracepoint_jump_pad): New.
5270 (the_low_target): Install x86_get_thread_area and
5271 x86_install_fast_tracepoint_jump_pad.
5272 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
5273 (struct fast_tracepoint_jump): New.
5274 (fast_tracepoint_jump_insn): New.
5275 (fast_tracepoint_jump_shadow): New.
5276 (find_fast_tracepoint_jump_at): New.
5277 (fast_tracepoint_jump_here): New.
5278 (delete_fast_tracepoint_jump): New.
5279 (set_fast_tracepoint_jump): New.
5280 (uninsert_fast_tracepoint_jumps_at): New.
5281 (reinsert_fast_tracepoint_jumps_at): New.
5282 (set_breakpoint_at): Use write_inferior_memory.
5283 (uninsert_raw_breakpoint): Use write_inferior_memory.
5284 (check_mem_read): Mask out fast tracepoint jumps.
5285 (check_mem_write): Mask out fast tracepoint jumps.
5286 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
5287 (set_fast_tracepoint_jump): Declare.
5288 (delete_fast_tracepoint_jump)
5289 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
5290 (reinsert_fast_tracepoint_jumps_at): Declare.
5291 * regcache.c: Don't compile many functions when building the
5292 in-process agent library.
5293 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
5294 the register buffer in the heap.
5295 (free_register_cache): If the register buffer isn't owned by the
5296 regcache, don't free it.
5297 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
5298 pre-existing register caches.
5299 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
5300 type.
5301 (convert_ascii_to_int): : Constify `from' parameter type.
5302 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
5303 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
5304 the needed buffer in-place.
5305 (relocate_instruction): New.
5306 * server.c (handle_query) <qSymbols>: If the target supports
5307 tracepoints, give it a chance of looking up symbols. Report
5308 support for fast tracepoints.
5309 (handle_status): Stabilize threads.
5310 (process_serial_event): Adjust.
5311 * server.h (struct fast_tracepoint_jump): Forward declare.
5312 (struct process_info) <fast_tracepoint_jumps>: New field.
5313 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
5314 (decode_X_packet, decode_M_packet): Adjust.
5315 (relocate_instruction): Declare.
5316 (in_process_agent_loaded): Declare.
5317 (tracepoint_look_up_symbols): Declare.
5318 (struct fast_tpoint_collect_status): Declare.
5319 (fast_tracepoint_collecting): Declare.
5320 (force_unlock_trace_buffer): Declare.
5321 (handle_tracepoint_bkpts): Declare.
5322 (initialize_low_tracepoint)
5323 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
5324 * target.h (struct target_ops) <stabilize_threads,
5325 install_fast_tracepoint_jump_pad>: New fields.
5326 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
5327 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
5328 [HAVE_STDINT_H]: Include stdint.h.
5329 (trace_debug_1): Rename to ...
5330 (trace_vdebug): ... this.
5331 (trace_debug): Rename to ...
5332 (trace_debug_1): ... this. Add `level' parameter.
5333 (trace_debug): New.
5334 (ATTR_USED, ATTR_NOINLINE): New.
5335 (IP_AGENT_EXPORT): New.
5336 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
5337 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
5338 (about_to_request_buffer_space, trace_buffer_is_full)
5339 (stopping_tracepoint, expr_eval_result, error_tracepoint)
5340 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
5341 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
5342 (traceframe_write_count, traceframes_created)
5343 (trace_state_variables)
5344 New renaming defines.
5345 (struct ipa_sym_addresses): New.
5346 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
5347 (symbol_list): New.
5348 (ipa_sym_addrs): New.
5349 (all_tracepoint_symbols_looked_up): New.
5350 (in_process_agent_loaded): New.
5351 (write_e_ipa_not_loaded): New.
5352 (maybe_write_ipa_not_loaded): New.
5353 (tracepoint_look_up_symbols): New.
5354 (debug_threads) [IN_PROCESS_AGENT]: New.
5355 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
5356 (UNKNOWN_SIDE_EFFECTS): New.
5357 (stop_tracing): New.
5358 (flush_trace_buffer): New.
5359 (stop_tracing_bkpt): New.
5360 (flush_trace_buffer_bkpt): New.
5361 (read_inferior_integer): New.
5362 (read_inferior_uinteger): New.
5363 (read_inferior_data_pointer): New.
5364 (write_inferior_data_pointer): New.
5365 (write_inferior_integer): New.
5366 (write_inferior_uinteger): New.
5367 (struct collect_static_trace_data_action): Delete.
5368 (enum tracepoint_type): New.
5369 (struct tracepoint) <type>: New field `type'.
43aaf8b6
PA
5370 <actions_str, step_actions, step_actions_str>: Only include in
5371 GDBserver.
fa593d66
PA
5372 <orig_size, obj_addr_on_target, adjusted_insn_addr>
5373 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
5374 (tracepoints): Use IP_AGENT_EXPORT.
5375 (last_tracepoint): Don't include in the IPA.
5376 (stopping_tracepoint): Use IP_AGENT_EXPORT.
5377 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
5378 (alloced_trace_state_variables): New.
5379 (trace_state_variables): Use IP_AGENT_EXPORT.
5380 (traceframe_t): Delete unused variable.
5381 (circular_trace_buffer): Don't include in the IPA.
5382 (trace_buffer_start): Delete.
5383 (struct trace_buffer_control): New.
5384 (trace_buffer_free): Delete.
5385 (struct ipa_trace_buffer_control): New.
5386 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
5387 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
5388 New.
5389 (trace_buffer_ctrl): New.
5390 (TRACE_BUFFER_CTRL_CURR): New.
5391 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
5392 Reimplement as macros.
5393 (trace_buffer_wrap): Delete.
5394 (traceframe_write_count, traceframe_read_count)
5395 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
5396 (struct tracepoint_hit_ctx) <type>: New field.
5397 (struct fast_tracepoint_ctx): New.
5398 (memory_barrier): New.
5399 (cmpxchg): New.
5400 (record_tracepoint_error): Update atomically in the IPA.
5401 (clear_inferior_trace_buffer): New.
5402 (about_to_request_buffer_space): New.
5403 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
5404 updating the same buffer.
5405 (add_tracepoint): Default the tracepoint's type to trap
5406 tracepoint, and orig_size to -1.
5407 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
5408 internal variables.
5409 (create_trace_state_variable): New parameter `gdb'. Handle it.
5410 (clear_installed_tracepoints): Clear fast tracepoint jumps.
5411 (cmd_qtdp): Handle fast tracepoints.
5412 (cmd_qtdv): Adjust.
5413 (max_jump_pad_size): New.
5414 (gdb_jump_pad_head): New.
5415 (get_jump_space_head): New.
5416 (claim_jump_space): New.
5417 (sort_tracepoints): New.
5418 (MAX_JUMP_SIZE): New.
5419 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
5420 IPA.
5421 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
5422 support. Upload fast traceframes, and delete internal IPA
5423 breakpoints.
5424 (stop_tracing_handler): New.
5425 (flush_trace_buffer_handler): New.
5426 (cmd_qtstop): Upload fast tracepoints.
5427 (response_tracepoint): Handle fast tracepoints.
5428 (tracepoint_finished_step): Upload fast traceframes. Set the
5429 tracepoint hit context's tracepoint type.
5430 (handle_tracepoint_bkpts): New.
5431 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
5432 type. Add comment about fast tracepoints.
5433 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
5434 non-existing action_str field.
5435 (get_context_regcache): Handle fast tracepoints.
5436 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
5437 to the regcache.
5438 (fast_tracepoint_from_jump_pad_address): New.
5439 (fast_tracepoint_from_ipa_tpoint_address): New.
5440 (collecting_t): New.
5441 (force_unlock_trace_buffer): New.
5442 (fast_tracepoint_collecting): New.
5443 (collecting): New.
5444 (gdb_collect): New.
5445 (write_inferior_data_ptr): New.
5446 (target_tp_heap): New.
5447 (target_malloc): New.
5448 (download_agent_expr): New.
5449 (UALIGN): New.
5450 (download_tracepoints): New.
5451 (download_trace_state_variables): New.
5452 (upload_fast_traceframes): New.
5453 (IPA_FIRST_TRACEFRAME): New.
5454 (IPA_NEXT_TRACEFRAME_1): New.
5455 (IPA_NEXT_TRACEFRAME): New.
5456 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
5457 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
5458 (gdb_jump_pad_buffer_end): New.
5459 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
5460 (initialize_tracepoint): Adjust.
5461 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
5462 buffer. Initialize the low module.
5463 * utils.c (PREFIX, TOOLNAME): New.
5464 (malloc_failure): Use PREFIX.
5465 (error): In the IPA, an error causes an exit.
5466 (fatal, warning): Use PREFIX.
5467 (internal_error): Use TOOLNAME.
5468 (NUMCELLS): Increase to 10.
5469 * configure, config.in: Regenerate.
5470
d149dd1d
PA
54712010-06-01 Pedro Alves <pedro@codesourcery.com>
5472
5473 * server.c (handle_query) <qSupported>: Do two passes over the
5474 qSupported string to avoid nesting strtok.
5475
f6528abd
JK
54762010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
5477
5478 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
5479 (CDEPS): New.
5480 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
5481 -Wl,--dynamic-list.
5482 * configure: Regenerate.
5483 * proc-service.list: New.
5484
ca2a87a0
JK
54852010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
5486
5487 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
5488 New comment.
5489
363a6e9f
OS
54902010-05-26 Ozkan Sezer <sezeroz@gmail.com>
5491
5492 * gdbreplay.c (remote_open): Check error return from socket() call by
5493 its equality to -1 not by it being negative.
5494 * remote-utils.c (remote_open): Likewise.
5495
d23b6cb1
PA
54962010-05-23 Pedro Alves <pedro@codesourcery.com>
5497
5498 * config.h: Regenerate.
5499
28d3cf85
MK
55002010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
5501
5502 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
5503 doesn't provide PTRACE_GET_THREAD_AREA.
5504
fea36a59
MK
55052010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
5506
5507 * linux-m68k-low.c: Include <asm/ptrace.h>
5508 (ps_get_thread_area): Implement.
5509
24b066ba
DE
55102010-05-03 Doug Evans <dje@google.com>
5511
5512 * event-loop.c (struct callback_event): New struct.
5513 (callback_list): New global.
5514 (append_callback_event, delete_callback_event): New functions.
5515 (process_callback): New function.
5516 (start_event_loop): Call it.
5517 * remote-utils.c (NOT_SCHEDULED): Define.
5518 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
5519 moved out of readchar.
5520 (readchar): Rewrite. Call reschedule before returning.
5521 (reset_readchar): New function.
5522 (remote_close): Call it.
5523 (process_remaining, reschedule): New functions.
5524 * server.h (callback_handler_func): New typedef.
5525 (append_callback_event, delete_callback_event): Declare.
5526
9836d6ea
PA
55272010-05-03 Pedro Alves <pedro@codesourcery.com>
5528
5529 * proc-service.c (ps_pglobal_lookup): Use
5530 thread_db_look_up_one_symbol.
5531 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
5532 parameter. Use it instead of all_symbols_looked_up.
5533 * server.h (struct process_info) <all_symbols_looked_up>: Delete
5534 field.
5535 (all_symbols_looked_up): Don't declare.
5536 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
5537 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
5538 field.
5539 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
5540 Set all_symbols_looked_up here.
5541 (thread_db_look_up_one_symbol): New.
5542 (thread_db_get_tls_address): Adjust.
5543 (thread_db_load_search, try_thread_db_load_1): Always allocate the
5544 thread_db object on the heap, and tentatively set it in the
5545 process structure.
5546 (thread_db_init): Don't set all_symbols_looked_up here.
5547 * linux-low.h (thread_db_look_up_one_symbol): Declare.
5548
7984d532
PA
55492010-05-03 Pedro Alves <pedro@codesourcery.com>
5550
5551 * linux-low.c (linux_kill, linux_detach): Adjust.
5552 (status_pending_p_callback): Remove redundant statement. Check
5553 for !TARGET_WAITIKIND_IGNORE, instead of
5554 TARGET_WAITKIND_STOPPED.
5555 (handle_tracepoints): Make sure LWP is locked. Adjust.
5556 (linux_wait_for_event_1): Adjust.
5557 (linux_cancel_breakpoints): New.
5558 (unsuspend_one_lwp): New.
5559 (unsuspend_all_lwps): New.
5560 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
5561 (send_sigstop_callback): Change return type to int, add new
5562 `except' parameter and handle it.
5563 (suspend_and_send_sigstop_callback): New.
5564 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
5565 pass them down. If SUSPEND, also increment the lwp's suspend
5566 count.
5567 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
5568 (need_step_over_p): Don't consider suspended LWPs.
5569 (start_step_over): Adjust.
5570 (proceed_one_lwp): Change return type to int, add new `except'
5571 parameter and handle it.
5572 (unsuspend_and_proceed_one_lwp): New.
5573 (proceed_all_lwps): Use find_inferior instead of
5574 for_each_inferior.
5575 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
5576 also decrement the suspend count of LWPs. Pass `except' down,
5577 instead of hacking its suspend count.
5578 (linux_pause_all): Add `freeze' parameter. Adjust.
5579 (linux_unpause_all): New.
5580 (linux_target_ops): Install linux_unpause_all.
5581 * server.c (handle_status): Adjust.
5582 * target.h (struct target_ops): New fields `unpause_all' and
5583 `cancel_breakpoints'. Add new parameter to `pause_all'.
5584 (pause_all): Add new `freeze' parameter.
5585 (unpause_all): New.
5586 (cancel_breakpoints): New.
5587 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
5588 cancel breakpoints.
5589 (cmd_qtstart): Pause threads.
5590 (stop_tracing): Pause threads, and cancel breakpoints.
5591 * win32-low.c (win32_target_ops): Adjust.
5592
e471f25b
PA
55932010-05-03 Pedro Alves <pedro@codesourcery.com>
5594
5595 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
5596 the inferior right away from here...
5597 (linux_wait_1): ... to here, and adjust to check the thread's
5598 last_resume_kind instead of the lwp's step or stop_expected flags.
5599
1915ef4f
PA
56002010-05-02 Pedro Alves <pedro@codesourcery.com>
5601
5602 * README: Use consistent `GDB' and `GDBserver' spellings.
5603
f9e39928
PA
56042010-05-02 Pedro Alves <pedro@codesourcery.com>
5605
5606 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
5607 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
5608 (linux_detach_one_lwp): Assume the lwp is stopped.
5609 (any_thread_of): Delete.
5610 (linux_detach): Stop all lwps here. Don't blindly delete all
5611 breakpoints.
5612 (delete_lwp_callback): New.
5613 (linux_mourn): Delete all lwps of the process that is gone.
5614 (linux_wait_1): Don't delete the last lwp of the process here.
5615 * mem-break.h (mark_breakpoints_out): Declare.
5616 * mem-break.c (mark_breakpoints_out): New.
5617 (free_all_breakpoints): Use it.
5618 * server.c (handle_target_event): If the process is gone, mark
5619 breakpoints out.
5620 * thread-db.c (struct thread_db) <create_bp>: New field.
5621 (thread_db_enable_reporting): Fix prototype. Store a thread event
5622 breakpoint reference in the thread_db struct.
5623 (thread_db_load_search): Clear the thread_db object.
5624 (try_thread_db_load_1): Ditto.
5625 (switch_to_process): New.
5626 (disable_thread_event_reporting): Use it.
5627 (remove_thread_event_breakpoints): New.
5628 (thread_db_detach, thread_db_mourn): Use it.
5629
1e7fc18c
PA
56302010-05-01 Pedro Alves <pedro@codesourcery.com>
5631
5632 * linux-low.c (linux_enable_event_reporting): New.
5633 (linux_wait_for_event_1, handle_extended_wait): Use it.
5634
02fc4de7
PA
56352010-04-30 Pedro Alves <pedro@codesourcery.com>
5636
5637 * linux-low.c (linux_kill_one_lwp, linux_kill)
5638 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
5639 (send_sigstop): Take an lwp_info as parameter instead. Queue a
5640 SIGSTOP even if the LWP is stopped.
5641 (send_sigstop_callback): New.
5642 (stop_all_lwps): Use send_sigstop_callback instead.
5643 (linux_resume_one_thread): Adjust.
5644 (proceed_one_lwp): Still proceed an LWP that the client has
5645 requested to stop, if we haven't reported it as stopped yet. Make
5646 sure that LWPs the client want stopped, have a pending SIGSTOP.
5647
bc3b5632
DE
56482010-04-26 Doug Evans <dje@google.com>
5649
ae1ada35
DE
5650 * server.c (handle_general_set): Make static.
5651
bc3b5632
DE
5652 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
5653 Print received char after testing for error/eof instead of before.
5654 (input_interrupt): Tweak comment.
5655
65730243
DE
56562010-04-23 Doug Evans <dje@google.com>
5657
5658 * server.c (start_inferior): Print inferior argv if --debug.
5659
a8ae7dc0
AR
56602010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
5661
5662 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
5663 * nto-x86-low.c: Include server.h
5664
1c07cc19
PM
56652010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
5666
5667 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
5668 be consistent with other sources of this directory.
5669 (init_registers_amd64): Correct name of source file of this function
5670 in the comment.
5671
e0a61e09
PM
56722010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
5673
5674 * configure.srv (x86_64-*-mingw*): New configuration for Windows
5675 64-bit executables.
5676
54709339
PM
56772010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
5678
5679 * win32-i386-low.c: Add 64-bit support.
5680 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
5681 (init_registers_amd64): Declare.
5682 (mappings): Add 64-bit version of array.
5683 (init_windows_x86): New function.
5684 (the_low_target): Change init_arch field to init_windows_x86.
5685
e8f0053d
PM
56862010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
5687
5688 * win32-low.c: Adapt to support also 64-bit architecture.
5689 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
5690 (get_image_name): Use SIZE_T type for local variable `done'.
5691 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
5692 (toolhelp_get_dll_name): Idem.
5693 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
5694 Use uintptr_t typecast to avoid warning.
5695 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
5696 (handle_exception): Use phex_nz to avoid warning.
5697 (win32_wait): Remove unused local variable `process'.
5698
c481e77e
PM
56992010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
5700
5701 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
5702 `amd64-avx.o'.
5703
12ea4b69
PM
57042010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
5705
5706 * configure.ac: Use `ws2_32' library for srv_mingw.
5707 * configure: Regenerate.
5708 * gdbreplay.c: Include winsock2.h instead of winsock.h.
5709 * remote-utils.c: Likewise.
5710
f6d1620c
L
57112010-04-17 H.J. Lu <hongjiu.lu@intel.com>
5712
5713 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
5714 if __x86_64__ is defined.
5715
8e642873
PM
57162010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
5717
5718 * configure: Regenerate.
5719
711e434b
PM
57202010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
5721
5722 * server.c (handle_query): Handle 'qGetTIBAddr' query.
5723 * target.h (target_ops): New get_tib_address field.
5724 * win32-low.h (win32_thread_info): Add thread_local_base field.
5725 * win32-low.c (child_add_thread): Add tlb argument.
5726 Set thread_local_base field to TLB.
5727 (get_child_debug_event): Adapt to child_add_thread change.
5728 (win32_get_tib_address): New function.
5729 (win32_target_ops): Set get_tib_address field to
5730 win32_get_tib_address.
5731 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
5732
505106cd
PA
57332010-04-12 Pedro Alves <pedro@codesourcery.com>
5734
505106cd
PA
5735 * linux-low.c (linux_mourn): Also remove the process.
5736 * server.c (handle_target_event): Don't remove the process here.
5737 * nto-low.c (nto_mourn): New.
5738 (nto_target_ops): Install it.
5739 * spu-low.c (spu_mourn): New.
5740 (spu_target_ops): Install it.
5741 * win32-low.c (win32_mourn): New.
5742 (win32_target_ops): Install it.
5743
e8470a06
PA
57442010-04-12 Pedro Alves <pedro@codesourcery.com>
5745
5746 * server.h (buffer_xml_printf): Remove redundant `;'.
5747
45ba0d02
PA
57482010-04-12 Pedro Alves <pedro@codesourcery.com>
5749
5750 * regcache.c (set_register_cache): Invalidate regcaches before
5751 changing the register cache layout.
5752 (regcache_invalidate_one): Allow a NULL regcache.
5753 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
5754 regcaches before changing the register cache layout or the target
5755 regsets.
5756
59e04013
L
57572010-04-12 H.J. Lu <hongjiu.lu@intel.com>
5758
5759 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
5760 variable warning on Linux/x86-64.
5761
8336d594
PA
57622010-04-11 Pedro Alves <pedro@codesourcery.com>
5763
5764 GDBserver disconnected tracing support.
5765
5766 * linux-low.c (linux_remove_process): Delete.
5767 (add_lwp): Don't set last_resume_kind here.
5768 (linux_kill): Use `mourn'.
5769 (linux_detach): Use `thread_db_detach', and `mourn'.
5770 (linux_mourn): New.
5771 (linux_attach_lwp_1): Adjust comment.
5772 (linux_attach): last_resume_kind moved the thread_info; adjust.
5773 (status_pending_p_callback): Adjust.
5774 (linux_wait_for_event_1): Adjust.
5775 (count_events_callback, select_singlestep_lwp_callback)
5776 (select_event_lwp_callback, cancel_breakpoints_callback)
5777 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
5778 (proceed_one_lwp): Adjust.
5779 (linux_async): Add debug output.
5780 (linux_thread_stopped): New.
5781 (linux_pause_all): New.
5782 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
5783 linux_pause_all.
5784 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
5785 (thread_db_free): Delete declaration.
5786 (thread_db_detach, thread_db_mourn): Declare.
5787 * thread-db.c (thread_db_init): Use thread_db_mourn.
5788 (thread_db_free): Delete, split in two.
5789 (disable_thread_event_reporting): New.
5790 (thread_db_detach): New.
5791 (thread_db_mourn): New.
5792
5793 * server.h (struct thread_info) <last_resume_kind>: New field.
5794 <attached>: Add comment.
5795 <gdb_detached>: New field.
5796 (handler_func): Change return type to int.
5797 (handle_serial_event, handle_target_event): Ditto.
5798 (gdb_connected): Declare.
5799 (tracing): Delete.
5800 (disconnected_tracing): Declare.
5801 (stop_tracing): Declare.
5802
5803 * server.c (handle_query) <qSupported>: Report support for
5804 disconnected tracing.
5805 (queue_stop_reply_callback): Account for running threads.
5806 (gdb_wants_thread_stopped): New.
5807 (gdb_wants_all_threads_stopped): New.
5808 (gdb_reattached_process): New.
5809 (handle_status): Clear the `gdb_detached' flag of all processes.
5810 In all-stop, stop all threads.
5811 (main): Be sure to leave tfind mode. Handle disconnected tracing.
5812 (process_serial_event): If the remote connection breaks, or if an
5813 exit was forced with "monitor exit", force an event loop exit.
5814 Handle disconnected tracing on detach.
5815 (handle_serial_event): Adjust.
5816 (handle_target_event): If GDB isn't connected, forward events back
5817 to the inferior, unless the last process exited, in which case,
5818 exit gdbserver. Adjust interface.
5819
5820 * remote-utils.c (remote_open): Don't block in accept. Instead
5821 register an event loop source on the listen socket file
5822 descriptor. Refactor bits into ...
5823 (listen_desc): ... this new global.
5824 (gdb_connected): ... this new function.
5825 (enable_async_notification): ... this new function.
5826 (handle_accept_event): ... this new function.
5827 (remote_close): Clear remote_desc.
5828
5829 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
5830
5831 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
5832 New fields.
5833 (mourn_inferior): Define.
5834 (target_process_qsupported): Avoid the dangling else problem.
5835 (thread_stopped): Define.
5836 (pause_all): Define.
5837 (target_waitstatus_to_string): Declare.
5838 * target.c (target_waitstatus_to_string): New.
5839
5840 * tracepoint.c (tracing): Make extern.
5841 (disconnected_tracing): New.
5842 (stop_tracing): Make extern. Handle tracing stops due to GDB
5843 disconnecting.
5844 (cmd_qtdisconnected): New.
5845 (cmd_qtstatus): Report disconnected tracing status in trace reply.
5846 (handle_tracepoint_general_set): Handle QTDisconnected.
5847
5848 * event-loop.c (event_handler_func): Change return type to int.
5849 (process_event): Bail out if the event handler wants the event
5850 loop to stop.
5851 (handle_file_event): Ditto.
5852 (start_event_loop): Bail out if the event handler wants the event
5853 loop to stop.
5854
5855 * nto-low.c (nto_target_ops): Adjust.
5856 * spu-low.c (spu_wait): Don't remove the process here.
5857 (spu_target_ops): Adjust.
5858 * win32-low.c (win32_wait): Don't remove the process here.
5859 (win32_target_ops): Adjust.
5860
5d267c4c
PA
58612010-04-11 Pedro Alves <pedro@codesourcery.com>
5862
5863 * regcache.c (realloc_register_cache): Invalidate inferior's
5864 regcache before recreating it.
5865
623ccd72
PA
58662010-04-09 Pedro Alves <pedro@codesourcery.com>
5867
5868 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
5869
219f2f23
PA
58702010-04-09 Stan Shebs <stan@codesourcery.com>
5871 Pedro Alves <pedro@codesourcery.com>
5872
5873 * server.h (LONGEST): New.
5874 (struct thread_info) <while_stepping>: New field.
5875 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
5876 Declare.
5877 (initialize_tracepoint, handle_tracepoint_general_set)
5878 (handle_tracepoint_query, tracepoint_finished_step)
5879 (tracepoint_was_hit, release_while_stepping_state_list):
5880 (current_traceframe): Declare.
5881 * server.c (handle_general_set): Handle tracepoint packets.
5882 (read_memory): New.
5883 (write_memory): New.
5884 (handle_search_memory_1): Use read_memory.
5885 (handle_query): Report support for conditional tracepoints, trace
5886 state variables, and tracepoint sources. Handle tracepoint
5887 queries.
5888 (main): Initialize the tracepoints module.
5889 (process_serial_event): Handle traceframe reads/writes.
5890
5891 * linux-low.c (handle_tracepoints): New.
5892 (linux_wait_1): Call it.
5893 (linux_resume_one_lwp): Handle while-stepping.
5894 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
5895 (linux_target_ops): Install them.
5896 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
5897 New field.
5898 * linux-x86-low.c (x86_supports_tracepoints): New.
5899 (the_low_target). Install it.
5900
5901 * mem-break.h (delete_breakpoint): Declare.
5902 * mem-break.c (delete_breakpoint): Make external.
5903
5904 * target.h (struct target_ops): Add `supports_tracepoints',
5905 `read_pc', and `write_pc' fields.
5906 (target_supports_tracepoints): Define.
5907 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
5908 (phex_nz): New.
5909
5910 * regcache.h (struct regcache) <registers_owned>: New field.
5911 (init_register_cache, regcache_cpy): Declare.
5912 (regcache_read_pc, regcache_write_pc): Declare.
5913 (register_cache_size): Declare.
5914 (supply_regblock): Declare.
5915 * regcache.c (init_register_cache): New.
5916 (new_register_cache): Use it.
5917 (regcache_cpy): New.
5918 (register_cache_size): New.
5919 (supply_regblock): New.
5920 (regcache_read_pc, regcache_write_pc): New.
889bf7c5 5921
219f2f23
PA
5922 * tracepoint.c: New.
5923
5924 * Makefile.in (OBS): Add tracepoint.o.
5925 (tracepoint.o): New rule.
5926
3a13a53b
L
59272010-04-08 H.J. Lu <hongjiu.lu@intel.com>
5928
5929 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
5930 (i386-mmx.o): New.
5931 (i386-mmx.c): Likewise.
5932 (i386-mmx-linux.o): Likewise.
5933 (i386-mmx-linux.c): Likewise.
5934
5935 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
5936 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
5937 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
5938 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
5939
5940 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
5941 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
5942 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
5943
1570b33e
L
59442010-04-07 H.J. Lu <hongjiu.lu@intel.com>
5945
5946 * Makefile.in (clean): Updated.
5947 (i386-avx.o): New.
5948 (i386-avx.c): Likewise.
5949 (i386-avx-linux.o): Likewise.
5950 (i386-avx-linux.c): Likewise.
5951 (amd64-avx.o): Likewise.
5952 (amd64-avx.c): Likewise.
5953 (amd64-avx-linux.o): Likewise.
5954 (amd64-avx-linux.c): Likewise.
5955
5956 * configure.srv (srv_i386_regobj): Add i386-avx.o.
5957 (srv_i386_linux_regobj): Add i386-avx-linux.o.
5958 (srv_amd64_regobj): Add amd64-avx.o.
5959 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
5960 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
5961 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
5962 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
5963 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
5964 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
5965 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
5966
5967 * i387-fp.c: Include "i386-xstate.h".
5968 (i387_xsave): New.
5969 (i387_cache_to_xsave): Likewise.
5970 (i387_xsave_to_cache): Likewise.
5971 (x86_xcr0): Likewise.
5972
5973 * i387-fp.h (i387_cache_to_xsave): Likewise.
5974 (i387_xsave_to_cache): Likewise.
5975 (x86_xcr0): Likewise.
5976
5977 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
5978 * linux-crisv32-low.c (target_regsets): Likewise.
5979 * linux-m68k-low.c (target_regsets): Likewise.
5980 * linux-mips-low.c (target_regsets): Likewise.
5981 * linux-ppc-low.c (target_regsets): Likewise.
5982 * linux-s390-low.c (target_regsets): Likewise.
5983 * linux-sh-low.c (target_regsets): Likewise.
5984 * linux-sparc-low.c (target_regsets): Likewise.
5985 * linux-xtensa-low.c (target_regsets): Likewise.
5986
5987 * linux-low.c: Include <sys/uio.h>.
5988 (regsets_fetch_inferior_registers): Support nt_type.
5989 (regsets_store_inferior_registers): Likewise.
5990 (linux_process_qsupported): New.
5991 (linux_target_ops): Add linux_process_qsupported.
5992
5993 * linux-low.h (regset_info): Add nt_type.
5994 (linux_target_ops): Add process_qsupported.
5995
5996 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
5997 and <sys/uio.h>.
5998 (init_registers_i386_avx_linux): New.
5999 (init_registers_amd64_avx_linux): Likewise.
6000 (xmltarget_i386_linux_no_xml): Likewise.
6001 (xmltarget_amd64_linux_no_xml): Likewise.
6002 (PTRACE_GETREGSET): Likewise.
6003 (PTRACE_SETREGSET): Likewise.
6004 (x86_fill_xstateregset): Likewise.
6005 (x86_store_xstateregset): Likewise.
6006 (use_xml): Likewise.
6007 (x86_linux_update_xmltarget): Likewise.
6008 (x86_linux_process_qsupported): Likewise.
6009 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
6010 (x86_arch_setup): Don't call init_registers_amd64_linux nor
6011 init_registers_i386_linux here. Call
6012 x86_linux_update_xmltarget.
6013 (the_low_target): Add x86_linux_process_qsupported.
6014
6015 * server.c (handle_query): Call target_process_qsupported.
6016
6017 * target.h (target_ops): Add process_qsupported.
6018 (target_process_qsupported): New.
6019
fc7238bb
PA
60202010-04-03 Pedro Alves <pedro@codesourcery.com>
6021
6022 * inferiors.c (add_thread): Set last_status kind to
6023 TARGET_WAITKIND_IGNORE.
6024 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
6025 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
6026 (linux_wait_1): Move `thread' local definition to block that uses
6027 it. Don't NULL initialize `event_child'.
6028 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
6029 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
6030 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
6031
bdabb078
PA
60322010-04-01 Pedro Alves <pedro@codesourcery.com>
6033
6034 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
6035 an extended waitstatus, or by a watchpoint.
6036 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
6037 thread was stepping or has been stopped by a watchpoint.
6038
d3bbe7a0
PA
60392010-04-01 Pedro Alves <pedro@codesourcery.com>
6040
6041 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
6042 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
6043 of another, then delete the previous, and validate all
6044 breakpoints.
6045 (validate_inserted_breakpoint): New.
6046 (delete_disabled_breakpoints): New.
6047 (validate_breakpoints): New.
6048 (check_mem_read): Validate breakpoints before trusting their
6049 shadow. Delete disabled breakpoints.
6050 (check_mem_write): Validate breakpoints before trusting they
6051 should be inserted. Delete disabled breakpoints.
6052 * mem-break.h (validate_breakpoints):
6053 * server.c (handle_query): Validate breakpoints when we see a
6054 qSymbol query.
6055
8b07ae33
PA
60562010-04-01 Pedro Alves <pedro@codesourcery.com>
6057
6058 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
6059 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
6060 if we could tell there's a GDB breakpoint at stop_pc.
6061 (need_step_over_p): Don't do a step over if we find a GDB
6062 breakpoint at the resume PC.
6063
6064 * mem-break.c (struct raw_breakpoint): New.
6065 (enum bkpt_type): New type `gdb_breakpoint'.
6066 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
6067 fields. New field `raw'.
6068 (find_raw_breakpoint_at): New.
6069 (set_raw_breakpoint_at): Handle refcounting. Create a raw
6070 breakpoint instead.
6071 (set_breakpoint_at): Adjust.
6072 (delete_raw_breakpoint): New.
6073 (release_breakpoint): New.
6074 (delete_breakpoint): Rename to...
6075 (delete_breakpoint_1): ... this. Add proc parameter. Use
6076 release_breakpoint. Return ENOENT.
6077 (delete_breakpoint): Reimplement.
6078 (find_breakpoint_at): Delete.
6079 (find_gdb_breakpoint_at): New.
6080 (delete_breakpoint_at): Delete.
6081 (set_gdb_breakpoint_at): New.
6082 (delete_gdb_breakpoint_at): New.
6083 (gdb_breakpoint_here): New.
6084 (set_reinsert_breakpoint): Use release_breakpoint.
6085 (uninsert_breakpoint): Rename to ...
6086 (uninsert_raw_breakpoint): ... this.
6087 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
6088 (reinsert_raw_breakpoint): Change parameter type to
6089 raw_breakpoint.
6090 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
6091 instead.
6092 (check_breakpoints): Adjust. Use release_breakpoint.
6093 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
6094 (breakpoint_inserted_here): Ditto.
6095 (check_mem_read): Adjust to iterate over raw breakpoints instead.
6096 Don't trust the breakpoint's shadow if it is not inserted.
6097 (check_mem_write): Adjust to iterate over raw breakpoints instead.
6098 (delete_all_breakpoints): Adjust.
6099 (free_all_breakpoints): Mark all breakpoints as uninserted, and
6100 use delete_breakpoint_1.
6101
6102 * mem-break.h (breakpoints_supported): Delete declaration.
6103 (set_gdb_breakpoint_at): Declare.
6104 (gdb_breakpoint_here): Declare.
6105 (delete_breakpoint_at): Delete.
6106 (delete_gdb_breakpoint_at): Declare.
6107
6108 * server.h (struct raw_breakpoint): Forward declare.
6109 (struct process_info): New field `raw_breakpoints'.
6110
6111 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
6112 breakpoints.
6113
6bf5e0ba
PA
61142010-03-24 Pedro Alves <pedro@codesourcery.com>
6115
6116 * linux-low.c (status_pending_p_callback): Fix comment.
6117 (linux_wait_for_event_1): Move most of the internal breakpoint
6118 handling from here...
6119 (linux_wait_1): ... to here.
6120 (count_events_callback): New.
6121 (select_singlestep_lwp_callback): New.
6122 (select_event_lwp_callback): New.
6123 (cancel_breakpoints_callback): New.
6124 (select_event_lwp): New.
6125 (linux_wait_1): Simplify internal breakpoint handling. Give equal
6126 priority to all LWPs that have had events that should be reported
6127 to the client. Cancel breakpoints when about to reporting the
6128 event to the client, not while stopping lwps. No longer cancel
6129 finished single-steps here.
6130 (cancel_finished_single_step): Delete.
6131 (cancel_finished_single_steps): Delete.
6132
414a389f
PA
61332010-03-24 Pedro Alves <pedro@codesourcery.com>
6134
6135 * mem-break.c (enum bkpt_type): New.
6136 (struct breakpoint): New field `type'.
6137 (set_breakpoint_at): Change return type to struct breakpoint
6138 pointer. Set type to `other_breakpoint' by default.
6139 (delete_breakpoint): Rewrite, supporting more than one breakpoint
6140 in the breakpoint list.
6141 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
6142 (reinsert_breakpoint): Rename to ...
6143 (reinsert_raw_breakpoint): ... this.
6144 (reinsert_breakpoints_at): Adjust.
6145 * mem-break.h (struct breakpoint): Declare.
6146 (set_breakpoint_at): Change return type to struct breakpoint
6147 pointer.
6148
2280c721
PA
61492010-03-24 Pedro Alves <pedro@codesourcery.com>
6150
6151 * server.c (handle_query): Assign, not compare.
6152
d50171e4
PA
61532010-03-24 Pedro Alves <pedro@codesourcery.com>
6154
6155 Teach linux gdbserver to step-over-breakpoints.
6156
6157 * linux-low.c (can_hardware_single_step): New.
6158 (supports_breakpoints): New.
6159 (handle_extended_wait): If stopping threads, read the stop pc of
6160 the new cloned LWP.
6161 (get_pc): New.
6162 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
6163 low target doesn't support retrieving the PC.
6164 (add_lwp): Set last_resume_kind to resume_continue.
6165 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
6166 (linux_attach): Don't clear stop_expected. Set the lwp's
6167 last_resume_kind to resume_stop.
6168 (linux_detach_one_lwp): Don't check for removed breakpoints.
6169 (check_removed_breakpoint): Delete.
6170 (status_pending_p): Rename to ...
6171 (status_pending_p_callback): ... this. Don't check for removed
6172 breakpoints. Don't consider threads that are stopped from GDB's
6173 perspective.
6174 (linux_wait_for_lwp): Always read the stop_pc here.
6175 (cancel_breakpoint): New.
6176 (step_over_bkpt): New global.
6177 (linux_wait_for_event_1): Implement stepping over breakpoints.
6178 (gdb_wants_lwp_stopped): New.
6179 (gdb_wants_all_stopped): New.
6180 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
6181 single-step traps here. Store the thread's last reported target
6182 wait status.
6183 (send_sigstop): Don't clear stop_expected. Always set it,
6184 instead.
6185 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
6186 (cancel_finished_single_step): New.
6187 (cancel_finished_single_steps): New.
6188 (wait_for_sigstop): Don't cancel finished single-step traps here.
6189 (linux_resume_one_lwp): Don't check for removed breakpoints.
6190 Don't set `step' on non-hardware step archs.
6191 (linux_set_resume_request): Ignore resume_stop requests if already
6192 stopping or stopped. Set the lwp's last_resume_kind.
6193 (resume_status_pending_p): Don't check for removed breakpoints.
6194 (need_step_over_p): New.
6195 (start_step_over): New.
6196 (finish_step_over): New.
6197 (linux_resume_one_thread): Always queue a sigstop for resume_stop
6198 requests. Clear the thread's last reported target waitstatus.
6199 Don't use the `suspended' flag. Don't consider pending breakpoints.
6200 (linux_resume): Start a step-over if necessary.
6201 (proceed_one_lwp): New.
6202 (proceed_all_lwps): New.
6203 (unstop_all_lwps): New.
6204 * linux-low.h (struct lwp_info): Rewrite comment for the
6205 `suspended' flag. Add the `stop_pc' field. Delete the
6206 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
6207 Add `'last_resume_kind' and `need_step_over' fields.
6208 * inferiors.c (struct thread_info): Delete, moved elsewhere.
6209 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
6210 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
6211 (set_raw_breakpoint_at): New.
6212 (set_breakpoint_at): Rewrite to use it.
6213 (reinsert_breakpoint_handler): Delete.
6214 (set_reinsert_breakpoint): New.
6215 (reinsert_breakpoint_by_bp): Delete.
6216 (delete_reinsert_breakpoints): New.
6217 (uninsert_breakpoint): Rewrite.
6218 (uninsert_breakpoints_at): New.
6219 (reinsert_breakpoint): Rewrite.
6220 (reinsert_breakpoints_at): New.
6221 (check_breakpoints): Rewrite.
6222 (breakpoint_here): New.
6223 (breakpoint_inserted_here): New.
6224 (check_mem_read): Adjust.
6225 * mem-break.h (breakpoints_supported, breakpoint_here)
6226 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
6227 (reinsert_breakpoint_by_bp): Delete declaration.
6228 (delete_reinsert_breakpoints): Declare.
6229 (reinsert_breakpoint): Delete declaration.
6230 (reinsert_breakpoints_at): Declare.
6231 (uninsert_breakpoint): Delete declaration.
6232 (uninsert_breakpoints_at): Declare.
6233 (check_breakpoints): Adjust prototype.
6234 * server.h: Adjust include order.
6235 (struct thread_info): Declare here. Add a `last_status' field.
6236
30ba68cb
MS
62372010-03-23 Michael Snyder <msnyder@vmware.com>
6238
6239 * server.c (crc32): New function.
6240 (handle_query): Add handling for 'qCRC:' request.
6241
b9a881c2
PA
62422010-03-23 Pedro Alves <pedro@codesourcery.com>
6243
6244 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
6245 lwp had been stopped by a watchpoint.
6246
e92d13d5
PA
62472010-03-16 Pedro Alves <pedro@codesourcery.com>
6248
6249 * server.h (internal_error): Declare.
6250 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
6251 * utils.c (internal_error): New function.
6252
64daa791
AS
62532010-03-15 Andreas Schwab <schwab@redhat.com>
6254
6255 * configure.srv: Fix typo setting srv_regobj.
6256
f52cd8cd
PA
62572010-03-15 Pedro Alves <pedro@codesourcery.com>
6258
6259 * linux-low.c (fetch_register): Avoid passing a non string literal
6260 format to `error'.
6261 (usr_store_inferior_registers): Ditto.
6262
93ae6fdc
PA
62632010-03-14 Pedro Alves <pedro@codesourcery.com>
6264
6265 * linux-low.c (linux_write_memory): Bail out early if peeking
6266 memory failed.
6267
c3adc08c
PA
62682010-03-14 Pedro Alves <pedro@codesourcery.com>
6269
6270 * linux-low.h (struct lwp_info): New fields
6271 `stopped_by_watchpoint' and `stopped_data_address'.
6272 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
6273 here, and cache them in the lwp object.
6274 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
6275 directly.
6276 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
6277 field.
6278 (linux_stopped_by_watchpoint): Rewrite.
6279 (linux_stopped_data_address): Rewrite.
6280
bce522a2
PA
62812010-03-06 Simo Melenius <simo.melenius@iki.fi>
6282
6283 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
6284 switching the current inferior, not before.
6285
90884b2b
L
62862010-03-01 H.J. Lu <hongjiu.lu@intel.com>
6287
6288 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
6289 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
6290 i386-linux.c and amd64-linux.c.
6291 (reg-i386.o): Removed.
6292 (reg-i386.c): Likewise.
6293 (reg-i386-linux.o): Likewise.
6294 (reg-i386-linux.c): Likewise.
6295 (reg-x86-64.o): Likewise.
6296 (reg-x86-64.c): Likewise.
6297 (reg-x86-64-linux.o): Likewise.
6298 (reg-x86-64-linux.c): Likewise.
6299 (i386.o): New.
6300 (i386.c): Likewise.
6301 (i386-linux.o): Likewise.
6302 (i386-linux.c): Likewise.
6303 (amd64.o): Likewise.
6304 (amd64.c): Likewise.
6305 (amd64-linux.o): Likewise.
6306 (amd64-linux.c): Likewise.
6307
6308 * configure.srv (srv_i386_regobj): New.
6309 (srv_i386_linux_regobj): Likewise.
6310 (srv_amd64_regobj): Likewise.
6311 (srv_amd64_linux_regobj): Likewise.
6312 (srv_i386_32bit_xmlfiles): Likewise.
6313 (srv_i386_64bit_xmlfiles): Likewise.
6314 (srv_i386_xmlfiles): Likewise.
6315 (srv_amd64_xmlfiles): Likewise.
6316 (srv_i386_linux_xmlfiles): Likewise.
6317 (srv_amd64_linux_xmlfiles): Likewise.
6318 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
6319 srv_xmlfiles to $srv_i386_xmlfiles.
6320 (i[34567]86-*-mingw32ce*): Likewise.
6321 (i[34567]86-*-mingw*): Likewise.
6322 (i[34567]86-*-nto*): Likewise.
6323 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
6324 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
6325 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
6326 (x86_64-*-linux*): Likewise.
6327
6328 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
6329 (init_registers_amd64_linux): New.
6330 (x86_arch_setup): Replace init_registers_x86_64_linux with
6331 init_registers_amd64_linux.
6332
193f13e6
MK
63332010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
6334
6335 * configure.ac: Check for libdl. If it is not available link against
6336 static libthread_db.
6337 * configure: Regenerate.
6338
85d721b8
PA
63392010-02-22 Pedro Alves <pedro@codesourcery.com>
6340
6341 PR9605
6342
6343 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
6344 handing a read watchpoint.
6345 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
6346
6076632b
DE
63472010-02-12 Doug Evans <dje@google.com>
6348
6349 * linux-low.c (linux_supports_tracefork_flag): Document.
6350 (linux_look_up_symbols): Add comment.
6351
3327ccf7
L
63522010-02-03 H.J. Lu <hongjiu.lu@intel.com>
6353
6354 * regcache.c (supply_register): Clear regcache if buf is NULL.
6355
0718675c 63562010-02-02 Nicolas Roche <roche@sourceware.org>
3327ccf7 6357 Joel Brobecker <brobecker@adacore.com>
0718675c
JB
6358
6359 * inferiors.c (find_inferior): Add function documentation.
6360 (unloaded_dll): Handle the case where the unloaded dll has not
6361 been previously registered in the dll list.
6362
177321bd
DJ
63632010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
6364
6365 * linux-arm-low.c (thumb_breakpoint_len): Delete.
6366 (thumb2_breakpoint): New.
6367 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
6368
2b009048
DJ
63692010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
6370
6371 * linux-low.c (get_stop_pc): Check for SIGTRAP.
6372 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
6373 breakpoints.
6374
3be029c7
PA
63752010-01-21 Pedro Alves <pedro@codesourcery.com>
6376
6377 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
6378
18f5de3b
JK
63792010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
6380
6381 * linux-s390-low.c (s390_collect_ptrace_register)
6382 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
6383
3743bb4f
DE
63842010-01-21 Doug Evans <dje@google.com>
6385
14ce3065
DE
6386 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
6387 (PTRACE_ARG4_TYPE): New macro.
6388 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
6389 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
6390 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
6391 (usr_store_inferior_registers): Ditto.
6392 (linux_read_memory, linux_write_memory): Ditto.
6393 (linux_test_for_tracefork): Ditto.
6394
3743bb4f
DE
6395 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
6396 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
6397
8b315be5
PA
63982010-01-21 Pedro Alves <pedro@codesourcery.com>
6399
6400 * proc-service.c (ps_lgetregs): Don't refetch registers from the
6401 target.
6402
85492558
PA
64032010-01-21 Pedro Alves <pedro@codesourcery.com>
6404
6405 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
6406 prototype to take a regcache. Adjust.
6407
442ea881
PA
64082010-01-20 Pedro Alves <pedro@codesourcery.com>
6409
6410 * regcache.h (struct thread_info): Forward declare.
6411 (struct regcache): New.
6412 (new_register_cache): Adjust prototype.
6413 (get_thread_regcache): Declare.
6414 (free_register_cache): Adjust prototype.
6415 (registers_to_string, registers_from_string): Ditto.
6416 (supply_register, supply_register_by_name, collect_register)
6417 (collect_register_as_string, collect_register_by_name): Ditto.
6418 * regcache.c (struct inferior_regcache_data): Delete.
6419 (get_regcache): Rename to ...
6420 (get_thread_regcache): ... this. Adjust. Switch inferior before
6421 fetching registers.
6422 (regcache_invalidate_one): Adjust.
6423 (regcache_invalidate): Fix prototype.
6424 (new_register_cache): Return the new register cache.
6425 (free_register_cache): Change prototype.
6426 (realloc_register_cache): Adjust.
6427 (registers_to_string): Change prototype to take a regcache. Adjust.
6428 (registers_from_string): Ditto.
6429 (register_data): Ditto.
6430 (supply_register): Ditto.
6431 (supply_register_by_name): Ditto.
6432 (collect_register): Ditto.
6433 (collect_register_as_string): Ditto.
6434 (collect_register_by_name): Ditto.
6435 * server.c (process_serial_event): Adjust.
6436 * linux-low.h (regset_fill_func, regset_store_func): Change
6437 prototype.
6438 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
6439 Change prototype.
6440 * linux-low.c (get_stop_pc): Adjust.
6441 (check_removed_breakpoint): Adjust.
6442 (linux_wait_for_event): Adjust.
6443 (linux_resume_one_lwp): Adjust.
6444 (fetch_register): Add regcache parameter. Adjust.
6445 (usr_store_inferior_registers): Ditto.
6446 (regsets_fetch_inferior_registers): Ditto.
6447 (regsets_store_inferior_registers): Ditto.
6448 (linux_fetch_registers, linux_store_registers): Ditto.
6449 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
6450 regcache. Adjust.
43aaf8b6
PA
6451 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
6452 Ditto.
442ea881
PA
6453 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
6454 prototype to take a regcache.
6455 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
6456 * remote-utils.c (convert_ascii_to_int, outreg)
6457 (prepare_resume_reply): Change prototype to take a regcache.
6458 Adjust.
6459 * target.h (struct target_ops) <fetch_registers, store_registers>:
6460 Change prototype to take a regcache.
6461 (fetch_inferior_registers, store_inferior_registers): Change
6462 prototype to take a regcache. Adjust.
6463 * proc-service.c (ps_lgetregs): Adjust.
6464 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
6465 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
6466 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
6467 take a regcache. Adjust.
6468 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
6469 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
6470 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
6471 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
6472 * linux-cris-low.c (cris_get_pc, cris_set_pc)
6473 (cris_cannot_fetch_register):
6474 (cris_breakpoint_at): Change prototype to take a regcache.
6475 Adjust.
6476 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
6477 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
6478 to take a regcache. Adjust.
6479 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
6480 Adjust.
6481 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
6482 take a regcache. Adjust.
6483 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
6484 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
6485 (m68k_set_pc): Change prototype to take a regcache. Adjust.
6486 * linux-mips-low.c (mips_get_pc):
6487 (mips_set_pc): Change prototype to take a regcache. Adjust.
6488 (mips_reinsert_addr): Adjust.
6489 (mips_collect_register): Change prototype to take a regcache.
6490 Adjust.
6491 (mips_supply_register):
6492 (mips_collect_register_32bit, mips_supply_register_32bit)
6493 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
6494 (mips_store_fpregset): Ditto.
43aaf8b6
PA
6495 * linux-ppc-low.c (ppc_supply_ptrace_register)
6496 (ppc_supply_ptrace_register): Ditto.
442ea881
PA
6497 (parse_spufs_run): Adjust.
6498 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
6499 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
6500 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
6501 take a regcache. Adjust.
6502 * linux-s390-low.c (s390_collect_ptrace_register)
6503 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
6504 (s390_set_pc): Change prototype to take a regcache. Adjust.
6505 (s390_arch_setup): Adjust.
6506 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
6507 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
6508 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
6509 (sparc_fill_gregset, sparc_store_gregset_from_stack)
6510 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
6511 regcache. Adjust.
6512 (sparc_breakpoint_at): Adjust.
6513 * linux-xtensa-low.c (xtensa_fill_gregset):
6514 (xtensa_store_gregset):
6515 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
6516 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
6517 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
6518 prototype to take a regcache. Adjust.
6519 * win32-arm-low.c (arm_fetch_inferior_register)
6520 (arm_store_inferior_register): Change prototype to take a
6521 regcache. Adjust.
6522 * win32-i386-low.c (i386_fetch_inferior_register)
6523 (i386_store_inferior_register): Change prototype to take a
6524 regcache. Adjust.
6525 * win32-low.c (child_fetch_inferior_registers)
6526 (child_store_inferior_registers): Change prototype to take a
6527 regcache. Adjust.
6528 (win32_wait): Adjust.
6529 (win32_fetch_inferior_registers): Change prototype to take a
6530 regcache. Adjust.
6531 (win32_store_inferior_registers): Adjust.
6532 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
6533 store_inferior_register>: Change prototype to take a regcache.
6534
60c3d7b0
DE
65352010-01-20 Doug Evans <dje@google.com>
6536
6537 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
6538 #ifdef.
6539 (linux_wait_for_event1, linux_init_signals): Ditto.
ec8ebe72 6540 (W_STOPCODE): Provide definition if missing.
60c3d7b0 6541
dc146f7c
VP
65422010-01-13 Vladimir Prus <vladimir@codesourcery.com>
6543
6544 * linux-low.c (linux_core_of_thread): New.
6545 (compare_ints, show_process, list_threads): New.
6546 (linux_qxfer_osdata): Report threads and cores.
6547 (linux_target_op): Register linux_core_of_thread.
6548 * remote-utils.c (prepare_resume_reply): Report the core.
6549 (buffer_xml_printf): Support %d specifier.
6550 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
6551 New.
6552 (handle_query): Handle qXfer:threads. Announce availability
6553 thereof.
6554 * target.h (struct target_ops): New field core_of_thread.
6555
7803799a
UW
65562010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
6557
6558 * Makefile.in (clean): Remove new generated files.
6559 (reg-s390.o, reg-s390.c): Remove rules.
6560 (reg-s390x.o, reg-s390x.c): Likewise.
6561 (s390-linux32.o, s390-linux32.c): Add rules.
6562 (s390-linux64.o, s390-linux64.c): Likewise.
6563 (s390x-linux64.o, s390x-linux64.c): Likewise.
6564 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
6565 * linux-s390-low.c: Include <elf.h>.
6566 (HWCAP_S390_HIGH_GPRS): Define if undefined.
6567 (init_registers_s390): Remove prototype.
6568 (init_registers_s390x): Likewise.
6569 (init_registers_s390_linux32): Add prototype.
6570 (init_registers_s390_linux64): Likewise.
6571 (init_registers_s390x_linux64): Likewise.
6572 (s390_num_regs_3264): New define.
6573 (s390_regmap_3264): New global variable.
6574 (s390_cannot_fetch_register): Remove obsolete check.
6575 (s390_cannot_store_register): Likewise.
6576 (s390_collect_ptrace_register): Handle upper/lower register halves.
6577 (s390_supply_ptrace_register): Likewise.
6578 (s390_fill_gregset): Update to register number changes.
6579 (s390_get_hwcap): New routine.
6580 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
6581 Install appropriate regmap and register set.
6582
6e7ffa39
JB
65832010-01-01 Joel Brobecker <brobecker@adacore.com>
6584
6585 * server.c (gdbserver_version): Update copyright year to 2010.
6586 * gdbreplay.c (gdbreplay_version): Likewise.
6587
957f3f49
DE
65882009-12-28 Doug Evans <dje@google.com>
6589
6590 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
6591 elf/external.h. Include <elf.h> instead but only if necessary.
6592
ca5c370d
PA
65932009-12-28 Pedro Alves <pedro@codesourcery.com>
6594
6595 * linux-low.c (linux_remove_process): Remove `detaching'
6596 parameter. Don't release/detach from thread_db here.
6597 (linux_kill): Release/detach from thread_db here, ...
6598 (linux_detach): ... and here, before actually detaching.
6599 (linux_wait_1): ... and here, when a process exits.
6600 * thread-db.c (any_thread_of): New.
6601 (thread_db_free): Switch the current inferior to a thread of the
6602 passed in process.
6603
4ee62156
DE
66042009-12-21 Doug Evans <dje@google.com>
6605
d90e6a88
DE
6606 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
6607
c5f62d5f
DE
6608 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
6609 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
6610 warning ifndef __NR_tkill. Move setting of errno there too.
6611 Delete unnecessary resetting of errno after syscall.
6612 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
6613
10e86dd7
DE
6614 * configure.ac: Check for dladdr.
6615 * config.in: Regenerate.
6616 * configure: Regenerate.
6617 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
6618 (try_thread_db_load): Update.
6619
4ee62156
DE
6620 * linux-low.c (my_waitpid): Delete unnecessary prototype.
6621
00f515da
DE
66222009-12-18 Doug Evans <dje@google.com>
6623
e9464885
DE
6624 * event-loop.c: Include unistd.h if it exists.
6625
07d4f67e
DE
6626 * linux-low.c (my_waitpid): Move definition away from being in
6627 between linux_tracefork_child/linux_test_for_tracefork.
6628
00f515da
DE
6629 * gdb_proc_service.h (psaddr_t): Fix type.
6630 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
6631 signature to match glibc.
6632
1de1badb
DE
66332009-12-16 Doug Evans <dje@google.com>
6634
6635 * linux-low.c (linux_read_memory): Fix argument to read.
6636
aeeb81d1
PA
66372009-11-26 Pedro Alves <pedro@codesourcery.com>
6638
6639 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
6640 events, don't leave current_inferior pointing at null.
6641
10357975
PA
66422009-11-26 Pedro Alves <pedro@codesourcery.com>
6643
6644 * win32-low.c (LOG): Delete.
6645 (OUTMSG): Output to stderr.
6646 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
6647 on compile time LOG macro.
6648 (win32_wait): Fix debug output.
6649
cf6e3471
PA
66502009-11-26 Pedro Alves <pedro@codesourcery.com>
6651
6652 * win32-low.c (win32_add_one_solib): If the dll name is
6653 "ntdll.dll", prepend the system directory to the dll path.
6654
0c85e18e
MK
66552009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
6656
6657 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
6658
9ac544ce 66592009-11-17 Nathan Sidwell <nathan@codesourcery.com>
889bf7c5 6660 Vladimir Prus <vladimir@codesourcery.com>
9ac544ce
MK
6661
6662 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
6663 * configure.ac: Check for __mcoldfire__ and set
6664 gdb_cv_m68k_is_coldfire.
6665 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
6666 reg-cf.o and reg-m68k.o.
6667 * configure: Regenerated.
6668
fd7dd3e6
PA
66692009-11-16 Pedro Alves <pedro@codesourcery.com>
6670
6671 * linux-low.c (linux_remove_process): Add `detaching' parameter.
6672 Pass it to thread_db_free.
6673 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
6674 proper `detaching' argument to linux_remove_process.
6675 * linux-low.h (thread_db_free): Add `detaching' parameter.
6676 * thread-db.c (thread_db_init): Pass false as `detaching' argument
6677 to thread_db_free.
6678 (thread_db_free): Add `detaching' parameter. Only
6679 call td_ta_clear_event if detaching from process.
6680
75aa492e
MK
66812009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
6682
6683 * thread-db.c (thread_db_free): Fix typo.
6684
21e1bee4
PP
66852009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
6686
6687 PR gdb/10838
6688 * thread-db.c (thread_db_free): Call td_ta_clear_event.
6689
8838b45e
NS
66902009-11-03 Nathan Sidwell <nathan@codesourcery.com>
6691
6692 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
6693 with an i686 compiler.
6694 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
6695 needed.
6696 * configure: Rebuilt.
6697
8a35fb51
SL
66982009-10-29 Sandra Loosemore <sandra@codesourcery.com>
6699
6700 PR gdb/10783
6701
6702 * server.c (handle_search_memory_1): Correct read_addr initialization
6703 in loop for searching subsequent chunks.
6704
96f15937
PP
67052009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
6706
6707 * configure.ac: New --with-libthread-db option.
6708 * thread-db.c: Allow direct dependence on libthread_db.
6709 (thread_db_free): Adjust.
6710 * config.in: Regenerate.
6711 * configure: Likewise.
889bf7c5 6712
5f7d1694
PP
67132009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
6714
6715 PR gdb/10757
6716 * thread-db.c (attach_thread): New function.
6717 (maybe_attach_thread): Return success/failure.
6718 (find_new_threads_callback): Adjust.
889bf7c5
PA
6719 (thread_db_find_new_threads): Loop until no new threads.
6720
88e3b899
PA
67212009-10-13 Pedro Alves <pedro@codesourcery.com>
6722
6723 * proc-service.c (ps_lgetregs): Formatting.
6724
cdbfd419
PP
67252009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
6726
6727 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
6728 * configure.ac: Adjust.
6729 * linux-low.h (struct process_info_private): Move members to struct
6730 thread_db.
6731 (thread_db_free, thread_db_handle_monitor_command): New prototype.
6732 * linux-low.c (linux_remove_process): Adjust.
6733 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
6734 * server.c (handle_query): Move code ...
6735 (handle_monitor_command): ... here. New function.
6736 * target.h (struct target_ops): New member.
6737 * thread-db.c (struct thread_db): New.
6738 (libthread_db_search_path): New variable.
6739 (thread_db_create_event, thread_db_enable_reporting)
6740 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
6741 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
6742 (try_thread_db_load_1, dladdr_to_soname): New functions.
6743 (try_thread_db_load, thread_db_load_search): New functions.
6744 (thread_db_init): Search for libthread_db.
6745 (thread_db_free): New function.
6746 (thread_db_handle_monitor_command): Likewise.
6747 * config.in: Regenerate.
6748 * configure: Regenerate.
889bf7c5 6749
4168d2d6
UW
67502009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
6751
6752 * spu-low.c (spu_kill): Wait for inferior to terminate.
6753 Call clear_inferiors.
6754 (spu_detach): Call clear_inferiors.
6755
81ecdfbb
RW
67562009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
6757
6758 * aclocal.m4: Regenerate.
6759 * config.in: Likewise.
6760 * configure: Likewise.
6761
0b9ff2c0
UW
67622009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
6763
6764 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
6765 (parse_spufs_run): New function.
6766 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
6767 (ppc_breakpoint_at): Handle SPU breakpoints.
6768
efcbbd14
UW
67692009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
6770
6771 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
6772 (SPUFS_MAGIC): Define.
6773 (spu_enumerate_spu_ids): New function.
6774 (linux_qxfer_spu): New function.
6775 (linux_target_ops): Install linux_qxfer_spu.
6776
f4d9bade
UW
67772009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
6778
6779 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
6780 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
6781 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
6782 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
6783 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
6784 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
6785 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
6786 (init_registers_powerpc_cell32l): Add prototype.
6787 (init_registers_powerpc_cell64l): Likewise.
6788 (ppc_arch_setup): Detect Cell/B.E. architecture.
6789
96e946ca
RW
67902009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
6791
6792 * Makefile.in (datarootdir): New variable.
6793
58d6951d
DJ
67942009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
6795
6796 * linux-low.c (linux_write_memory): Update debugging output.
6797 * Makefile.in (clean): Add new descriptions.
6798 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
6799 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
6800 * configure.srv: Add new files for arm*-*-linux*.
6801 * linux-arm-low.c: Add new declarations.
6802 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
6803 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
6804 (HWCAP_VFPv3D16): New.
6805 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
6806 instead of __IWMMXT__.
6807 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
6808 (arm_arch_setup): New.
6809 (target_regsets): Remove #ifdef. Add VFP regset.
6810 (the_low_target): Use arm_arch_setup.
6811
12b42a12
DJ
68122009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
6813
6814 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
6815 the main thread again.
6816
ac8c974e
AR
68172009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
6818
6819 Adding Neutrino gdbserver.
6820 * configure: Regenerated.
6821 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
6822 * configure.srv (i[34567]86-*-nto*): New target.
6823 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
6824 * remote-utils.c [__QNX__]: Include sys/iomgr.h
6825 (nto_comctrl) [__QNX__]: New function.
6826 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
6827
4424e0c3 68282009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7437790a
PA
6829
6830 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
6831 srv_tgtobj.
6832
912cf4ba
PA
68332009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
6834 Pedro Alves <pedro@codesourcery.com>
6835
6836 * win32-i386-low.c (i386_get_thread_context): Handle systems that
6837 don't support CONTEXT_EXTENDED_REGISTERS.
6838 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
6839 (the_low_target): Install them.
6840 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
6841 failing with ERROR_PIPE_NOT_CONNECTED.
6842
aa5ca48f
DE
68432009-06-30 Doug Evans <dje@google.com>
6844 Pierre Muller <muller@ics.u-strasbg.fr>
6845
6846 Add h/w watchpoint support to x86-linux, win32-i386.
6847 * Makefile.in (SFILES): Add i386-low.c
6848 (i386_low_h): Define.
6849 (i386-low.o): Add dependencies.
6850 (linux-x86-low.o): Add i386-low.h dependency.
6851 (win32-i386-low.o): Ditto.
6852 * i386-low.c: New file.
6853 * i386-low.h: New file.
6854 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
6855 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
6856 * linux-low.c (linux_add_process): Initialize arch_private.
6857 (linux_remove_process): Free arch_private.
6858 (add_lwp): Initialize arch_private.
6859 (delete_lwp): Free arch_private.
6860 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
6861 provided.
6862 * linux-low.h (process_info_private): New member arch_private.
6863 (lwp_info): New member arch_private.
6864 (linux_target_ops): New members new_process, new_thread,
6865 prepare_to_resume.
6866 (ptid_of): New macro.
6867 * linux-x86-low.c: Include stddef.h, i386-low.h.
6868 (arch_process_info): New struct.
6869 (arch_lwp_info): New struct.
6870 (x86_linux_dr_get, x86_linux_dr_set): New functions.
6871 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
6872 (i386_dr_low_get_status): New function.
6873 (x86_insert_point, x86_remove_point): New functions.
6874 (x86_stopped_by_watchpoint): New function.
6875 (x86_stopped_data_address): New function.
6876 (x86_linux_new_process, x86_linux_new_thread): New functions.
6877 (x86_linux_prepare_to_resume): New function.
6878 (the_low_target): Add entries for insert_point, remove_point,
6879 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
6880 prepare_to_resume.
6881 * server.c (debug_hw_points): New global.
6882 (monitor_show_help): Document set debug-hw-points.
6883 (handle_query): Process "set debug-hw-points".
6884 * server.h (debug_hw_points): Declare.
6885 (paddress): Declare.
6886 * utils.c (NUMCELLS, CELLSIZE): New macros.
6887 (get_sell, xsnprintf, paddress): New functions.
6888 * win32-arm-low.c (the_low_target): Add entries for insert_point,
6889 remove_point, stopped_by_watchpoint, stopped_data_address.
6890 * win32-i386-low.c: Include i386-low.h.
6891 (debug_reg_state): Replaces dr.
6892 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
6893 (i386_dr_low_get_status): New function.
6894 (i386_insert_point, i386_remove_point): New functions.
6895 (i386_stopped_by_watchpoint): New function.
6896 (i386_stopped_data_address): New function.
6897 (i386_initial_stuff): Update.
6898 (get_thread_context,set_thread_context,i386_thread_added): Update.
6899 (the_low_target): Add entries for insert_point,
6900 remove_point, stopped_by_watchpoint, stopped_data_address.
6901 * win32-low.c (win32_insert_watchpoint): New function.
6902 (win32_remove_watchpoint): New function.
6903 (win32_stopped_by_watchpoint): New function.
6904 (win32_stopped_data_address): New function.
6905 (win32_target_ops): Add entries for insert_watchpoint,
6906 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
6907 * win32-low.h (win32_target_ops): New members insert_point,
6908 remove_point, stopped_by_watchpoint, stopped_data_address.
6909
d993e290
PA
69102009-06-25 Pedro Alves <pedro@codesourcery.com>
6911
6912 * server.c (process_serial_event): Re-return unsupported, not
6913 error, if the type isn't recognized. Re-allow supporting only
6914 insert or remove packets. Also call require_running for
6915 breakpoints. Add missing break statement to default case. Tidy.
6916 * target.h (struct target_ops): Rename insert_watchpoint to
6917 insert_point, and remove_watchpoint to remove_point.
6918
6919 * linux-low.h (struct linux_target_ops): Likewise.
6920 * linux-low.c (linux_insert_watchpoint): Rename to ...
6921 (linux_insert_point): ... this. Adjust.
6922 (linux_remove_watchpoint): Rename to ...
6923 (linux_remove_point): ... this. Adjust.
6924 (linux_target_ops): Adjust.
6925 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
6926 (cris_insert_point): ... this.
6927 (cris_remove_watchpoint): Rename to ...
6928 (cris_remove_point): ... this.
6929 (the_low_target): Adjust.
6930
0f54c268
PM
69312009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
6932
6933 * server.c (handle_v_kill): Pass signal_pid to
6934 kill_inferior if multi_process is zero.
6935
c6314022
AR
69362009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
6937
6938 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
6939 * target.h (target_ops): Comment for *_watchpoint to make it clear
6940 the functions can get types '0' and '1'.
6941
4463ce24
AR
69422009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
6943
6944 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
6945 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
6946 * regcache.c (get_regcache): Likewise.
6947 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
6948 * win32-low.c (child_fetch_inferior_registers): Remove check for
6949 regno 0.
6950
cf8fd78b
PA
69512009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
6952 Pedro Alves <pedro@codesourcery.com>
6953
6954 * target.h (struct target_ops) <supports_multi_process>: New
6955 callback.
6956 (target_supports_multi_process): New.
6957 * server.c (handle_query): Even if GDB reports support, only
6958 enable multi-process if the target also supports it. Report
6959 multi-process support only if the target backend supports it.
6960 * linux-low.c (linux_supports_multi_process): New function.
6961 (linux_target_ops): Install it as target_supports_multi_process
6962 callback.
6963
47c0c975
DE
69642009-05-24 Doug Evans <dje@google.com>
6965
e09875d4
DE
6966 Global renaming of find_thread_pid to find_thread_ptid.
6967 * server.h (find_thread_ptid): Renamed from find_thread_pid.
6968 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
6969 All callers updated.
6970
e27d73f6
DE
6971 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
6972 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
6973 directly.
6974
47c0c975
DE
6975 * linux-low.c (get_stop_pc): Print pc if debug_threads.
6976 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
6977 (linux_resume_one_lwp): Ditto.
6978
2acc282a
DE
69792009-05-23 Doug Evans <dje@google.com>
6980
6981 * linux-low.c (linux_resume_one_lwp): Change type of first arg
6982 from struct inferior_list_entry * to struct lwp_info *.
6983 All callers updated.
6984
9f1036c1
DE
69852009-05-13 Doug Evans <dje@google.com>
6986
6987 * linux-x86-low.c: Don't include assert.h.
6988 (x86_siginfo_fixup): Use fatal, not assert.
6989 (x86_arch_setup): Fix comment.
6990
d0722149
DE
69912009-05-12 Doug Evans <dje@google.com>
6992
6993 Biarch support for i386/amd64 gdbserver.
6994 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
6995 Add linux-x86-low.c.
6996 (linux-i386-low.o, linux-x86-64-low.o): Delete.
6997 (linux-x86-low.o): Add.
6998 * linux-x86-64-low.c: Delete.
6999 * linux-i386-low.c: Delete.
7000 * linux-x86-low.c: New file.
7001 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
7002 linux-x86-low.o.
7003 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
7004 linux-x86-low.o.
7005 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
7006 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
7007 (linux_child_pid_to_exec_file): New function.
7008 (elf_64_header_p, elf_64_file_p): New functions.
7009 (siginfo_fixup): New function.
7010 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
7011 give target a chance to convert layout.
7012 * linux-low.h (linux_target_ops): New member siginfo_fixup.
7013 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
7014
fdeb2a12
DE
70152009-05-07 Doug Evans <dje@google.com>
7016
7017 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
7018 (regsets_store_inferior_registers): Ditto.
7019
a6dbe5df
PA
70202009-05-06 Pedro Alves <pedro@codesourcery.com>
7021
7022 PR server/10048
7023
7024 * linux-low.c (must_set_ptrace_flags): Delete.
7025 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
7026 of the global.
7027 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
7028 `lwp->must_set_ptrace_flags' instead.
ba42693b 7029 (linux_wait_for_event_1): Set ptrace options here.
a6dbe5df
PA
7030 (linux_wait_1): ... not here.
7031
5091eb23
DE
70322009-04-30 Doug Evans <dje@google.com>
7033
9f767825
DE
7034 * inferiors.c (started_inferior_callback): New function.
7035 (attached_inferior_callback): New function.
7036 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
7037 * server.c (print_started_pid, print_attached_pid): New functions.
7038 (detach_or_kill_for_exit): New function.
7039 (main): Call it instead of for_each_inferior (kill_inferior_callback).
7040 * server.h (have_started_inferiors_p): Declare.
7041 (have_attached_inferiors_p): Declare.
7042
5091eb23
DE
7043 * inferiors.c (remove_process): Fix memory leak, free process.
7044 * linux-low.c (linux_remove_process): New function.
7045 (linux_kill): Call it instead of remove_process.
7046 (linux_detach, linux_wait_1): Ditto.
7047
155c8968
PA
70482009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
7049
7050 * configure.srv: Add x86 Windows CE target.
7051
7fe519cb
UW
70522009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
7053
7054 * inferiors.c (get_thread_process): Make global.
7055 * server.h (get_thread_process): Add prototype.
7056 * thread-db.c (find_one_thread): Use get_thread_process
7057 instead of current_process.
7058 (thread_db_get_tls_address): Do not crash if called when
7059 thread layer is not yet initialized.
7060
5472f405
UW
70612009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
7062
7063 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
7064 * spu-low.c (current_tid): Rename to ...
7065 (current_ptid): ... this.
7066 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
7067 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
7068 ptid_get_lwp (current_ptid) instead of current_tid.
7069 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
7070 instead of current_tid. Use find_process_pid to verify pid
7071 argument is valid. Pass proper argument to remove_process.
7072 (spu_thread_alive): Compare current_ptid instead of current_tid.
7073 (spu_resume): Likewise.
7074
55ac2b99
PA
70752009-04-02 Pedro Alves <pedro@codesourcery.com>
7076
7077 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
7078 variable.
7079
95954743
PA
70802009-04-01 Pedro Alves <pedro@codesourcery.com>
7081
7082 Implement the multiprocess extensions, and add linux multiprocess
7083 support.
7084
7085 * server.h (ULONGEST): Declare.
7086 (struct ptid, ptid_t): New.
7087 (minus_one_ptid, null_ptid): Declare.
7088 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
7089 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
7090 (struct inferior_list_entry): Change `id' type from unsigned from
7091 to ptid_t.
7092 (struct sym_cache, struct breakpoint, struct
7093 process_info_private): Forward declare.
7094 (struct process_info): Declare.
7095 (current_process): Declare.
7096 (all_processes): Declare.
7097 (initialize_inferiors): Declare.
7098 (add_thread): Adjust to use ptid_t.
7099 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
7100 (add_process, remove_process, find_thread_pid): Declare.
7101 (find_inferior_id): Adjust to use ptid_t.
7102 (cont_thread, general_thread, step_thread): Change type to ptid_t.
7103 (multi_process): Declare.
7104 (push_event): Adjust to use ptid_t.
7105 (read_ptid, write_ptid): Declare.
7106 (prepare_resume_reply): Adjust to use ptid_t.
7107 (clear_symbol_cache): Declare.
7108 * inferiors.c (all_processes): New.
7109 (null_ptid, minus_one_ptid): New.
7110 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
7111 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
7112 (add_thread): Change unsigned long to ptid. Remove gdb_id
7113 parameter. Adjust.
7114 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
7115 (gdb_id_to_thread): Rename to ...
7116 (find_thread_pid): ... this. Change unsigned long to ptid.
7117 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
7118 (loaded_dll, pull_pid_from_list): Adjust.
7119 (add_process, remove_process, find_process_pid)
7120 (get_thread_process, current_process, initialize_inferiors): New.
7121 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
7122 (struct target_waitstatus) <related_pid>: Ditto.
7123 (struct target_ops) <kill, detach>: Add `pid' argument. Change
7124 return type to int.
7125 (struct target_ops) <join>: Add `pid' argument.
7126 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
7127 (struct target_ops) <wait>: Add `ptid' field. Change return type
7128 to ptid.
7129 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
7130 (mywait): Add `ptid' argument. Change return type to ptid_t.
7131 (target_pid_to_str): Declare.
7132 * target.c (set_desired_inferior): Adjust to use ptids.
7133 (mywait): Add new `ptid' argument. Adjust.
7134 (target_pid_to_str): New.
7135 * mem-break.h (free_all_breakpoints): Declare.
7136 * mem-break.c (breakpoints): Delelete.
7137 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
7138 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
7139 to use per-process breakpoint list.
7140 (free_all_breakpoints): New.
7141 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
7142 (symbol_cache, all_symbols_looked_up): Delete.
7143 (hexchars): New.
7144 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
7145 read_ptid): New.
7146 (prepare_resume_reply): Change ptid argument's type from unsigned
7147 long to ptid_t. Adjust. Implement W;process and X;process.
7148 (free_sym_cache, clear_symbol_cache): New.
7149 (look_up_one_symbol): Adjust to per-process symbol cache. *
7150 * server.c (cont_thread, general_thread, step_thread): Change type
7151 to ptid_t.
7152 (attached): Delete.
7153 (multi_process): New.
7154 (last_ptid): Change type to ptid_t.
7155 (struct vstop_notif) <ptid>: Change type to ptid_t.
7156 (queue_stop_reply, push_event): Change `ptid' argument's type to
7157 ptid_t.
7158 (discard_queued_stop_replies): Add `pid' argument.
7159 (start_inferior): Adjust to use ptids. Adjust to mywait interface
7160 changes. Don't reference the `attached' global.
7161 (attach_inferior): Adjust to mywait interface changes.
7162 (handle_query): Adjust to use ptids. Parse GDB's qSupported
7163 features. Handle and report "multiprocess+". Handle
7164 "qAttached:PID".
7165 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
7166 changes.
7167 (handle_v_kill): New.
7168 (handle_v_stopped): Adjust to use target_pid_to_str.
7169 (handle_v_requests): Allow multiple attaches and runs when
7170 multiprocess extensions are in effect. Handle "vKill".
7171 (myresume): Adjust to use ptids.
7172 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
7173 (handle_status): Adjust to discard_queued_stop_replies interface
7174 change.
7175 (first_thread_of, kill_inferior_callback)
7176 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
7177 (main): Call initialize_inferiors. Adjust to use ptids, killing
7178 and detaching from all inferiors. Handle multiprocess packet
7179 variants.
7180 * linux-low.h: Include gdb_proc_service.h.
7181 (struct process_info_private): New.
7182 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
7183 <lwpid_of>: Use ptid_get_lwp.
7184 (get_lwp_thread): Adjust.
7185 (struct lwp_info): Add `dead' member.
7186 (find_lwp_pid): Declare.
7187 * linux-low.c (thread_db_active): Delete.
7188 (new_inferior): Adjust comment.
7189 (inferior_pid): Delete.
7190 (linux_add_process): New.
7191 (handle_extended_wait): Adjust.
7192 (add_lwp): Change unsigned long to ptid.
7193 (linux_create_inferior): Add process to processes table. Adjust
7194 to use ptids. Don't set new_inferior here.
7195 (linux_attach_lwp): Rename to ...
7196 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
7197 it. Adjust to use ptids.
7198 (linux_attach_lwp): New.
7199 (linux_attach): Add process to processes table. Don't set
7200 new_inferior here.
7201 (struct counter): New.
7202 (second_thread_of_pid_p, last_thread_of_process_p): New.
7203 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
7204 multiple processes.
7205 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
7206 processes. Remove process from process table.
7207 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
7208 to multiple processes.
7209 (any_thread_of): New.
7210 (linux_detach): Add `pid' argument, and handle it. Remove process
7211 from processes table.
7212 (linux_join): Add `pid' argument. Handle it.
7213 (linux_thread_alive): Change unsighed long argument to ptid_t.
7214 Consider dead lwps as not being alive.
7215 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
7216 threads we're not interested in.
7217 (same_lwp, find_lwp_pid): New.
7218 (linux_wait_for_lwp): Change `pid' argument's type from int to
7219 ptid_t. Adjust.
7220 (linux_wait_for_event): Rename to ...
7221 (linux_wait_for_event_1): ... this. Change `pid' argument's type
7222 from int to ptid_t. Adjust.
7223 (linux_wait_for_event): New.
7224 (linux_wait_1): Add `ptid' argument. Change return type to
7225 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
7226 that exit from the process table.
7227 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
7228 Adjust.
7229 (mark_lwp_dead): New.
7230 (wait_for_sigstop): Adjust to use ptids. If a process exits while
7231 stopping all threads, mark its main lwp as dead.
7232 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
7233 ptids.
7234 (fetch_register, usr_store_inferior_registers)
7235 (regsets_fetch_inferior_registers)
7236 (regsets_store_inferior_registers, linux_read_memory)
7237 (linux_write_memory): Inline `inferior_pid'.
7238 (linux_look_up_symbols): Adjust to use per-process
7239 `thread_db_active'.
7240 (linux_request_interrupt): Adjust to use ptids.
7241 (linux_read_auxv): Inline `inferior_pid'.
7242 (initialize_low): Don't reference thread_db_active.
7243 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
7244 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
7245 (ps_getpid): Return the pid of the current inferior.
7246 * thread-db.c (proc_handle, thread_agent): Delete.
7247 (thread_db_create_event, thread_db_enable_reporting): Adjust to
7248 per-process data.
7249 (find_one_thread): Change argument type to ptid_t. Adjust to
7250 per-process data.
7251 (maybe_attach_thread): Adjust to per-process data and ptids.
7252 (thread_db_find_new_threads): Ditto.
7253 (thread_db_init): Ditto.
7254 * spu-low.c (spu_create_inferior, spu_attach): Add process to
7255 processes table. Adjust to use ptids.
7256 (spu_kill, spu_detach): Adjust interface. Remove process from
7257 processes table.
7258 (spu_join, spu_thread_alive): Adjust interface.
7259 (spu_wait): Adjust interface. Remove process from processes
7260 table. Adjust to use ptids.
7261 * win32-low.c (current_inferior_tid): Delete.
7262 (current_inferior_ptid): New.
7263 (debug_event_ptid): New.
7264 (thread_rec): Take a ptid. Adjust.
7265 (child_add_thread): Add `pid' argument. Adjust to use ptids.
7266 (child_delete_thread): Ditto.
7267 (do_initial_child_stuff): Add `attached' argument. Add process to
7268 processes table.
7269 (child_fetch_inferior_registers, child_store_inferior_registers):
7270 Adjust.
7271 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
7272 (win32_attach): Pass 1 to do_initial_child_stuff.
7273 (win32_kill): Adjust interface. Remove process from processes
7274 table.
7275 (win32_detach): Ditto.
7276 (win32_join): Adjust interface.
7277 (win32_thread_alive): Take a ptid.
7278 (win32_resume): Adjust to use ptids.
7279 (get_child_debug_event): Ditto.
7280 (win32_wait): Adjust interface. Remove exiting process from
7281 processes table.
7282
bd99dc85
PA
72832009-04-01 Pedro Alves <pedro@codesourcery.com>
7284
7285 Non-stop mode support.
7286
7287 * server.h (non_stop): Declare.
7288 (gdb_client_data, handler_func): Declare.
7289 (delete_file_handler, add_file_handler, start_event_loop):
7290 Declare.
7291 (handle_serial_event, handle_target_event, push_event)
7292 (putpkt_notif): Declare.
7293 * target.h (enum resume_kind): New.
7294 (struct thread_resume): Replace `step' field by `kind' field.
7295 (TARGET_WNOHANG): Define.
7296 (struct target_ops) <wait>: Add `options' argument.
7297 <supports_non_stop, async, start_non_stop>: New fields.
7298 (target_supports_non_stop, target_async): New.
7299 (start_non_stop): Declare.
7300 (mywait): Add `options' argument.
7301 * target.c (mywait): Add `options' argument. Print child exit
7302 notifications here.
7303 (start_non_stop): New.
7304 * server.c (non_stop, own_buf, mem_buf): New globals.
7305 (struct vstop_notif): New.
7306 (notif_queue): New global.
7307 (queue_stop_reply, push_event, discard_queued_stop_replies)
7308 (send_next_stop_reply): New.
7309 (start_inferior): Adjust to use resume_kind. Adjust to mywait
7310 interface changes.
7311 (attach_inferior): In non-stop mode, don't wait for the target
7312 here.
7313 (handle_general_set): Handle QNonStop.
7314 (handle_query): When handling qC, return the current general
7315 thread, instead of the first thread of the list.
7316 (handle_query): If the backend supports non-stop mode, include
7317 QNonStop+ in the qSupported query response.
7318 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
7319 and non-stop mode.
7320 (handle_v_attach, handle_v_run): Handle non-stop mode.
7321 (handle_v_stopped): New.
7322 (handle_v_requests): Report support for vCont;t. Handle vStopped.
7323 (myresume): Adjust to use resume_kind. Handle non-stop.
7324 (queue_stop_reply_callback): New.
7325 (handle_status): Handle non-stop mode.
7326 (main): Clear non_stop flag on reconnection. Use the event-loop.
7327 Refactor serial protocol handling from here ...
7328 (process_serial_event): ... to this new function. When GDB
7329 selects any thread, select one here. In non-stop mode, wait until
7330 GDB acks all pending events before exiting.
7331 (handle_serial_event, handle_target_event): New.
7332 * remote-utils.c (remote_open): Install remote_desc in the event
7333 loop.
7334 (remote_close): Remove remote_desc from the event loop.
7335 (putpkt_binary): Rename to...
7336 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
7337 (putpkt_binary): New as wrapper around putpkt_binary_1.
7338 (putpkt_notif): New.
7339 (prepare_resume_reply): In non-stop mode, don't change the
7340 general_thread.
7341 * event-loop.c: New.
7342 * Makefile.in (OBJ): Add event-loop.o.
7343 (event-loop.o): New rule.
7344
7345 * linux-low.h (pid_of): Moved here.
7346 (lwpid_of): New.
7347 (get_lwp_thread): Use lwpid_of.
7348 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
7349 * linux-low.c (pid_of): Delete.
7350 (inferior_pid): Use lwpid_of.
7351 (linux_event_pipe): New.
7352 (target_is_async_p): New.
7353 (delete_lwp): New.
7354 (handle_extended_wait): Use lwpid_of.
7355 (add_lwp): Don't set lwpid field.
7356 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
7357 (linux_kill_one_lwp): If killing a running lwp, stop it first.
7358 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
7359 (linux_detach_one_lwp): If detaching from a running lwp, stop it
7360 first. Adjust to linux_wait_for_event interface changes. Use
7361 lwpid_of.
7362 (linux_detach): Don't delete the main lwp here.
7363 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
7364 (status_pending_p): Don't consider explicitly suspended lwps.
7365 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
7366 pointer. Add OPTIONS argument. Change return type to int. Use
7367 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
7368 (linux_wait_for_event): Take an integer pid instead of a lwp_info
7369 pointer. Add status pointer argument. Return a pid instead of a
7370 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
7371 changes. In non-stop mode, don't switch to a random thread.
7372 (linux_wait): Rename to...
7373 (linux_wait_1): ... this. Add target_options argument, and handle
7374 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
7375 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
7376 clean exit and signal exit code. Don't stop all threads in
7377 non-stop mode. In all-stop mode, only stop all threads when
7378 reporting a stop to GDB. Handle explicit thread stop requests.
7379 (async_file_flush, async_file_mark): New.
7380 (linux_wait): New.
7381 (send_sigstop): Use lwpid_of.
7382 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
7383 interface changes. In non-stop mode, don't switch to a random
7384 thread.
7385 (linux_resume_one_lwp): Use lwpid_of.
7386 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
7387 (linux_resume_one_thread): ... this. Handle resume_stop. In
7388 non-stop mode, don't look for pending flag in all threads.
7389 (resume_status_pending_p): Don't consider explicitly suspended
7390 threads.
7391 (my_waitpid): Reimplement. Emulate __WALL.
7392 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
7393 Use lwpid_of.
7394 (sigchld_handler, linux_supports_non_stop, linux_async)
7395 (linux_start_non_stop): New.
7396 (linux_target_ops): Register linux_supports_non_stop, linux_async
7397 and linux_start_non_stop.
7398 (initialize_low): Install SIGCHLD handler.
7399 * thread-db.c (thread_db_create_event, find_one_thread)
7400 (thread_db_get_tls_address): Use lwpid_of.
7401 * win32-low.c (win32_detach): Adjust to use resume_kind.
7402 (win32_wait): Add `options' argument.
7403 * spu-low.c (spu_resume): Adjust to use resume_kind.
7404 (spu_wait): Add `options' argument.
7405
5b1c542e
PA
74062009-04-01 Pedro Alves <pedro@codesourcery.com>
7407
7408 Decouple target code from remote protocol.
7409
7410 * target.h (enum target_waitkind): New.
7411 (struct target_waitstatus): New.
7412 (struct target_ops) <wait>: Return an unsigned long. Take a
7413 target_waitstatus pointer instead of a char pointer.
7414 (mywait): Likewise.
7415 * target.c (mywait): Change prototype to return an unsigned long.
7416 Take a target_waitstatus pointer instead of a char pointer. Adjust.
7417 * server.h (thread_from_wait, old_thread_from_wait): Delete
7418 declarations.
7419 (prepare_resume_reply): Change prototype to take a
7420 target_waitstatus.
7421 * server.c (thread_from_wait, old_thread_from_wait): Delete.
7422 (last_status, last_ptid): New.
7423 (start_inferior): Remove "statusptr" argument. Adjust. Return a
7424 pid instead of a signal.
7425 (attach_inferior): Remove "status" and "signal" parameters.
7426 Adjust.
7427 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
7428 not as an address.
7429 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
7430 (handle_v_requests, myresume): Remove "status" and "signal"
7431 parameters. Adjust.
7432 (handle_status): New.
7433 (main): Delete local `status'. Adjust.
7434 * remote-utils.c: Include target.h.
7435 (prepare_resume_reply): Change prototype to take a
7436 target_waitstatus. Adjust.
7437
7438 * linux-low.c (linux_wait): Adjust to new target_ops->wait
7439 interface.
7440 * spu-low.c (spu_wait): Adjust.
7441 * win32-low.c (enum target_waitkind, struct target_waitstatus):
7442 Delete.
7443 (win32_wait): Adjust.
7444
2bd7c093
PA
74452009-04-01 Pedro Alves <pedro@codesourcery.com>
7446
7447 * target.h (struct thread_resume): Delete leave_stopped member.
7448 (struct target_ops): Add a `n' argument to the `resume' callback.
7449 * server.c (start_inferior): Adjust.
7450 (handle_v_cont, myresume): Adjust.
7451 * linux-low.c (check_removed_breakpoint): Adjust to resume
7452 interface change, and to removed leave_stopped field.
7453 (resume_ptr): Delete.
7454 (struct thread_resume_array): New.
7455 (linux_set_resume_request): Add new `arg' parameter. Adjust to
7456 resume interface change.
7457 (linux_continue_one_thread, linux_queue_one_thread)
7458 (resume_status_pending_p): Check if the resume field is NULL
7459 instead of checking the leave_stopped member.
7460 (linux_resume): Adjust to the target resume interface change.
7461 * spu-low.c (spu_resume): Adjust to the target resume interface
7462 change.
7463 * win32-low.c (win32_detach, win32_resume): Ditto.
7464
c35fafde
PA
74652009-04-01 Pedro Alves <pedro@codesourcery.com>
7466
7467 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
7468 flag.
7469 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
7470 pending.
7471 (linux_continue_one_thread): Only preserve the stepping flag if
7472 there's a pending breakpoint.
7473
0a59d50b
PA
74742009-03-31 Pedro Alves <pedro@codesourcery.com>
7475
7476 * server.c (main): After the inferior having exited, call
7477 remote_close before exiting gdbserver.
7478
f04c6d38
TJB
74792009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
7480
7481 Fix size of FPSCR in Power 7 processors.
7482 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
7483 (PPC_FEATURE_HAS_DFP): New #define.
7484 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
7485 size of the FPSCR.
7486
78e5cee6
PA
74872009-03-23 Pedro Alves <pedro@codesourcery.com>
7488
7489 * server.c (handle_query) Whitespace and formatting.
7490
1b3f6016
PA
74912009-03-22 Pedro Alves <pedro@codesourcery.com>
7492
7493 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
7494 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
7495 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
7496 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
7497 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
7498 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
7499 Makefile.in, configure.ac: Fix whitespace throughout.
7500 * configure: Regenerate.
7501
a07b2135
PA
75022009-03-22 Pedro Alves <pedro@codesourcery.com>
7503
7504 * inferiors.c (find_inferior): Make it safe for the callback
7505 function to delete the currently iterated inferior.
7506
67cc2626
PA
75072009-03-22 Pedro Alves <pedro@codesourcery.com>
7508
7509 * Makefile.in (linuw_low_h): Move higher.
7510 (thread-db.o): Depend on $(linux_low_h).
7511
54a0b537
PA
75122009-03-17 Pedro Alves <pedro@codesourcery.com>
7513
7514 Rename "process" to "lwp" throughout.
7515
7516 * linux-low.c (all_processes): Rename to...
7517 (all_lwps): ... this.
7518 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
7519 (add_process): Rename to ...
7520 (add_lwp): ... this. Adjust.
7521 (linux_create_inferior): Adjust.
7522 (linux_attach_lwp): Adjust.
7523 (linux_attach): Adjust.
7524 (linux_kill_one_process): Rename to ...
7525 (linux_kill_one_lwp): ... this. Adjust.
7526 (linux_kill): Adjust.
7527 (linux_detach_one_process): Rename to ...
7528 (linux_detach_one_lwp): ... this. Adjust.
7529 (linux_detach): Adjust.
7530 (check_removed_breakpoint): Adjust.
7531 (status_pending_p): Adjust.
7532 (linux_wait_for_process): Rename to ...
7533 (linux_wait_for_lwp): ... this. Adjust.
7534 (linux_wait_for_event): Adjust.
7535 (send_sigstop): Adjust.
7536 (wait_for_sigstop): Adjust.
7537 (stop_all_processes): Rename to ...
7538 (stop_all_lwps): ... this.
7539 (linux_resume_one_process): Rename to ...
7540 (linux_resume_one_lwp): ... this. Adjust.
7541 (linux_set_resume_request, linux_continue_one_thread)
7542 (linux_queue_one_thread, resume_status_pending_p)
7543 (usr_store_inferior_registers, regsets_store_inferior_registers)
7544 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
7545 Adjust.
7546 * linux-low.h (get_process): Rename to ...
7547 (get_lwp): ... this. Adjust.
7548 (get_thread_process): Rename to ...
7549 (get_thread_lwp): ... this. Adjust.
7550 (get_process_thread): Rename to ...
7551 (get_lwp_thread): ... this. Adjust.
7552 (struct process_info): Rename to ...
7553 (struct lwp_info): ... this.
7554 (all_processes): Rename to ...
7555 (all_lwps): ... this.
7556 * proc-service.c (ps_lgetregs): Adjust.
7557 * thread-db.c (thread_db_create_event, find_one_thread)
7558 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
7559
0b16c5cf
PA
75602009-03-14 Pedro Alves <pedro@codesourcery.com>
7561
7562 * server.c (handle_query): Handle "qAttached".
7563
32de4b9d
NS
75642009-03-13 Nathan Sidwell <nathan@codesourcery.com>
7565
7566 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
7567 GPLv3, update license URL.
7568
2aecd87f
DE
75692009-03-01 Doug Evans <dje@google.com>
7570
93efd302 7571 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
2aecd87f
DE
7572 (server_h): Add gdb_signals.h.
7573 (signals.o): Update.
7574 * server.h (target_signal_from_host,target_signal_to_host_p)
7575 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
7576
86b1f9c5
PM
75772009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
7578
7579 * remote-utils.c (getpkt): Also generate remote-debug
7580 information if noack_mode is set.
7581
4aa995e1
PA
75822009-02-06 Pedro Alves <pedro@codesourcery.com>
7583
7584 * server.c (handle_query): Report qXfer:siginfo:read and
7585 qXfer:siginfo:write as supported and handle them.
7586 * target.h (struct target_ops) <qxfer_siginfo>: New field.
7587 * linux-low.c (linux_xfer_siginfo): New.
7588 (linux_target_ops): Set it.
7589
62709adf
PA
75902009-01-26 Pedro Alves <pedro@codesourcery.com>
7591
7592 * server.c (gdbserver_usage): Mention --remote-debug.
7593 (main): Accept '--remote-debug' switch.
7594
aef93bd7
DE
75952009-01-18 Doug Evans <dje@google.com>
7596
7597 * regcache.c (new_register_cache): No need to check result of xcalloc.
7598 * server.c (handle_search_memory): Back out calls to xmalloc,
7599 result is checked and error is returned to user upon failure.
7600 (handle_query): Ditto. Add more checks for result of malloc.
7601 (handle_v_cont): Check result of malloc, report error back to
7602 user upon failure.
7603 (handle_v_run): Ditto. Call freeargv.
7604 * server.h (freeargv): Declare.
7605 * utils.c (freeargv): New fn.
7606
54363045
DE
76072009-01-15 Doug Evans <dje@google.com>
7608
f626972c
DE
7609 * gdbreplay.c (perror_with_name): Make arg const char *.
7610 * server.h (target_signal_to_name): Make return type const char *.
0842e787 7611 * thread-db.c (thread_db_err_str): Make return type const char *.
f626972c 7612 * utils.c (perror_with_name): Make arg const char *.
54363045 7613
18aae699
PA
76142009-01-14 Pedro Alves <pedro@codesourcery.com>
7615
7616 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
7617 when handling a EXIT_PROCESS_DEBUG_EVENT.
7618
ff703abe
JB
76192009-01-06 Joel Brobecker <brobecker@adacore.com>
7620
7621 * gdbreplay.c (gdbreplay_version): Update copyright year.
7622 * server.c (gdbserver_version): Likewise.
7623
f21cc1a2 76242009-01-05 Doug Evans <dje@google.com>
0e21c1ec
DE
7625
7626 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
f21cc1a2 7627 (handle_extended_wait): Improve comment.
0e21c1ec 7628
bca929d3
DE
76292008-12-13 Doug Evans <dje@google.com>
7630
7631 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
7632 * server.h (ATTR_MALLOC): New macro.
7633 (xmalloc,xcalloc,xstrdup): Declare.
7634 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
7635 * inferiors.c: Ditto.
7636 * linux-low.c: Ditto.
7637 * mem-break.c: Ditto.
7638 * regcache.c: Ditto.
7639 * remote-utils.c: Ditto.
7640 * server.c: Ditto.
7641 * target.c: Ditto.
7642 * win32-low.c: Ditto.
7643
97438e3f
DE
76442008-12-12 Doug Evans <dje@google.com>
7645
896c7fbb
DE
7646 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
7647 in debugging printf.
7648
97438e3f
DE
7649 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
7650
e3b886f8
DE
76512008-12-09 Doug Evans <dje@google.com>
7652
7653 * linux-low.h (struct process_info): Delete member tid, unused.
7654 * thread-db.c (find_one_thread): Update.
7655 (maybe_attach_thread): Update.
7656
07e059b5
VP
76572008-12-02 Pedro Alves <pedro@codesourcery.com>
7658
889bf7c5
PA
7659 * target.h (struct target_ops): Add qxfer_osdata member.
7660 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
7661 and dirent.h.
7662 (linux_qxfer_osdata): New functions.
7663 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
7664 callback.
7665 * server.c (handle_query): Handle "qXfer:osdata:read:".
7666 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
7667 (buffer_xml_printf): New functions.
7668 * server.h (struct buffer): New.
7669 (buffer_grow_str, buffer_grow_str0): New macros.
7670 (buffer_grow, buffer_free, buffer_init, buffer_finish)
7671 (buffer_xml_printf): Declare.
07e059b5 7672
4cab47ab
DE
76732008-11-24 Doug Evans <dje@google.com>
7674
7675 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
7676
f142445f
DJ
76772008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
7678
7679 * server.c (handle_v_run): Always use the supplied argument list.
7680
d0107bb6 76812008-11-19 Bob Wilson <bob.wilson@acm.org>
889bf7c5 7682
d0107bb6
BW
7683 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
7684 (xtensa_regmap_table): Add entry for scompare1.
889bf7c5 7685
2c4ad781
TJB
76862008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
7687
7688 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
7689 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
7690 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
7691 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
7692 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
7693 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
7694 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
7695 XML target descriptions.
7696 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
7697 when inferior is running on an ISA 2.05 or later processor. Add
7698 special case to return offset for full 64-bit slot of FPSCR when
7699 in 32-bits.
7700
dfb64f85
DJ
77012008-11-14 Daniel Gutson <dgutson@codesourcery.com>
7702
7703 * Makefile.in (SFILES, clean): Added sparc64 files.
7704 (reg-sparc64.o, reg-sparc64.c): New.
7705 * configure.srv (sparc*-*-linux*): New configuration.
7706 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
7707 syscall arguments for SPARC.
7708 (regsets_store_inferior_registers): Likewise.
7709 * linux-sparc-low.c: New file.
7710
66b6e1dd
DE
77112008-10-21 Doug Evans <dje@google.com>
7712
7713 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
7714 (READLINE_DIR,READLINE_DEP): Delete.
7715 (INTERNAL_CFLAGS): Update.
7716 (LINTFLAGS): Update.
7717
9b710a42
PA
77182008-10-10 Pedro Alves <pedro@codesourcery.com>
7719
7720 * server.c (handle_v_run): If GDB didn't specify an argv, use the
7721 whole argv from the last run, not just argv[0].
7722
5822d809
PA
77232008-09-08 Pedro Alves <pedro@codesourcery.com>
7724
7725 * regcache.c (new_register_cache): Return NULL if the register
7726 cache size isn't known yet.
7727 (free_register_cache): Avoid dereferencing a NULL regcache.
7728
74aac56f
DJ
77292008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
7730
7731 * configure.srv: Merge MIPS and MIPS64.
7732
400b20f5
MR
77332008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
7734
7735 * Makefile.in (uninstall): Apply $(EXEEXT) too.
7736
677c5bb1
LM
77372008-08-18 Luis Machado <luisgpm@br.ibm.com>
7738
7739 * Makefile.in: Add required vsx dependencies.
7740
7741 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
7742 Declare init_registers_powerpc_vsx32l.
7743 Declare init_registers_powerpc_vsx64l.
7744 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
7745 (ppc_arch_setup): Check for VSX in hwcap.
7746 (ppc_fill_vsxregset): New function.
7747 (ppc_store_vsxregset): New function.
7748 Add new VSX entry in regset_info target_regsets.
7749
7750 * configure.srv: Add new VSX dependencies.
7751
a6f3e723
SL
77522008-08-12 Pedro Alves <pedro@codesourcery.com>
7753
7754 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
7755 (remote_open): Set or clear transport_is_reliable.
7756 (putpkt_binary): Don't expect acks in noack mode.
7757 (getpkt): Don't send ack/nac in noack mode.
7758 * server.c (handle_general_set): Handle QStartNoAckMode.
7759 (handle_query): If connected by tcp pass QStartNoAckMode+ in
7760 qSupported.
7761 (main): Reset noack_mode on every connection.
7762 * server.h (noack_mode): Declare.
7763
a417dc56
RW
77642008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
7765
7766 * Makefile.in (GDBREPLAY_OBS): New variable.
7767 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
7768
3221518c
UW
77692008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
7770 Daniel Jacobowitz <dan@codesourcery.com>
7771
7772 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
7773 (usr_store_inferior_registers): Likewise.
7774 (regsets_store_inferior_registers): Likewise.
7775
ec56be1b
PA
77762008-07-31 Rolf Jansen <rj@surtec.com>
7777 Pedro Alves <pedro@codesourcery.com>
7778
7779 * configure.ac: Check for memmem declaration.
7780 * server.c [HAVE_MALLOC_H]: Include malloc.h.
7781 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
7782 (disable_packet_qfThreadInfo): Unconditionally compile.
7783 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
7784 * configure, config.in: Regenerate.
7785
2fe5e3ff
DE
77862008-07-28 Doug Kwan <dougkwan@google.com>
7787
7788 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
7789 (linux_write_memory): Remove declaration of errno.
7790
836acd6d
UW
77912008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
7792
7793 * linux-low.c (handle_extended_wait): Do not use "status"
7794 variable uninitialized.
7795
aeba519e
PA
77962008-07-07 Pedro Alves <pedro@codesourcery.com>
7797
7798 * server.c (handle_v_attach): Inhibit reporting dll changes.
7799
db42f210
PA
78002008-06-27 Pedro Alves <pedro@codesourcery.com>
7801
7802 * remote-utils.c (prepare_resume_reply): If requested, don't
7803 output "thread:TID" in the T stop reply.
7804
7805 * server.c (disable_packet_vCont, disable_packet_Tthread)
7806 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
7807 (handle_query): If requested, disable support for qC, qfThreadInfo
7808 and qsThreadInfo.
7809 (handle_v_requests): If requested, disable support for vCont.
7810 (gdbserver_show_disableable): New.
7811 (main): Handle --disable-packet and --disable-packet=LIST.
7812
7813 * server.h (disable_packet_vCont, disable_packet_Tthread)
7814 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
7815
8e4c5421
CD
78162008-06-20 Carlos O'Donell <carlos@codesourcery.com>
7817
7818 * server.c (gdbserver_usage): Mention --version.
7819
6e23a804
DJ
78202008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
7821
7822 * Makefile.in (gdbreplay.o): New rule.
7823
90aa6a40
JM
78242008-06-06 Joseph Myers <joseph@codesourcery.com>
7825
7826 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
7827 message, not gdbserver.
7828
c16158bc 78292008-06-05 Vladimir Prus <vladimir@codesourcery.com>
889bf7c5
PA
7830 Nathan Sidwell <nathan@codesourcery.com>
7831 Joseph Myers <joseph@codesourcery.com>
c16158bc
JM
7832
7833 * acinclude.m4: Include ../../config/acx.m4.
7834 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
7835 * configure, config.in: Regenerate.
7836 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
7837 * server.c (gdbserver_version): Print PKGVERSION.
7838 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
7839 (main): Adjust gdbserver_usage calls.
7840 * gdbreplay.c (version, host_name): Add declarations.
7841 (gdbreplay_version, gdbreplay_usage): New.
7842 (main): Accept --version and --help options.
7843
aeb75bf5
DJ
78442008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
7845
7846 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
7847 (arm_breakpoint_at): Handle Thumb.
7848 (the_low_target): Add comment.
7849
76b233dd
UW
78502008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
7851
7852 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
7853
08388c79
DE
78542008-05-09 Doug Evans <dje@google.com>
7855
a3c83fae
DE
7856 * server.h (decode_search_memory_packet): Declare.
7857 * remote-utils.c (decode_search_memory_packet): New fn.
7858 * server.c (handle_search_memory_1): New fn.
08388c79
DE
7859 (handle_search_memory): New fn.
7860 (handle_query): Process qSearch:memory packets.
7861
bb9c3d36
UW
78622008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
7863
7864 * regcache.c (registers_length): Remove.
7865 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
7866 full register packet.
7867 * regcache.h (registers_length): Remove prototype.
7868 * server.h (PBUFSIZ): Define to 16384.
7869
7284e1be
UW
78702008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
7871
7872 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
7873 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
7874 powerpc-64l.o, and powerpc-altivec64l.o.
7875 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
7876 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
7877 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
7878 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
7879 rs6000/power-linux.xml, and rs6000/power64-linux.xml
7880 to srv_xmlfiles.
7881
7882 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
7883 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
7884 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
7885 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
7886 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
7887 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
7888 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
7889 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
7890 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
7891 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
7892 (clean): Update.
7893
7894 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
7895 (init_registers_powerpc_32l): ... this new prototype.
7896 (init_registers_powerpc_32): Remove, replace by ...
7897 (init_registers_powerpc_altivec32l): ... this new prototype.
7898 (init_registers_powerpc_e500): Remove, replace by ...
7899 (init_registers_powerpc_e500l): ... this new prototype.
7900 (init_registers_ppc64): Remove, replace by ...
7901 (init_registers_powerpc_64l): ... this new prototype.
7902 (init_registers_powerpc_64): Remove, replace by ...
7903 (init_registers_powerpc_altivec64l): ... this new prototype.
7904 (ppc_num_regs): Set to 73.
7905 (PT_ORIG_R3, PT_TRAP): Define if necessary.
7906 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
7907 (ppc_cannot_store_register): Handle orig_r3 and trap.
7908 (ppc_arch_setup): Update init_registers_... calls.
7909 (ppc_fill_gregset): Handle orig_r3 and trap.
7910
7911 * inferiors.c (clear_inferiors): Reset current_inferior.
7912
fdc59709
PB
79132008-04-23 Paolo Bonzini <bonzini@gnu.org>
7914
889bf7c5
PA
7915 * acinclude.m4: Add override.m4.
7916 * configure: Regenerate.
fdc59709 7917
c9b2f845
UW
79182008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
7919
7920 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
7921 initial call to init_register_ppc64.
7922
550512b8
UW
79232008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
7924
43aaf8b6
PA
7925 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
7926 single powerpc*-*-linux* case.
550512b8
UW
7927 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
7928
b6430ec3
UW
79292008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
7930
7931 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
889bf7c5 7932 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
b6430ec3
UW
7933 from reg_xmlfiles.
7934 * linux-ppc-low.c: Include <elf.h>.
7935 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
7936 (ppc_hwcap): New global variable.
7937 (ppc_regmap): Remove __SPE__ #ifdef sections.
7938 (ppc_regmap_e500): New global variable.
7939 (ppc_cannot_store_register): Update __SPE__ special case.
7940 (ppc_get_hwcap): New function.
7941 (ppc_arch_setup): Use it to determine whether inferior supports
7942 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
7943 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
7944 Do not access registers if target does not support AltiVec.
7945 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
7946 Do not access registers if target does not support SPE.
7947 (target_regsets): Unconditionally include AltiVec and SPE regsets.
7948
52fa2412
UW
79492008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
7950
7951 * linux-low.c (disabled_regsets, num_regsets): New.
7952 (use_regsets_p): Delete.
7953 (linux_wait_for_process): Clear disabled_regsets.
7954 (regsets_fetch_inferior_registers): Check and set it.
7955 (regsets_store_inferior_registers): Likewise.
7956 (linux_fetch_registers, linux_store_registers): Do not use
7957 use_regsets_p.
7958 (initialize_low): Allocate disabled_regsets.
7959
e28b3332
DJ
79602008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
7961
7962 * Makefile.in (LIBOBJS): New.
7963 (OBS): Use LIBOBJS.
7964 (memmem.o): New rule.
7965 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
7966 * configure: Regenerated.
7967
4536995d
UW
79682008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
7969
7970 * server.c (handle_query): Never return "unsupported" for
7971 qXfer:features:read queries.
7972
221c031f
UW
79732008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
7974
7975 * server.c (get_features_xml): Fix inverted condition.
7976 (handle_query): Always support qXfer:feature:read.
7977
ccd213ac
DJ
79782008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
7979
7980 * server.c (wrapper_argv): New.
7981 (start_inferior): Handle wrapper_argv. If set, expect an extra
7982 trap.
7983 (gdbserver_usage): Document --wrapper.
7984 (main): Parse --wrapper.
7985
6fe305f7
UW
79862008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
7987
7988 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
7989 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
7990 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
7991 (ppc_set_pc): Likewise.
7992 (ppc_arch_setup): New function.
7993 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
7994 of collect_register.
889bf7c5 7995 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
6fe305f7 7996
5b0a002e
UW
79972008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
7998
7999 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
8000 instead of linux-ppc64-low.o.
8001 * linux-ppc64-low.c: Remove file.
8002 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
8003 (linux-ppc64-low.o): Remove rule.
8004
8005 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
8006 (init_registers_powerpc_64): Likewise.
8007 (ppc_regmap): Conditionally define depending on __powerpc64__.
8008 (ppc_cannot_store_register): Do not special-case "fpscr" when
8009 compiled on __powerpc64__.
8010 (ppc_collect_ptrace_register): New function.
8011 (ppc_supply_ptrace_register): New function.
8012 (ppc_breakpoint): Change type to "unsigned int".
8013 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
8014 (the_low_target): Conditionally provide initializers for the
889bf7c5 8015 arch_setup member depending on __powerpc64__. Install
5b0a002e
UW
8016 collect_ptrace_register and supply_ptrace_register members.
8017
9b4b61c8
UW
80182008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
8019
8020 * regcache.h (gdbserver_xmltarget): Add extern declaration.
8021 * server.c (gdbserver_xmltarget): Define.
8022 (get_features_xml): Use it to replace "target.xml" and arch_string.
8023
8024 * configure.srv: Remove srv_xmltarget. Add XML files that were
8025 mentioned there to srv_xmlfiles instead. Remove conditional tests
8026 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
8027 srv_xmlfiles and srv_regobj to include all possible choices.
8028 * configure.ac (srv_xmltarget): Remove.
8029 (srv_xmlfiles): Do not add "target.xml".
8030 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
8031 checks for supplementary target information.
8032 * configure: Regenerate.
8033 * Makefile.in (XML_TARGET): Remove.
8034 (target.xml): Remove rule.
8035 (clean): Do not clean up target.xml.
8036 (.PRECIOUS): Do not mention target.xml.
8037
8038 * target.h (struct target_ops): Remove arch_string member.
8039 * linux-low.c (linux_arch_string): Remove.
8040 (linux_target_ops): Remove arch_string initializer.
8041 * linux-low.h (struct linux_target_ops): Remove arch_string member.
8042 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
8043 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
8044 * spu-low.c (spu_arch_string): Remove.
8045 (spu_target_ops): Remove arch_string initializer.
8046 * win32-low.c (win32_arch_string): Remove.
8047 (win32_target_ops): Remove arch_string initializer.
8048 * win32-low.h (struct win32_target_ops): Remove arch_string member.
8049 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
8050 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
8051
ee1a7ae4
UW
80522008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
8053
8054 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
8055 by collect_ptrace_register and supply_ptrace_register hooks.
8056 * linux-low.c (fetch_register): Use supply_ptrace_register callback
8057 instead of checking for the_low_target.left_pad_xfer.
8058 (usr_store_inferior_registers): Use collect_ptrace_register callback
8059 instead of checking for the_low_target.left_pad_xfer.
8060
8061 * linux-s390-low.c (s390_collect_ptrace_register): New function.
8062 (s390_supply_ptrace_register): Likewise.
8063 (s390_fill_gregset): Call s390_collect_ptrace_register.
8064 (the_low_target): Update.
8065
8066 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
8067 (ppc_supply_ptrace_register): Likewise.
8068 (the_low_target): Update.
8069
8070 * linux-i386-low.c (the_low_target): Update.
8071 * linux-x86-64-low.c (the_low_target): Update.
8072
d61ddec4
UW
80732008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
8074
8075 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
8076 reg-s390.o and reg-s390x.o.
8077
8078 * linux-low.c (new_inferior): New global variable.
8079 (linux_create_inferior, linux_attach): Set it.
8080 (linux_wait_for_process): Call the_low_target.arch_setup after the
8081 target has stopped for the first time.
8082 (initialize_low): Do not call the_low_target.arch_setup.
8083
8084 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
8085 (s390_set_pc): Likewise.
8086 (s390_arch_setup): New function.
8087 (the_low_target): Use s390_arch_setup as arch_setup routine.
8088
8089 * regcache.c (realloc_register_cache): New function.
8090 (set_register_cache): Call it for each existing regcache.
8091
d05b4ac3
UW
80922008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
8093
8094 * server.h (init_registers): Remove prototype.
8095
8096 * linux-low.h (struct linux_target_ops): Add arch_setup field.
8097 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
8098 instead of init_registers ().
8099 * linux-arm-low.c (init_registers_arm): Add prototype.
8100 (init_registers_arm_with_iwmmxt): Likewise.
8101 (the_low_target): Add initializer for arch_setup field.
8102 * linux-cris-low.c (init_registers_cris): Add prototype.
8103 (the_low_target): Add initializer for arch_setup field.
8104 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
8105 (the_low_target): Add initializer for arch_setup field.
8106 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
8107 (the_low_target): Add initializer for arch_setup field.
8108 * linux-ia64-low.c (init_registers_ia64): Add prototype.
8109 (the_low_target): Add initializer for arch_setup field.
8110 * linux-m32r-low.c (init_registers_m32r): Add prototype.
8111 (the_low_target): Add initializer for arch_setup field.
8112 * linux-m68k-low.c (init_registers_m68k): Add prototype.
8113 (the_low_target): Add initializer for arch_setup field.
8114 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
8115 (init_registers_mips64_linux): Likewise.
8116 (the_low_target): Add initializer for arch_setup field.
8117 * linux-ppc-low.c (init_registers_ppc): Add prototype.
8118 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
8119 (the_low_target): Add initializer for arch_setup field.
8120 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
8121 (init_registers_powerpc_64): Likewise.
8122 (the_low_target): Add initializer for arch_setup field.
8123 * linux-s390-low.c (init_registers_s390): Add prototype.
8124 (init_registers_s390x): Likewise.
8125 (the_low_target): Add initializer for arch_setup field.
8126 * linux-sh-low.c (init_registers_sh): Add prototype.
8127 (the_low_target): Add initializer for arch_setup field.
8128 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
8129 (the_low_target): Add initializer for arch_setup field.
8130 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
8131 (the_low_target): Add initializer for arch_setup field.
8132
8133 * win32-low.h (struct win32_target_ops): Add arch_setup field.
8134 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
8135 instead of init_registers ().
8136 * win32-arm-low.c (init_registers_arm): Add prototype.
8137 (the_low_target): Add initializer for arch_setup field.
8138 * win32-i386-low.c (init_registers_i386): Add prototype.
8139 (the_low_target): Add initializer for arch_setup field.
8140
8141 * spu-low.c (init_registers_spu): Add prototype.
8142 (initialize_low): Call initialie_registers_spu () instead of
8143 initialize_registers ().
8144
fd96d250
PA
81452008-02-19 Pedro Alves <pedro@codesourcery.com>
8146
8147 * server.c (handle_v_requests): When handling the vRun and vAttach
8148 packets, if already debugging a process, don't kill it. Return an
8149 error instead.
8150
d41b6bb4
DJ
81512008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
8152
8153 * server.c (handle_query): Correct length check.
8154
5ac588cf
PA
81552008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
8156
8157 * win32-low.c (do_initial_child_stuff): Add process handle
8158 parameter. Set current_process_handle and current_process_id from the
8159 parameters. Clear globals.
8160 (win32_create_inferior): Don't set current_process_handle and
8161 current_process_id here. Instead pass them on the call to
8162 do_initial_child_stuff.
8163 (win32_attach): Likewise.
8164 (win32_clear_inferiors): New.
8165 (win32_kill): Don't close the current process handle or the
8166 current thread handle here. Instead call win32_clear_inferiors.
8167 (win32_detach): Don't open a new handle to the process. Call
8168 win32_clear_inferiors.
8169 (win32_join): Don't rely on current_process_handle; open a new
8170 handle using the process id.
8171 (win32_wait): Call win32_clear_inferiors when the inferior process
8172 has exited.
8173
ecd7ecbc
DJ
81742008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
8175
8176 * server.c (monitor_show_help): Add "exit".
8177
1525d545
MG
81782008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
8179
ecd7ecbc 8180 * Makefile.in (SFILES): Add linux-xtensa-low.c.
1525d545
MG
8181 (clean): Add reg-xtensa.c.
8182 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
ecd7ecbc
DJ
8183 * configure.srv (xtensa*-*-linux*) New target.
8184 * linux-xtensa-low.c: New.
8185 * xtensa-xtregs.c: New.
1525d545 8186
59a016f0
PA
81872008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
8188
8189 * hostio.c: Don't include errno.h.
8190 (errno_to_fileio_errno): Move to hostio-errno.
8191 * hostio.c: (hostio_error): Remove the error parameter. Defer the
8192 error number outputting to the target->hostio_last_error callback.
8193 (hostio_packet_error): Use FILEIO_EINVAL directly.
8194 (handle_open, handle_pread, hostio_error, handle_unlink): Update
8195 calls to hostio_error.
8196 * hostio-errno.c: New.
8197 * server.h (hostio_last_error_from_errno): Declare.
8198 * target.h (target_ops): Add hostio_last_error member.
8199 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
8200 as hostio_last_error handler.
889bf7c5 8201 * spu-low.c (spu_target_ops): Likewise.
59a016f0
PA
8202 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
8203 (wince_hostio_last_error): New functions.
8204 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
8205 as hostio_last_error handler.
8206 (win32_target_ops) [!_WIN32_WCE]: Register
8207 hostio_last_error_from_errno as hostio_last_error handler.
8208 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
8209 (hostio-errno.o): New rule.
8210 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
8211 * configure.srv (srv_hostio_err_objs): New variable. Default to
8212 hostio-errno.o.
8213 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
8214 * configure: Regenerate.
8215
2d717e4f
DJ
82162008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
8217
8218 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
8219 (linux_kill, linux_detach): Clean up the process list.
8220 * remote-utils.c (remote_open): Improve port number parsing.
8221 (putpkt_binary, input_interrupt): Only send interrupts if the target
8222 is running.
8223 * server.c (extended_protocol): Make static.
8224 (attached): Define earlier.
8225 (exit_requested, response_needed, program_argv): New variables.
8226 (target_running): New.
8227 (start_inferior): Clear attached here.
8228 (attach_inferior): Set attached here.
8229 (require_running): Define.
8230 (handle_query): Use require_running and target_running. Implement
8231 "monitor exit".
8232 (handle_v_attach, handle_v_run): New.
8233 (handle_v_requests): Use require_running. Handle vAttach and vRun.
8234 (gdbserver_usage): Update.
8235 (main): Redo argument parsing. Handle --debug and --multi. Handle
8236 --attach along with other options or after the port. Save
8237 program_argv. Support no initial program. Resynchronize
8238 communication with GDB after an error. Handle "monitor exit".
8239 Use require_running and target_running. Always allow the extended
8240 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
8241 restart in extended mode.
8242 * README: Refer to the GDB manual. Update --attach usage.
8243
7407e2de
AS
82442007-12-20 Andreas Schwab <schwab@suse.de>
8245
8246 * linux-low.c (STACK_SIZE): Define.
8247 (linux_tracefork_child): Use it. Use __clone2 on ia64.
8248 (linux_test_for_tracefork): Likewise.
8249
b65d95c5
DJ
82502007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
8251
8252 * linux-low.c (linux_wait_for_event): Update messages. Do not
8253 reinsert auto-delete breakpoints.
8254 * mem-break.c (struct breakpoint): Change return type of handler to
8255 int.
8256 (set_breakpoint_at): Update handler type.
8257 (reinsert_breakpoint_handler): Return 1 instead of calling
8258 delete_breakpoint.
8259 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
8260 setting a new one.
8261 (check_breakpoints): Delete auto-delete breakpoints and return 2.
8262 * mem-break.h (set_breakpoint_at): Update handler type.
8263 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
8264 * win32-low.c (auto_delete_breakpoint): New.
8265 (get_child_debug_event): Use it.
8266
4e799345
DJ
82672007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
8268
8269 * configure.ac: Check for pread and pwrite.
8270 * hostio.c (handle_pread): Fall back to lseek and read.
8271 (handle_pwrite): Fall back to lseek and write.
8272 * config.in, configure: Regenerated.
8273
27524b67
DJ
82742007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
8275
8276 * server.c (myresume): Add own_buf argument.
8277 (main): Update calls.
8278
a20d5e98
DJ
82792007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
8280
8281 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
8282 * remote-utils.c (remote_open): Do not call disable_async_io.
8283 (block_async_io): Delete.
8284 (unblock_async_io): Make static.
8285 (initialize_async_io): New.
8286 * server.c (handle_v_cont): Handle async I/O here.
8287 (myresume): Likewise. Move other common resume tasks here...
8288 (main): ... from here. Call initialize_async_io. Disable async
8289 I/O before the main loop.
8290 * server.h (initialize_async_io): Declare.
8291 (block_async_io, unblock_async_io): Delete prototypes.
8292 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
8293
b79d787e
DJ
82942007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
8295
8296 * remote-utils.c (readchar): Allow binary data in received messages.
8297
d97903b2
PA
82982007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
8299
8300 * win32-low.c (attaching): New global.
8301 (win32_create_inferior): Clear the `attaching' global.
8302 (win32_attach): Set the `attaching' global.
8303 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
8304 attaching. Only set a breakpoint at the entry point if not
8305 attaching.
8306
311de423
PA
83072007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
8308
8309 * server.c (main): Don't report dll events on the initial
8310 connection on attaches.
8311
6c2d16d2
PA
83122007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
8313
8314 * server.c (main): Relax numerical bases supported for the pid of
8315 the --attach command line argument.
8316
5ca906e6
PA
83172007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
8318
8319 * win32-low.c (win32_attach): Call OpenProcess before
8320 DebugActiveProcess, not after. Add last error output to error
8321 call.
8322
9c6c8194
PA
83232007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
8324
8325 * win32-low.c (win32_get_thread_context)
8326 (win32_set_thread_context): New functions.
8327 (thread_rec): Use win32_get_thread_context.
8328 (continue_one_thread, win32_resume): Use win32_set_thread_context.
8329 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
8330 field.
8331
4d5d1aaa
PA
83322007-12-03 Leo Zayas
8333 Pedro Alves <pedro_alves@portugalmail.pt>
8334
8335 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
8336 global variables.
8337 (child_add_thread): Minor cleanup.
8338 (child_continue): Resume artificially suspended threads before
8339 calling ContinueDebugEvent.
8340 (suspend_one_thread): New.
8341 (fake_breakpoint_event): New.
8342 (get_child_debug_event): Change return type to int. Check here if
8343 gdb sent an interrupt request. If a soft interrupt was requested,
8344 fake a breakpoint event. Return 0 if there is no event to handle,
8345 and 1 otherwise.
8346 (win32_wait): Don't check here if gdb sent an interrupt request.
8347 Ensure there is a valid event to handle.
8348 (win32_request_interrupt): Add soft interruption method as last
8349 resort.
8350
c436e841
PA
83512007-12-03 Leo Zayas
8352 Pedro Alves <pedro_alves@portugalmail.pt>
8353
8354 * win32-low.h (win32_thread_info): Add descriptions to the
8355 structure members. Replace `suspend_count' counter by a
8356 `suspended' flag.
8357 * win32-low.c (thread_rec): Update condition of when to get the
8358 context from the inferior. Rely on ContextFlags being set if it
8359 has already been retrieved. Only suspend the inferior thread if
8360 we haven't already. Warn if that fails.
8361 (continue_one_thread): s/suspend_count/suspended/. Only call
8362 ResumeThread once. Warn if that fails.
8363
e7b5fa67
PA
83642007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
8365
8366 * win32-low.c (win32_wait): Don't read from the inferior when it
8367 has already exited.
8368
a385171d
PA
83692007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
8370
8371 * Makefile.in (win32_low_h): New variable.
8372 (win32-low.o): Add dependency on $(win32_low_h).
8373 (win32-arm-low.o, win32-i386-low.o): New rules.
8374
f80c84b3
DJ
83752007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
8376
8377 * hostio.c: Correct copyright year.
8378
a6b151f1
DJ
83792007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
8380
8381 * Makefile.in (OBS): Add hostio.o.
8382 (hostio.o): New rule.
8383 * server.h (handle_vFile): Declare.
8384 * hostio.c: New file.
8385 * server.c (handle_v_requests): Take packet_len and new_packet_len
8386 for binary packets. Call handle_vFile.
8387 (main): Update call to handle_v_requests.
8388
f9387fc3
DJ
83892007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
8390
8391 * linux-low.c: Include <sched.h>.
8392
51c2684e
DJ
83932007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
8394
8395 * linux-low.c (linux_tracefork_grandchild): New.
8396 (linux_tracefork_child): Use clone.
8397 (linux_test_for_tracefork): Use clone; allocate and free a stack.
8398
75f83163
JB
83992007-10-31 Joel Brobecker <brobecker@adacore.com>
8400
8401 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
8402
da5898ce
DJ
84032007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
8404
8405 * linux-low.c (handle_extended_wait): Handle unexpected signals.
8406
24a09b5f
DJ
84072007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
8408
8409 * inferiors.c (change_inferior_id): Delete.
8410 (add_pid_to_list, pull_pid_from_list): New.
8411 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
8412 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
8413 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
8414 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
8415 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
8416 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
8417 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
8418 (using_threads): Always set to 1.
8419 (handle_extended_wait): New.
8420 (add_process): Do not set TID.
8421 (linux_create_inferior): Set must_set_ptrace_flags.
8422 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
8423 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
8424 (linux_thread_alive): Rename TID argument to LWPID.
8425 (linux_wait_for_process): Handle unknown processes. Do not use TID.
8426 (linux_wait_for_event): Do not use TID or check using_threads. Update
8427 call to dead_thread_notify. Call handle_extended_wait.
8428 (linux_create_inferior): Use PTRACE_SETOPTIONS.
8429 (send_sigstop): Delete sigstop_sent.
8430 (wait_for_sigstop): Avoid TID.
8431 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
8432 (linux_test_for_tracefork): New.
8433 (linux_lookup_signals): Use thread_db_active and
8434 linux_supports_tracefork_flag.
8435 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
8436 * linux-low.h (get_process_thread): Avoid TID.
8437 (struct process_ifo): Move thread_known and tid to the end. Remove
8438 sigstop_sent.
8439 (linux_attach_lwp, thread_db_init): Update prototypes.
8440 * server.h (change_inferior_id): Delete prototype.
8441 (add_pid_to_list, pull_pid_from_list): New prototypes.
8442 * thread-db.c (thread_db_use_events): New.
8443 (find_first_thread): Rename to...
8444 (find_one_thread): ...this. Update callers and messages. Do not
8445 call fatal. Check thread_db_use_events. Do not call
8446 change_inferior_id or new_thread_notify.
8447 (maybe_attach_thread): Update. Do not call new_thread_notify.
8448 (thread_db_init): Set thread_db_use_events. Check use_events.
8449 * utils.c (fatal, warning): Correct message prefix.
8450
30ed0a8f
DJ
84512007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
8452
8453 * Makefile.in (clean): Remove new files.
8454 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
8455 (powerpc-64.o, powerpc-64.c): New rules.
8456 * configure.srv: Use alternate register sets for powerpc64-*-linux*
8457 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
8458 with SPE.
8459 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
8460 SPE targets.
8461 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
8462 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
8463 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
8464 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
8465 (target_regsets): Add AltiVec and SPE register sets.
8466 * configure.ac: Check for AltiVec and SPE.
8467 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
8468 (ppc_fill_vrregset, ppc_store_vrregset): New.
8469 (target_regsets): Add AltiVec register set.
8470 * configure: Regenerated.
8471
fd462a61
DJ
84722007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
8473
8474 * linux-low.c (O_LARGEFILE): Define.
8475 (linux_read_memory): Use /proc/PID/mem.
8476 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
8477 * configure, config.in: Regenerated.
8478
69f223ed
DJ
84792007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
8480
8481 * linux-low.c (linux_wait_for_event): Do not pass signals while
8482 single-stepping.
8483
aec18585
PA
84842007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
8485
8486 * win32-low.c (create_process): New.
8487 (win32_create_inferior): Use create_process instead of
8488 CreateProcess. If create_process failed retry appending an ".exe"
8489 suffix. Store the GetLastError result immediatelly after
8490 create_process calls and use it on the call to error.
8491
34d86ddd
PA
84922007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
8493
8494 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
8495
5a0e3bd0
JB
84962007-08-23 Joel Brobecker <brobecker@adacore.com>
8497
8498 * configure.ac: Switch license to GPLv3.
8499
f88c79e6
MS
85002007-08-01 Michael Snyder <msnyder@access-company.com>
8501
8502 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
8503
6b3d9b83
PA
85042007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
8505
8506 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
8507 typedef.
8508 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
8509 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
8510 CloseToolhelp32Snapshot.
8511 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
8512 CloseToolhelp32Snapshot.
8513
c588c53c
MS
85142007-07-27 Michael Snyder <michael.snyder@access-company.com>
8515
8516 * server.c (main): Check for inferior exit before main loop.
8517
aa0403d9
PA
85182007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
8519
8520 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
8521 instead of on tmp_desc.
8522
255e7678
DJ
85232007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
8524 Daniel Jacobowitz <dan@codesourcery.com>
8525
8526 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
8527 (add_thread): Minor cleanups.
8528 (clear_inferiors): Move lower in the file. Clear the DLL
8529 list.
8530 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
8531 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
8532 (xml_escape_text): New.
8533 * server.c (handle_query): Handle qXfer:libraries:read. Report it
8534 for qSupported.
8535 (handle_v_cont): Report errors.
8536 (gdbserver_version): Update.
8537 (main): Correct size of own_buf. Do not report initial DLL events.
8538 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
8539 (unloaded_dll, xml_escape_text): New.
8540 * win32-low.c (enum target_waitkind): Update comments.
8541 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
8542 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
8543 (win32_EnumProcessModules, win32_GetModuleInformation)
8544 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
8545 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
8546 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
8547 (win32_Module32First, win32_Module32Next, load_toolhelp)
8548 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
8549 (get_child_debug_event): Handle DLL events.
8550 (win32_wait): Likewise.
8551
0d37add9
DJ
85522007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
8553
8554 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
8555 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
8556
45e2715e
PA
85572007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
8558
8559 * win32-low.c (handle_output_debug_string): Ignore event if not
8560 waiting.
8561
c5674cf1
PA
85622007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
8563
8564 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
8565
2bbe3cc1
DJ
85662007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
8567
8568 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
8569
ae13219e
DJ
85702007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
8571
8572 * inferiors.c (change_inferior_id): Add comment.
8573 * linux-low.c (check_removed_breakpoint): Add an early
8574 prototype. Improve debug output.
8575 (linux_attach): Doc update.
8576 (linux_detach_one_process, linux_detach): Clean up before releasing
8577 each process.
8578 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
8579 * linux-low.h (struct process_info): Doc improvement.
8580 * mem-break.c (delete_all_breakpoints): New.
8581 * mem-break.h (delete_all_breakpoints): New prototype.
8582 * thread-db.c (find_first_thread): New.
8583 (thread_db_create_event): Call it instead of
8584 thread_db_find_new_threads. Clean up unused variables.
8585 (maybe_attach_thread): Remove first thread handling.
8586 (thread_db_find_new_threads): Use find_first_thread.
8587 (thread_db_get_tls_address): Likewise.
8588
4105de34
DJ
85892007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
8590
8591 * thread-db.c (thread_db_find_new_threads): Add prototype.
8592 (thread_db_create_event): Check for the main thread before adding
8593 a new thread.
8594 (maybe_attach_thread): Only enable event reporting if TID == 0.
8595 (thread_db_get_tls_address): Check for new threads.
8596
2b876972
DJ
85972007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
8598
8599 * linux-low.c (linux_create_inferior): Try execv before execvp.
8600 * spu-low.c (spu_create_inferior): Likewise.
8601
7a245884
DJ
86022007-06-13 Mike Frysinger <vapier@gentoo.org>
8603
8604 * linux-low.c (linux_create_inferior): Change execv to execvp.
8605 * spu-low.c (spu_create_inferior): Likewies.
8606
117ce543
DJ
86072007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
8608
8609 * Makefile.in (clean): Clean new files instead of deleted ones.
8610 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
8611 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
8612 rules.
8613 * configure.srv: Specify XML files and new regformats for MIPS and
8614 MIPS64 GNU/Linux.
8615 * linux-mips-low.c (mips_num_regs): Set to only used registers.
8616 (mips_regmap): Do not fetch $0. Remove unused registers. Add
8617 an entry for the restart register.
8618 (mips_cannot_fetch_register, mips_cannot_store_register)
8619 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
8620 register names to match the XML descriptions.
8621 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
8622 restart register instead of $0.
8623
0e7f50da
UW
86242007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
8625 Markus Deuling <deuling@de.ibm.com>
8626
8627 * remote-utils.c (decode_xfer_write): New function.
8628 * server.h (decode_xfer_write): Add prototype.
8629 * server.c (handle_query): Add PACKET_LEN argument. Support
8630 qXfer:spu:read and qXfer:spu:write packets.
8631 (main): Pass packet_len to handle_query.
8632 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
8633 * target.h (target_ops): Add qxfer_spu.
8634
374c1d38
UW
86352007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
8636
8637 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
8638 accessing non-seekable spufs files.
8639
bb63802a
UW
86402007-05-16 Markus Deuling <deuling@de.ibm.com>
8641
889bf7c5 8642 * server.c (handle_query): Add reply for qC packet.
bb63802a 8643
7390519e
PA
86442007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
8645 Leo Zayas <lerele@champenstudios@com>
8646
8647 * server.h (check_remote_input_interrupt_request): New function.
8648 * remote_utils.c (INVALID_DESCRIPTOR): New define.
8649 (remote_desc): Initialize with INVALID_DESCRIPTOR.
8650 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
8651 (check_remote_input_interrupt_request): New function.
8652 * server.h (check_remote_input_interrupt_request): Declare.
3ecf0694 8653 * win32-low.c (winapi_DebugBreakProcess,
7390519e
PA
8654 winapi_GenerateConsoleCtrlEvent): New typedefs.
8655 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
8656 to 250 ms.
8657 (win32_wait): Check for remote interrupt request
8658 with check_remote_input_interrupt_request.
8659 (win32_request_interrupt): New function.
8660 (win32_target_op): Set request_interrupt to win32_request_interrupt.
8661
34b34921
PA
86622007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
8663
8664 * win32-low.c (debug_registers_changed,
8665 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
8666 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
8667 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
8668 (thread_rec): Get context using the low target.
8669 (child_add_thread): Call thread_added on the low target,
8670 which does the same thing.
8671 (regptr): Delete.
8672 (do_initial_child_stuff): Remove debug registers references.
8673 Set context using the low target. Resume threads after
8674 setting the contexts.
8675 (child_continue): Remove dead variable. Remove debug
8676 registers references.
8677 (child_fetch_inferior_registers): Go through the low target.
8678 (do_child_store_inferior_registers): Remove.
8679 (child_store_inferior_registers): Go through the low target.
8680 (win32_resume): Remove debug registers references.
8681 Set context using the low target.
8682 (handle_exception): Change return type to void. Don't record
8683 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
8684 first chance exception.
889bf7c5 8685 (get_child_debug_event): Change return type to void. Remove
34b34921
PA
8686 goto loop. Always return after waiting for debug event.
8687 (win32_wait): Convert to switch statement. Handle spurious
8688 events.
8689
8690 * win32-i386-low.c (debug_registers_changed,
8691 debug_registers_used): New.
8692 (initial_stuff): Rename to ...
8693 (i386_initial_stuff): ... this. Clear debug registers
8694 state variables.
8695 (store_debug_registers): Delete.
8696 (i386_get_thread_context): New.
8697 (load_debug_registers): Delete.
8698 (i386_set_thread_context): New.
8699 (i386_thread_added): New.
8700 (single_step): Rename to ...
8701 (i386_single_step): ... this.
8702 (do_fetch_inferior_registers): Rename to ...
8703 (i386_fetch_inferior_register): ... this.
8704 (i386_store_inferior_register): New.
8705 (the_low_target): Adapt to new interface.
8706
8707 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
8708 (arm_get_thread_context): New.
8709 (arm_set_thread_context): New.
8710 (regptr): New.
8711 (do_fetch_inferior_registers): Rename to ...
8712 (arm_fetch_inferior_register): ... this.
8713 (arm_store_inferior_register): New.
8714 (arm_wince_breakpoint): Reimplement as unsigned long.
8715 (arm_wince_breakpoint_len): Define.
8716 (the_low_target): Adapt to new interface.
8717
8718 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
8719 load_debug_registers. Add get_thread_context, set_thread_context,
8720 thread_added and store_inferior_register. Rename
8721 fetch_inferior_registers to fetch_inferior_register.
8722 (regptr): Remove declaration.
8723
dd6953e1
PA
87242007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
8725
8726 * linux-low.c (linux_detach): Change return type to int. Return 0.
8727 * spu-low.c (spu_detach): Likewise.
8728
444d6139
PA
87292007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
8730
8731 * target.h (target_ops): Change return type of detach to int.
8732 Add join.
8733 (join_inferior): New.
8734 * server.c (main): Don't skip detach support on mingw32.
8735 If the inferior doesn't support detaching return error.
8736 Call join_inferior instead of using waitpid.
8737 * linux-low.c (linux_join): New.
8738 (linux_target_op): Add linux_join.
8739 * spu-low.c (spu_join): New.
8740 (spu_target_ops): Add spu_join.
8741 * win32-low.c (win32_detach): Adapt to new interface.
8742 Reopen current_process_handle before detaching. Issue a child
8743 resume before detaching.
8744 (win32_join): New.
8745 (win32_target_op): Add win32_join.
8746
1d5315fe
PA
87472007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
8748
8749 * win32-low.c (win32-attach): Fix return value.
8750 * target.h (target_ops): Describe ATTACH return values.
8751
bf914831
PA
87522007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
8753
8754 * win32-low.c (GETPROCADDRESS): Define.
8755 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
8756 (winapi_DebugSetProcessKillOnExit): Likewise.
8757 (win32_create_inferior): Force usage of ansi CreateProcessA.
8758 (win32_attach): Use GETPROCADDRESS.
8759 (win32_detach): Likewise.
8760
f72f3e60
PA
87612007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
8762
8763 * win32-low.c (win32_wait): Don't use WSTOPSIG.
8764
ed50f18f
PA
87652007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
8766
8767 * win32-low.c: Commit leftover changes from 2007-03-29.
8768
0c2ead7e
DJ
87692007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
8770
8771 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
8772 fields short instead of int. Add explicit padding.
8773 (i387_cache_to_fsave): Remove unnecessary casts.
8774 (i387_fsave_to_cache): Doc fix.
8775 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
8776
73725ff3
DJ
87772007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
8778
8779 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
8780 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
8781
d99f33d8
PA
87822007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
8783
8784 * configure.srv (arm*-*-mingw32ce*): Move near the other
8785 arm targets.
8786
68070c10
PA
87872007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
8788
2482afc6 8789 * configure.ac: Add errno checking.
68070c10
PA
8790 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
8791 sys/file.h and malloc.h.
8792 (AC_CHECK_DECLS): Add perror.
8793 (srv_mingwce): Handle.
2482afc6 8794 * configure.srv (i[34567]86-*-cygwin*): Add
68070c10
PA
8795 win32-i386-low.o to srv_tgtobj.
8796 (i[34567]86-*-mingw*): Likewise.
8797 (arm*-*-mingw32ce*): Add case.
8798 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
8799 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
8800 [__MINGW32CE__] (strerror): New function.
8801 [__MINGW32CE__] (errno): Define to GetLastError.
8802 [__MINGW32CE__] (COUNTOF): New macro.
8803 (remote_open): Remove extra close call.
8804 * mem-break.c (delete_breakpoint_at): New function.
8805 * mem-break.h (delete_breakpoint_at): Declare.
8806 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
8807 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
8808 [USE_WIN32API] (read, write): Add char* casts.
8809 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
8810 * server.h: Include wincecompat.h on Windows CE.
8811 [HAVE_ERRNO_H]: Check.
8812 (perror): Declare if not declared.
8813 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
8814 (perror_with_name): Remove errno declaration.
8815 * wincecompat.h: New.
8816 * wincecompat.c: New.
8817 * win32-low.h: New.
8818 * win32-arm-low.c: New.
8819 * win32-i386-low.c: New.
8820 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
8821 (OUTMSG2): Make it safe.
8822 (_T): New macro.
8823 (COUNTOF): New macro.
8824 (NUM_REGS): Get it from the low target.
8825 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
8826 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
8827 (thread_rec): Let low target handle debug registers.
8828 (child_add_thread): Likewise.
8829 (child_init_thread_list): Likewise.
8830 (continue_one_thread): Likewise.
8831 (regptr): New.
8832 (do_child_fetch_inferior_registers): Move to ...
8833 * win32-i386-low.c: ... here, and rename to ...
8834 (do_fetch_inferior_registers): ... this.
889bf7c5 8835 * win32-low.c (child_fetch_inferior_registers):
68070c10
PA
8836 Go through the low target.
8837 (do_child_store_inferior_registers): Use regptr.
8838 (strwinerror): New function.
8839 (win32_create_inferior): Handle Windows CE.
8840 Use strwinerror instead of strerror on Windows error
8841 codes. Add program to the error output.
8842 Don't close the main thread handle on Windows CE.
8843 (win32_attach): Use coredll.dll on Windows CE.
8844 (win32_kill): Close current process and current
8845 thread handles.
8846 (win32_detach): Use coredll.dll on Windows CE.
8847 (win32_resume): Let low target handle debug registers, and
8848 step request.
8849 (handle_exception): Add/Remove initial breakpoint. Avoid
8850 non-existant WSTOPSIG on Windows CE.
8851 (win32_read_inferior_memory): Cast to remove warning.
8852 (win32_arch_string): Go through the low target.
8853 (initialize_low): Call set_breakpoint_data with the low
8854 target's breakpoint.
8855 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
8856 FOP_REGNUM, mappings): Move to ...
8857 * win32-i386-low.c: ... here.
8858 * win32-low.c (win32_thread_info): Move to ...
8859 * win32-low.h: ... here.
8860 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
8861 win32-arm-low.c and wincecompat.c.
8862 (all:): Add $EXEEXT.
8863 (install-only:): Likewise.
8864 (gdbserver:): Likewise.
8865 (gdbreplay:): Likewise.
8866 * config.in: Regenerate.
8867 * configure: Regenerate.
8868
41093d81
PA
88692007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
8870
8871 * win32-low.c: Rename typedef thread_info to
8872 win32_thread_info throughout.
8873
544afa54
PA
88742007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
8875
8876 * win32-i386-low.c: Rename to ...
8877 * win32-low.c: ... this.
8878 * configure.srv: Replace win32-i386-low.o with win32-low.o.
8879 * Makefile.in: Likewise.
8880
bce7165d
PA
88812007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
8882
8883 * remote-utils.c (monitor_output): Constify msg parameter.
8884 * server.h (monitor_output): Likewise.
8885 * win32-i386-low.c (handle_output_debug_string): New.
8886 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
8887 handle_output_debug_string.
8888 (get_child_debug_event): Likewise.
8889
506c7aa0
DJ
88902007-03-27 Mat Hostetter <mat@lcs.mit.edu>
8891
8892 * server.c (main): Correct strtoul check.
8893
42c81e2a
DJ
88942007-03-27 Jon Ringle <jon@ringle.org>
8895
8896 * linux-low.c: Check __ARCH_HAS_MMU__ also.
8897
9453113a
DJ
88982007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
8899
8900 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
8901
64a69107
DJ
89022007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
8903
8904 * terminal.h: Check HAVE_SGTTY_H.
8905
89062007-02-27 Mat Hostetter <mat@lcs.mit.edu>
6f8486da
DJ
8907
8908 * remote-utils.c (remote_open): Print out the assigned port number.
8909
c74d0ad8
DJ
89102007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
8911
8912 * remote-utils.c (monitor_output): New function.
8913 * server.c (debug_threads): Define here.
8914 (monitor_show_help): New function.
8915 (handle_query): Handle qRcmd.
8916 (main): Do not handle 'd' packet.
8917 * server.h (debug_threads, remote_debug, monitor_output): Declare.
8918 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
8919 of debug_threads.
8920
de7c3b4a
PA
89212007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
8922
8923 * Makefile.in (EXEEXT): New.
8924 (clean): Use $(EXEEXT).
8925
ef57601b
PA
89262007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
8927
8928 * target.h (target_ops): Rename send_signal to request_interrupt,
8929 and remove enum target_signal parameter.
8930 * linux-low.c (linux_request_interrupt): Rename from
8931 linux_send_signal, and always send SIGINT.
8932 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
8933 and always send SIGINT.
8934 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
8935 of send_signal.
8936 (input_interrupt): Likewise.
8937
820f2bda
PA
89382007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
8939
8940 * server.c (get_features_xml): Check if target implemented
8941 arch_string.
8942 * win32-i386-low.c (win32_arch_string): New.
8943 (win32_target_ops): Add win32_arch_string as arch_string member.
8944
ab39bf24
UW
89452007-02-22 Markus Deuling <deuling@de.ibm.com>
8946
8947 * spu-low.c (spu_arch_string): New.
8948 (spu_target_ops): Add spu_arch_string.
8949
61ff6e04
DJ
89502007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
8951
8952 * remote-utils.c: Remove HAVE_TERMINAL_H check.
8953 * configure.ac: Do not check for terminal.h.
8954 * configure, config.in: Regenerated.
8955
fb1e4ffc
DJ
89562007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
8957
8958 * Makefile.in (OBS): Add $(XML_BUILTIN).
8959 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
8960 (clean): Update.
8961 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
8962 (arm-with-iwmmxt.c): New.
8963 * config.in, configure: Regenerate.
8964 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
8965 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
8966 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
8967 (arm*-*-linux*): Add iWMMXt and regset support.
8968 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
8969 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
8970 (arm_store_wmmxregset, target_regsets): New.
8971 * server.c (get_features_xml): Take annex argument. Check builtin
8972 XML documents.
8973 (handle_query): Handle multiple annexes.
8974
0f48aa01
DJ
89752007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
8976
8977 * remote-utils.c [USE_WIN32API] (read, write): Define.
8978 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
8979 write.
8980
23181151
DJ
89812007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
8982
8983 * linux-i386-low.c (the_low_target): Set arch_string.
8984 * linux-x86-64-low.c (the_low_target): Likewise.
8985 * linux-low.c (linux_arch_string): New.
8986 (linux_target_ops): Add it.
8987 * linux-low.h (struct linux_target_ops): Add arch_string.
8988 * server.c (write_qxfer_response): Use const void * for DATA.
8989 (get_features_xml): New.
8990 (handle_query): Handle qXfer:features:read. Report it for qSupported.
8991 * target.h (struct target_ops): Add arch_string method.
8992
9d606399
DJ
89932007-01-03 Denis Pilat <denis.pilat@st.com>
8994 Daniel Jacobowitz <dan@codesourcery.com>
8995
8996 * linux-low.c (linux_kill): Handle being called with no threads.
8997 * win32-i386-low.c (win32_kill): Likewise.
8998 (get_child_debug_event): Clear current_process_handle.
8999
90002006-12-30 Denis PILAT <denis.pilat@st.com>
8264bb58
DJ
9001 Daniel Jacobowitz <dan@codesourcery.com>
9002
9003 * remote-utils.c (remote_open): Check the type of specified
9004 serial port devices before opening them.
9005 * server.c (main): Kill the inferior if an error occurs during
9006 the first remote_open.
9007
a5e13d24
DJ
90082006-12-05 Markus Deuling <deuling@de.ibm.com>
9009
9010 * README: Update supported targets.
9011
186947f7
DJ
90122006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
9013
9014 * Makefile.in (clean): Remove reg-mips64.c.
9015 (reg-mips64.c, reg-mips64.o): New rules.
9016 * configure.srv: Handle mips64. Include regset support for mips.
9017 * linux-mips-low.c (union mips_register): New.
9018 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
9019 (mips_breakpoint, mips_breakpoint_at): Use int.
9020 (mips_collect_register, mips_supply_register)
9021 (mips_collect_register_32bit, mips_supply_register_32bit)
9022 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
9023 (mips_store_fpregset, target_regsets): New.
9024 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
9025
a13e2c95
UW
90262006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
9027
9028 * configure.srv: Add target "spu*-*-*".
9029 * Makefile.in (clean): Remove reg-spu.c.
9030 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
9031 * spu-low.c: New file.
9032
cb7283db
DJ
90332006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
9034
9035 * configure.ac: Correct td_thr_tls_get_addr test.
9036 * configure: Regenerated.
9037
89be2091
DJ
90382006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
9039
9040 * linux-low.c (linux_wait_for_event): Reformat. Use the
9041 pass_signals array.
9042 * remote-utils.c (decode_address_to_semicolon): New.
9043 * server.c (pass_signals, handle_general_set): New.
9044 (handle_query): Mention QPassSignals for qSupported.
9045 (main): Call handle_general_set.
9046 * server.h (pass_signals, decode_address_to_semicolon): New.
9047
000ef4f0
DJ
90482006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
9049
9050 * server.c (handle_query): Correct error handling for read_auxv.
9051
b7149293
UW
90522005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
9053
9054 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
9055 and srv_linux_thread_db to yes.
9056 * linux-s390-low.c (s390_fill_gregset): New function.
9057 (target_regsets): Define data structure.
9058
dae5f5cf
DJ
90592006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
9060
9061 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
9062 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
9063 * config.in, configure: Regenerated.
9064 * inferiors.c (gdb_id_to_thread): New function.
9065 (gdb_id_to_thread_id): Use it.
9066 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
9067 * linux-low.h (struct process_info): Add th member.
9068 (thread_db_get_tls_address): New prototype.
9069 * remote-utils.c (decode_address): Make non-static.
9070 * server.c (handle_query): Handle qGetTLSAddr.
9071 * server.h (gdb_id_to_thread, decode_address): New prototypes.
9072 * target.h (struct target_ops): Add get_tls_address.
9073 * thread-db.c (maybe_attach_thread): Save the thread handle.
9074 (thread_db_get_tls_address): New.
9075
32ca6d61
DJ
90762006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
9077
9078 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
9079 (linux_resume_one_process): Take a siginfo_t *. Update all
9080 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
9081 (struct pending_signals): Add a siginfo_t.
9082 (linux_wait_for_process): Always set last_status.
9083 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
9084 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
9085 * linux-low.h (struct process_info): Add last_status.
9086
5ffff7c1
DJ
90872006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
9088
9089 * remote-utils.c (try_rle): New function.
9090 (putpkt_binary): Use it.
9091
8695c747
DJ
90922006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
9093
9094 * Makefile.in (clean): Clean reg-x86-64-linux.c.
9095 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
9096 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
9097 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
9098 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
9099 point registers.
9100
290fadea
RS
91012006-08-08 Richard Sandiford <richard@codesourcery.com>
9102
9103 * server.c (terminal_fd): New variable.
9104 (old_foreground_pgrp): Likewise.
9105 (restore_old_foreground_pgrp): New function.
9106 (start_inferior): Record the terminal file descriptor in terminal_fd
9107 and its original foreground group in old_foreground_pgrp. Register
9108 restore_old_foreground_pgrp with atexit().
9109
9f2e1e63
DJ
91102006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
9111
9112 * server.c (handle_query): Correct qPart to qXfer.
9113
b80864fb
DJ
91142006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
9115
9116 * configure.ac: Check for more headers which are missing on
9117 Windows. Automatically supply -lwsock32 and USE_WIN32API.
9118 * configure.srv: Add Cygwin and mingw32.
9119 * remote-utils.c: Don't include headers unconditionally which
9120 are missing on mingw32. Include <winsock.h> for mingw32.
9121 (remote_open): Adjust for mingw32 support. Flush
9122 standard error after writing to it.
9123 (remote_close, putpkt_binary, input_interrupt, block_async_io)
9124 (unblock_async_io, enable_async_io, disable_async_io)
9125 (readchar, getpkt): Update for Winsock support.
9126 (prepare_resume_reply): Expect a protocol signal number.
9127 * server.c: Disable <sys/wait.h> on mingw32.
9128 (start_inferior): Adjust for mingw32 support. Flush
9129 standard error after writing to it.
9130 (attach_inferior): Likewise. Use protocol signal
9131 numbers.
9132 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
9133 and names.
9134 * win32-i386-low.c: New file.
9135 * Makefile.in (XM_CLIBS): Set.
9136 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
9137 (win32-i386-low.o): New dependency rule.
9138 * linux-low.c (linux_wait): Use target signal numbers.
9139 * target.h (struct target_ops): Doc fix.
9140 * server.h (target_signal_to_name): New prototype.
9141 * gdbreplay.c: Don't include headers unconditionally which
9142 are missing on mingw32. Include <winsock.h> for mingw32.
9143 (remote_close, remote_open): Adjust for Winsock support.
9144 * configure, config.in: Regenerated.
9145
0876f84a
DJ
91462006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
9147
9148 * server.c (decode_xfer_read, write_qxfer_response): New.
9149 (handle_query): Take a packet length argument. Handle
9150 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
9151 the qSupported response.
9152 (main): Update call to handle_query.
9153
01f9e8fa
DJ
91542006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
9155
9156 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
9157 (putpkt_binary): Renamed from putpkt and adjusted for binary
9158 data.
9159 (putpkt): New wrapper for putpkt_binary.
9160 (readchar): Don't mask off the high bit.
9161 (decode_X_packet): New function.
9162 * server.c (main): Call putpkt_binary if a handler sets the packet
9163 length. Save the length of the incoming packet. Handle 'X'.
9164 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
9165
be2a5f71
DJ
91662006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
9167
9168 * server.c (handle_query): Handle qSupported.
9169
ea025f5f
DJ
91702006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
9171
9172 * remote-utils.c (all_symbols_looked_up): New variable.
9173 (look_up_one_symbol): Check it.
9174 * server.h (look_up_one_symbol): New declaration.
9175 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
9176
9308fc88
DJ
91772006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
9178
9179 * Makefile.in (linux-arm-low.o): Update dependencies.
66f338c7 9180 * linux-arm-low.c: Include "gdb_proc_service.h".
9308fc88
DJ
9181 (PTRACE_GET_THREAD_AREA): Define.
9182 (ps_get_thread_area): New function.
9183
52fb6437
NS
91842006-05-09 Nathan Sidwell <nathan@codesourcery.com>
9185
9186 * configure.srv (m68k*-*-uclinux*): New target.
9187 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
9188 (linux_resume_one_process): Remove extraneous cast.
9189 (linux_read_offsets): New.
9190 (linux_target_op): Add linux_read_offsets on mmuless systems.
9191 * server.c (handle_query): Add qOffsets logic.
9192 * target.h (struct target_ops): Add read_offsets.
9193
21b0f40c
DJ
91942006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
9195
9196 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
9197 (PTRACE_GET_THREAD_AREA): Define.
9198 (ps_get_thread_area): New function.
9199 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
9200 (linux-x86-64-low.o): Update.
9201
0050a760
DJ
92022006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
9203
9204 * configure.ac: Remove checks for prfpregset_t.
9205 * gdb_proc_service.h: New file.
9206 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
9207 new "gdb_proc_service.h".
9208 * proc-service.c: Likewise.
9209 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
9210 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
9211 * Makefile.in (gdb_proc_service_h): Updated.
9212 * configure, config.in: Regenerated.
9213
b92a518e
DJ
92142006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
9215
9216 * remote-utils.c (prepare_resume_reply): Move declaration
9217 of gdb_id_from_wait to the top of the block.
9218
545587ee
DJ
92192006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
9220
9221 * linux-low.c (regsets_store_inferior_registers): Read the regset
9222 from the target before filling it.
9223
9db87ebd
DJ
92242006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
9225
9226 * server.c (attach_inferior): Return SIGTRAP for a successful
9227 attach.
9228
dd24457d
DJ
92292006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
9230
9231 * Makefile.in (OBS): Add version.o.
9232 (STAGESTUFF): Delete.
9233 (version.o): Add dependencies.
9234 (version.c): Replace rule.
9235 (clean): Remove version.c.
9236 * server.c (gdbserver_version): New.
9237 (gdbserver_usage): Use printf.
9238 (main): Handle --version and --help.
9239 * server.h (version, host_name): Add declarations.
9240
6f0f660e
EZ
92412005-12-23 Eli Zaretskii <eliz@gnu.org>
9242
889bf7c5
PA
9243 * linux-arm-low.c:
9244 * linux-arm-low.c:
9245 * inferiors.c:
9246 * i387-fp.h:
9247 * i387-fp.c:
9248 * gdbreplay.c:
9249 * regcache.c:
9250 * proc-service.c:
9251 * mem-break.h:
9252 * mem-break.c:
9253 * linux-x86-64-low.c:
9254 * linux-sh-low.c:
9255 * linux-s390-low.c:
9256 * linux-ppc64-low.c:
9257 * linux-ppc-low.c:
9258 * linux-mips-low.c:
9259 * linux-m68k-low.c:
9260 * linux-m32r-low.c:
9261 * linux-low.h:
9262 * linux-low.c:
9263 * linux-ia64-low.c:
9264 * linux-i386-low.c:
9265 * linux-crisv32-low.c:
9266 * thread-db.c:
9267 * terminal.h:
9268 * target.h:
9269 * target.c:
9270 * server.h:
9271 * server.c:
9272 * remote-utils.c:
9273 * regcache.h:
9274 * utils.c:
9275 * Makefile.in:
9276 * configure.ac:
6f0f660e
EZ
9277 * gdbserver.1: Add (C) after Copyright. Update the FSF
9278 address.
9279
9d1fb177
DJ
92802005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
9281
9282 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
9283 (arm_breakpoint_at): Recognize both breakpoints.
9284 (the_low_target): Use the correct breakpoint instruction.
9285
011a70c2
DJ
92862005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
9287
9288 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
9289 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
9290 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
9291 (the_low_target): Update.
9292
7fb85e41
AS
92932005-10-25 Andreas Schwab <schwab@suse.de>
9294
9295 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
9296
9297 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
9298 (ia64_num_regs): Reduce to 462.
9299
3db0444b
DJ
93002005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
9301
9302 * acinclude.m4: Correct quoting.
9303 * aclocal.m4: Regenerated.
9304
9305 Suggested by SZOKOVACS Robert <szo@ies.hu>:
9306 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
9307 (thread_db_init): Call thread_db_err_str.
9308 * configure.ac: Check for TD_VERSION.
9309 * config.in, configure: Regenerated.
9310
bee0189a
DJ
93112005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9312
9313 * server.h (error, fatal, warning): Add ATTR_FORMAT.
9314
e9d25b98
DJ
93152005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
9316
9317 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
9318 is not available. Define HAVE_PTRACE_GETREGS if it is.
9319 * config.in, configure: Regenerated.
9320 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
9321 * linux-i386-low.c, linux-m68k-low.c: Update to use
9322 HAVE_PTRACE_GETREGS.
9323 * linux-low.c (regsets_fetch_inferior_registers)
9324 (regsets_store_inferior_registers): Only return 0 if we processed
9325 GENERAL_REGS.
9326 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
9327 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
9328
a06660f7
DJ
93292005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
9330
9331 * inferiors.c (struct thread_info): Add gdb_id.
9332 (add_thread): Add gdb_id argument.
9333 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
9334 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
9335 calls to add_thread.
9336 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
9337 * server.c (handle_query): Use thread_to_gdb_id.
9338 (handle_v_cont, main): Use gdb_id_to_thread_id.
9339 * server.h (add_thread): Update prototype.
9340 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
9341 prototypes.
9342
5a1f5858
DJ
93432005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
9344
9345 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
9346 left-padded registers.
9347 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
9348 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
9349
e122f1f5
SE
93502005-07-01 Steve Ellcey <sje@cup.hp.com>
9351
9352 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
9353 * configure: Regenerate.
9354 * config.in: Regenerate.
9355 * server.h (NEED_DECLARATION_STRERROR):
9356 Replace with !HAVE_DECL_STRERROR.
9357
d592fa2f
DJ
93582005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
9359
9360 * linux-low.c (linux_wait, linux_send_signal): Don't test
9361 an unsigned long variable for > 0 if it could be MAX_ULONG.
9362 * server.c (myresume): Likewise.
9363 * target.c (set_desired_inferior): Likewise.
9364
ccbd4912
MK
93652005-06-13 Mark Kettenis <kettenis@gnu.org>
9366
9367 * configure.ac: Simplify and improve check for socklen_t.
9368 * configure, config.in: Regenerate.
9369
f450004a
DJ
93702005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
9371
9372 * acconfig.h: Remove.
9373 * configure.ac: Add a test for socklen_t. Use three-argument
9374 AC_DEFINE throughout.
9375 * config.in: Regenerated using autoheader 2.59.
9376 * configure: Regenerated.
9377
9378 * gdbreplay.c (socklen_t): Provide a default.
9379 (remote_open): Use socklen_t.
9380 * remote-utils.c (socklen_t): Provide a default.
9381 (remote_open): Use socklen_t.
9382 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
9383 unsigned char.
9384
9385 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
9386 char for buffers.
9387 * linux-low.c (linux_read_memory, linux_write_memory)
9388 (linux_read_auxv): Likewise.
9389 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
9390 (check_mem_write): Likewise.
9391 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
9392 Likewise.
9393 * regcache.c (struct inferior_rgcache_data, registers_to_string)
9394 (registers_from_string, register_data): Likewise.
9395 * server.c (handle_query, main): Likewise.
9396 * server.h (convert_ascii_to_int, convert_int_to_ascii)
9397 (decode_M_packet): Likewise.
9398 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
9399 * target.h (struct target_ops): Update read_memory, write_memory,
9400 and read_auxv.
9401 (read_inferior_memory, write_inferior_memory): Update.
9402 * linux-low.h (struct linux_target_ops): Change type of breakpoint
9403 to unsigned char *.
9404 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
9405 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
9406 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
9407 linux-s390-low.c, linux-sh-low.c: Update for changes in
9408 read_inferior_memory and the_low_target->breakpoint.
9409
eee84df1
DJ
94102005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
9411
9412 * Makefile.in (SFILES): Add linux-ppc64-low.c.
9413 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
9414 * configure.srv: Add powerpc64-*-linux*.
9415 * linux-ppc64-low.c: New file.
9416
45b134e5
OF
94172005-05-23 Orjan Friberg <orjanf@axis.com>
9418
9419 * linux-cris-low.c: New file with support for CRIS.
9420 * linux-crisv32-low.c: Ditto for CRISv32.
9421 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
9422 (clean): Add reg-cris.c and reg-crisv32.c.
889bf7c5 9423 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
45b134e5
OF
9424 reg-crisv32.o, and reg-crisv32.c to make rules.
9425 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
9426 recognized targets.
9427
48d93c75
UW
94282005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
9429
9430 * linux-low.c (fetch_register): Ensure buffer size is a multiple
9431 of sizeof (PTRACE_XFER_TYPE).
9432 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
9433
e013ee27
OF
94342005-05-12 Orjan Friberg <orjanf@axis.com>
9435
889bf7c5 9436 * target.h (struct target_ops): Add insert_watchpoint,
e013ee27
OF
9437 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
9438 pointers for hardware watchpoint support.
9439 * linux-low.h (struct linux_target_ops): Ditto.
9440 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
9441 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
9442 to linux_target_ops.
9443 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
9444 reply packet.
9445 * server.c (main): Recognize 'Z' and 'z' packets.
9446
b0ded00b
UW
94472005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
9448
9449 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
9450 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
9451 (the_low_target): Add new members.
9452
8643e2ad
DJ
94532005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
9454
9455 * proc-service.c (ps_lgetregs): Search all_processes instead of
9456 all_threads.
9457
fc620387
DJ
94582005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
9459
9460 * server.c (start_inferior): Change return type to int.
9461 (attach_inferior): Change sigptr to int *.
9462 (handle_v_cont, handle_v_requests): Change signal to int *.
9463 (main): Change signal to int.
9464
94652005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
7cfbc4a0
KI
9466
9467 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
9468 * configure.srv: Add m32r*-*-linux*.
9469 * linux-m32r-low.c: New file.
9470
e0e76420
DJ
94712005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
9472
9473 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
9474
a1928bad
DJ
94752005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
9476
9477 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
9478 Take unsigned long arguments for PIDs.
9479 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
9480 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
9481 (wait_for_sigstop, linux_resume_one_process)
9482 (regsets_fetch_inferior_registers, linux_send_signal)
9483 (linux_read_auxv): Likewise. Update the types of variables holding
9484 PIDs. Update format string specifiers.
9485 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
9486 * remote-utils.c (prepare_resume_reply): Likewise.
9487 * server.c (cont_thread, general_thread, step_thread)
9488 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
9489 unsigned long.
9490 (handle_query): Update format specifiers.
9491 (handle_v_cont, main): Use strtoul for thread IDs.
9492 * server.h (struct inferior_list_entry): Use unsigned long for ID.
9493 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
9494 (general_thread, step_thread, thread_from_wait)
9495 (old_thread_from_wait): Update.
9496 * target.h (struct thread_resume): Use unsigned long for THREAD.
9497 (struct target_ops): Use unsigned long for arguments to attach and
9498 thread_alive.
9499
dcdb98d2
DJ
95002005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
9501
9502 * acinclude.m4: Include bfd/bfd.m4 directly.
9503 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
9504 <agriffis@toolchain.org>.
9505 * aclocal.m4, configure: Regenerated.
9506
bec39cab
AC
95072005-01-07 Andrew Cagney <cagney@gnu.org>
9508
9509 * configure.ac: Rename configure.in, require autoconf 2.59.
9510 * configure: Re-generate.
9511
434c4c77
DJ
95122004-12-08 Daniel Jacobowitz <dan@debian.org>
9513
9514 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
9515 LIBS when finished.
9516 * aclocal.m4: Regenerated.
9517 * configure: Regenerated.
9518
db1d3e1b
AS
95192004-11-21 Andreas Schwab <schwab@suse.de>
9520
9521 * linux-m68k-low.c (m68k_num_gregs): Define.
9522 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
9523 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
9524 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
9525 (m68k_breakpoint_at): New. Add to the_low_target.
9526
9527 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
9528 srv_linux_thread_db to yes.
9529
43360365
JB
95302004-10-20 Joel Brobecker <brobecker@gnat.com>
9531
9532 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
9533 (ARCH_SET_FS): Likewise.
9534 (ARCH_GET_FS): Likewise.
9535 (ARCH_GET_GS): Likewise.
9536
fd500816
DJ
95372004-10-16 Daniel Jacobowitz <dan@debian.org>
9538
9539 * linux-i386-low.c (ps_get_thread_area): New.
9540 * linux-x86-64-low.c (ps_get_thread_area): New.
9541 * linux-low.c: Include <sys/syscall.h>.
9542 (linux_kill_one_process): Don't kill the first thread here.
9543 (linux_kill): Kill the first thread here.
9544 (kill_lwp): New function.
9545 (send_sigstop, linux_send_signal): Use it.
9546 * proc-service.c: Clean up #ifdefs.
9547 (fpregset_info): Delete.
9548 (ps_lgetregs): Update and enable implementation.
9549 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
9550 implementations.
9551 * remote-utils.c (struct sym_cache, symbol_cache): New.
9552 (input_interrupt): Print a clearer message.
9553 (async_io_enabled): New variable.
9554 (enable_async_io, disable_async_io): Use it. Update comments.
9555 (look_up_one_symbol): Use the symbol cache.
9556 * thread-db.c (thread_db_look_up_symbols): New function.
9557 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
9558
f6de3c42
DJ
95592004-10-16 Daniel Jacobowitz <dan@debian.org>
9560
9561 * configure.in: Test for -rdynamic.
9562 * configure: Regenerated.
9563 * Makefile (INTERNAL_LDFLAGS): New.
9564 (gdbserver, gdbreplay): Use it.
9565
2c0fc042
AC
95662004-09-02 Andrew Cagney <cagney@gnu.org>
9567
9568 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
9569
075b3282
DJ
95702004-03-23 Daniel Jacobowitz <drow@mvista.com>
9571
9572 * linux-low.c (linux_wait): Clear all_processes list also.
9573
fa6a77dc
DJ
95742004-03-12 Daniel Jacobowitz <drow@mvista.com>
9575
9576 * linux-low.c: Include <errno.h>. Remove extern declaration of
9577 errno.
9578
6d782a97
DJ
95792004-03-12 Daniel Jacobowitz <drow@mvista.com>
9580
9581 * gdbreplay.c, server.h, utils.c: Update copyright years.
9582
3a7fb99b
DJ
95832004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
9584
9585 * server.c (main): Print child status or termination signal from
9586 variable 'signal', not 'sig'.
9587
c3e735a6
DJ
95882004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
9589
9590 * linux-low.c (linux_read_memory): Change return type to
9591 int. Check for and return error from ptrace().
9592 * target.c (read_inferior_memory): Change return type to int. Pass
9593 back return status from the_target->read_memory().
9594 * target.h (struct target_ops): Adapt *read_memory() prototype.
9595 Update comment.
9596 (read_inferior_memory): Adapt prototype.
9597 * server.c (main): Return an error packet if
9598 read_inferior_memory() returns an error.
9599
a59d1c82
DJ
96002004-03-04 Daniel Jacobowitz <drow@mvista.com>
9601
9602 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
9603 Unify with other clean targets.
9604
dc3f8883
DJ
96052004-02-29 Daniel Jacobowitz <drow@mvista.com>
9606
9607 * server.c (handle_v_cont): Call set_desired_inferior.
9608
89a208da
DJ
96092004-02-29 Daniel Jacobowitz <drow@mvista.com>
9610
9611 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
9612
62ea82f5
DJ
96132004-02-29 Daniel Jacobowitz <drow@mvista.com>
9614
9615 * linux-low.c (linux_wait): Unblock async I/O.
9616 (linux_resume): Block and enable async I/O.
9617 * remote-utils.c (block_async_io, unblock_async_io): New functions.
9618 * server.h (block_async_io, unblock_async_io): Add prototypes.
9619
6910d122
DJ
96202004-02-29 Daniel Jacobowitz <drow@mvista.com>
9621
9622 * remote-utils.c (remote_open): Print a status notice after
9623 opening a TCP port.
9624 * server.c (attach_inferior): Print a status notice after
9625 attaching.
9626
96272004-02-29 Daniel Jacobowitz <drow@mvista.com>
d677d77d
DJ
9628
9629 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
9630
c89dc5d4
DJ
96312004-02-26 Daniel Jacobowitz <drow@mvista.com>
9632
9633 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
9634 error packet.
9635 * server.c, target.h: Update copyright years.
9636
4b8dad4a
RM
96372004-02-25 Roland McGrath <roland@redhat.com>
9638
9639 * target.h (struct target_ops): New member `read_auxv'.
9640 * server.c (handle_query): Handle qPart:auxv:read: query using that.
9641 * linux-low.c (linux_read_auxv): New function.
9642 (linux_target_ops): Initialize `read_auxv' member to that.
9643
d7446758
JB
96442004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
9645
9646 Committed by Jim Blandy <jimb@redhat.com>.
9647
9648 * linux-s390-low.c (s390_num_regs): Update.
4b8dad4a 9649 (s390_regmap): Remove control registers. Use __s390x__ predefine
d7446758
JB
9650 instead of GPR_SIZE to distiguish s390 and s390x targets.
9651
5544ad89
DJ
96522004-01-31 Daniel Jacobowitz <drow@mvista.com>
9653
9654 * linux-low.c: Update copyright year.
9655 (check_removed_breakpoint): Clear pending_is_breakpoint.
9656 (linux_set_resume_request, linux_queue_one_thread)
9657 (resume_status_pending_p): New functions.
9658 (linux_continue_one_thread): Use process->resume.
9659 (linux_resume): Only resume threads if there are no pending events.
9660 * linux-low.h (struct process_info): Add resume request
9661 pointer.
9662
2a68b70e
DJ
96632004-01-30 Daniel Jacobowitz <drow@mvista.com>
9664
9665 * regcache.c (new_register_cache): Clear the allocated register
9666 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
9667
64386c31
DJ
96682003-10-13 Daniel Jacobowitz <drow@mvista.com>
9669
9670 * linux-low.c (linux_resume): Take a struct thread_resume *
9671 argument.
9672 (linux_wait): Update call.
9673 (resume_ptr): New static variable.
9674 (linux_continue_one_thread): Renamed from
9675 linux_continue_one_process. Use resume_ptr.
9676 (linux_resume): Use linux_continue_one_thread.
9677 * server.c (handle_v_cont, handle_v_requests): New functions.
9678 (myresume): New function.
9679 (main): Handle 'v' case.
9680 * target.h (struct thread_resume): New type.
9681 (struct target_ops): Change argument of "resume" to struct
9682 thread_resume *.
9683 (myresume): Delete macro.
9684
c938e9b0
L
96852003-08-08 H.J. Lu <hongjiu.lu@intel.com>
9686
9687 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
9688 (uninstall): Support DESTDIR.
9689
7f313d07
BC
9690Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
9691
9692 * configure.srv: Add xscale*linux copy of arm*linux entry.
9693
3b2fc2ea
DJ
96942003-07-24 Daniel Jacobowitz <drow@mvista.com>
9695
9696 * linux-arm-low.c (arm_reinsert_addr): New function.
9697 (the_low_target): Add arm_reinsert_addr.
9698
1c0a559e
MK
96992003-07-08 Mark Kettenis <kettenis@gnu.org>
9700
9701 * mem-break.c: Remove whitespace at end of file.
9702
43d5792c
DJ
97032003-06-28 Daniel Jacobowitz <drow@mvista.com>
9704
9705 * configure.in: Check whether we need to prototype strerror.
9706 * server.h: Optionally prototype strerror.
9707 * gdbreplay.c (perror_with_name): Use strerror.
9708 * linux-low.c (linux_attach_lwp): Use strerror.
9709 * utils.c (perror_with_name): Use strerror.
9710 * config.in, configure: Regenerated.
9711
c8a86edf
DJ
97122003-06-28 Daniel Jacobowitz <drow@mvista.com>
9713
9714 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
9715 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
9716
73d37363
DJ
97172003-06-20 Daniel Jacobowitz <drow@mvista.com>
9718
9719 * Makefile.in (SFILES): Update.
9720 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
9721 low-sun3.c: Remove files.
9722
6ad8ae5c
DJ
97232003-06-17 Daniel Jacobowitz <drow@mvista.com>
9724
9725 * linux-low.c: Move comment to linux_thread_alive where it belonged.
9726 (linux_detach_one_process, linux_detach): New functions.
9727 (linux_target_ops): Add linux_detach.
9728 * server.c (main): Handle 'D' packet.
9729 * target.h (struct target_ops): Add "detach" member.
9730 (detach_inferior): Define.
9731
1581182a
MK
97322003-06-13 Mark Kettenis <kettenis@gnu.org>
9733
9734 From Kelley Cook <kelleycook@wideopenwest.com>:
9735 * configure.srv: Accept i[34567]86 variants.
9736
e5379b03
DJ
97372003-06-05 Daniel Jacobowitz <drow@mvista.com>
9738
9739 * linux-low.c (linux_wait_for_event): Correct comment typos.
9740 (linux_resume_one_process): Call check_removed_breakpoint.
9741 (linux_send_signal): New function.
9742 (linux_target_ops): Add linux_send_signal.
9743 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
9744 of kill.
9745 * target.h (struct target_ops): Add send_signal.
9746
2ff29de4
JB
97472003-05-29 Jim Blandy <jimb@redhat.com>
9748
9749 * linux-low.c (usr_store_inferior_registers): Transfer buf in
9750 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
9751 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
9752 away part of the register's value.
9753
254787d4
DJ
97542003-03-26 Daniel Jacobowitz <drow@mvista.com>
9755
9756 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
9757 (linux_wait_for_event, linux_init_signals): Likewise.
9758
94e10508
DJ
97592003-03-17 Daniel Jacobowitz <drow@mvista.com>
9760
9761 * configure.in: Check for stdlib.h.
9762 * configure: Regenerated.
9763 * config.in: Regenerated.
9764
4c0711e0
DJ
97652003-01-04 Andreas Schwab <schwab@suse.de>
9766
9767 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
9768
ef66e766
AC
97692003-01-02 Andrew Cagney <ac131313@redhat.com>
9770
9771 * Makefile.in: Remove obsolete code.
9772
a1358604
DJ
97732002-11-20 Daniel Jacobowitz <drow@mvista.com>
9774
9775 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
9776 defined(PT_FPR0_HI).
9777
23ce3b1c
DJ
97782002-11-17 Stuart Hughes <seh@zee2.com>
9779
9780 * linux-arm-low.c (arm_num_regs): Increase.
9781 (arm_regmap): Include status register.
9782
97832002-11-17 Daniel Jacobowitz <drow@mvista.com>
9784
9785 * linux-low.c (register_addr): Remove incorrect -1 check.
9786
a9fa9f7d
DJ
97872002-08-29 Daniel Jacobowitz <drow@mvista.com>
9788
9789 * linux-low.c (linux_create_inferior): Call setpgid. Return
9790 the new PID.
9791 (unstopped_p, linux_signal_pid): Remove.
9792 (linux_target_ops): Remove linux_signal_pid.
9793 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
9794 global instead of target method.
9795 * target.h (struct target_ops): Remove signal_pid. Update comment
9796 for create_inferior.
9797 * server.c (signal_pid): New variable.
9798 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
4b8dad4a 9799 gdbserver. Set the child to be the foreground process group.
a9fa9f7d
DJ
9800 (attach_inferior): Set signal_pid.
9801
17574093
DJ
98022002-08-23 Daniel Jacobowitz <drow@mvista.com>
9803
9804 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
9805
98062002-08-20 Jim Blandy <jimb@redhat.com>
9807
9808 * Makefile.in (LDFLAGS): Allow the configure script to establish a
9809 default for this.
9810
98112002-08-01 Andrew Cagney <cagney@redhat.com>
9812
9813 * Makefile.in: Make chill references obsolete.
9814
98152002-07-24 Kevin Buettner <kevinb@redhat.com>
9816
9817 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
9818 * configure: Regenerate.
9819 * config.in: Regenerate.
9820
98212002-07-09 David O'Brien <obrien@FreeBSD.org>
9822
9823 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
9824 (perror_with_name, remote_close, remote_open, expect, play): Static.
9825
98262002-07-04 Michal Ludvig <mludvig@suse.cz>
9827
4b8dad4a 9828 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17574093
DJ
9829 byte offsets instead of an array of indexes.
9830 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
9831
98322002-06-13 Daniel Jacobowitz <drow@mvista.com>
9833
9834 * regcache.c: Add comment.
9835
98362002-06-11 Daniel Jacobowitz <drow@mvista.com>
9837
9838 * thread-db.c: New file.
9839 * proc-service.c: New file.
9840 * acinclude.m4: New file.
9841 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
9842 proc-service.o, and thread-db.o.
9843 (linux-low.o): Add USE_THREAD_DB.
9844 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
9845 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
9846 * aclocal.m4: Regenerated.
9847 * config.in: Regenerated.
9848 * configure: Regenerated.
9849 * configure.in: Check for proc_service.h, sys/procfs.h,
9850 thread_db.h, and linux/elf.h headrs.
9851 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
9852 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
9853 Check for -lthread_db and thread support.
9854 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
9855 PowerPC, and SuperH.
9856 * i387-fp.c: Constify arguments.
9857 * i387-fp.h: Likewise.
9858 * inferiors.c: (struct thread_info): Renamed from
9859 `struct inferior_info'. Remove PID member. Use generic inferior
9860 list header. All uses updated.
9861 (inferiors, signal_pid): Removed.
9862 (all_threads): New variable.
9863 (get_thread): Define.
9864 (add_inferior_to_list): New function.
9865 (for_each_inferior): New function.
9866 (change_inferior_id): New function.
9867 (add_inferior): Removed.
9868 (remove_inferior): New function.
9869 (add_thread): New function.
9870 (free_one_thread): New function.
9871 (remove_thread): New function.
9872 (clear_inferiors): Use for_each_inferior and free_one_thread.
9873 (find_inferior): New function.
9874 (find_inferior_id): New function.
9875 (inferior_target_data): Update argument type.
9876 (set_inferior_target_data): Likewise.
9877 (inferior_regcache_data): Likewise.
9878 (set_inferior_regcache_data): Likewise.
9879 * linux-low.c (linux_bp_reinsert): Remove.
9880 (all_processes, stopping_threads, using_thrads)
9881 (struct pending_signals, debug_threads, pid_of): New.
9882 (inferior_pid): Replace with macro.
9883 (struct inferior_linux_data): Remove.
9884 (get_stop_pc, add_process): New functions.
9885 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
9886 Use add_process and add_thread.
9887 (linux_attach_lwp): New function, based on old linux_attach. Use
9888 add_process and add_thread. Set stop_expected for new threads.
9889 (linux_attach): New function.
9890 (linux_kill_one_process): New function.
9891 (linux_kill): Kill all LWPs.
9892 (linux_thread_alive): Use find_inferior_id.
9893 (check_removed_breakpoints, status_pending_p): New functions.
9894 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
9895 Update. Use WNOHANG. Wait for cloned processes also. Update process
9896 struct for the found process.
9897 (linux_wait_for_event): New function.
9898 (linux_wait): Use it. Support LWPs.
9899 (send_sigstop, wait_for_sigstop, stop_all_processes)
9900 (linux_resume_one_process, linux_continue_one_process): New functions.
9901 (linux_resume): Support LWPs.
9902 (REGISTER_RAW_SIZE): Remove.
9903 (fetch_register): Use register_size instead. Call supply_register.
9904 (usr_store_inferior_registers): Likewise. Call collect_register.
9905 Fix recursive case.
9906 (regsets_fetch_inferior_registers): Improve error message.
9907 (regsets_store_inferior_registers): Add debugging.
9908 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
9909 (unstopped_p, linux_signal_pid): New functions.
9910 (linux_target_ops): Add linux_signal_pid.
9911 (linux_init_signals): New function.
9912 (initialize_low): Call it. Initialize using_threads.
9913 * regcache.c (inferior_regcache_data): Add valid
9914 flag.
9915 (get_regcache): Fetch registers lazily. Add fetch argument
9916 and update all callers.
9917 (regcache_invalidate_one, regcache_invalidate): New
9918 functions.
9919 (new_register_cache): Renamed from create_register_cache.
9920 Return the new regcache.
9921 (free_register_cache): Change argument to a void *.
9922 (registers_to_string, registers_from_string): Call get_regcache
9923 with fetch flag set.
9924 (register_data): Make static. Pass fetch flag to get_regcache.
9925 (supply_register): Call get_regcache with fetch flag clear.
9926 (collect_register): Call get_regcache with fetch flag set.
9927 (collect_register_as_string): New function.
9928 * regcache.h: Update.
9929 * remote-utils.c (putpkt): Flush after debug output and use
9930 stderr.
9931 Handle input interrupts while waiting for an ACK.
9932 (input_interrupt): Use signal_pid method.
9933 (getpkt): Flush after debug output and use stderr.
9934 (outreg): Use collect_register_as_string.
9935 (new_thread_notify, dead_thread_notify): New functions.
9936 (prepare_resume_reply): Check using_threads. Set thread_from_wait
9937 and general_thread.
9938 (look_up_one_symbol): Flush after debug output.
9939 * server.c (step_thread, server_waiting): New variables.
9940 (start_inferior): Don't use signal_pid. Update call to mywait.
9941 (attach_inferior): Update call to mywait.
9942 (handle_query): Handle qfThreadInfo and qsThreadInfo.
9943 (main): Don't fetch/store registers explicitly. Use
9944 set_desired_inferior. Support proposed ``Hs'' packet. Update
9945 calls to mywait.
9946 * server.h: Update.
9947 (struct inferior_list, struct_inferior_list_entry): New.
9948 * target.c (set_desired_inferior): New.
9949 (write_inferior_memory): Constify.
9950 (mywait): New function.
9951 * target.h: Update.
9952 (struct target_ops): New signal_pid method.
9953 (mywait): Removed macro, added prototype.
9954
9955 * linux-low.h (regset_func): Removed.
9956 (regset_fill_func, regset_store_func): New.
9957 (enum regset_type): New.
9958 (struct regset_info): Add type field. Use new operation types.
9959 (struct linux_target_ops): stop_pc renamed to get_pc.
9960 Add decr_pc_after_break and breakpoint_at.
9961 (get_process, get_thread_proess, get_process_thread)
9962 (strut process_info, all_processes, linux_attach_lwp)
9963 (thread_db_init): New.
9964
9965 * linux-arm-low.c (arm_get_pc, arm_set_pc,
9966 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
9967 (the_low_target): Add new members.
9968 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
9969 (i386_store_fpxregset): Constify.
9970 (target_regsets): Add new kind identifier.
9971 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
9972 (i386_set_pc): Add debugging.
9973 (i386_breakpoint_at): New function.
9974 (the_low_target): Add new members.
9975 * linux-mips-low.c (mips_get_pc, mips_set_pc)
9976 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
9977 (mips_breakpoint_at): New.
9978 (the_low_target): Add new members.
9979 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
9980 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
9981 (the_low_target): Add new members.
9982 * linux-sh-low.c (sh_get_pc, sh_set_pc)
9983 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
9984 (the_low_target): Add new members.
9985 * linux-x86-64-low.c (target_regsets): Add new kind
9986 identifier.
9987
99882002-05-15 Daniel Jacobowitz <drow@mvista.com>
9989
9990 From Martin Pool <mbp@samba.org>:
9991 * server.c (gdbserver_usage): New function.
9992 (main): Call it.
9993
99942002-05-14 Daniel Jacobowitz <drow@mvista.com>
9995
9996 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
9997 stop_at -> stop_pc.
9998
99992002-05-04 Andrew Cagney <ac131313@redhat.com>
10000
10001 * Makefile.in: Remove obsolete code.
10002
100032002-04-24 Michal Ludvig <mludvig@suse.cz>
10004
10005 * linux-low.c (regsets_fetch_inferior_registers),
10006 (regsets_store_inferior_registers): Removed cast to int from
10007 ptrace() calls.
10008 * regcache.h: Added declaration of struct inferior_info.
10009
100102002-04-20 Daniel Jacobowitz <drow@mvista.com>
10011
10012 * inferiors.c (struct inferior_info): Add regcache_data.
10013 (add_inferior): Call create_register_cache.
10014 (clear_inferiors): Call free_register_cache.
10015 (inferior_regcache_data, set_inferior_regcache_data): New functions.
10016 * regcache.c (struct inferior_regcache_data): New.
10017 (registers): Remove.
10018 (get_regcache): New function.
10019 (create_register_cache, free_register_cache): New functions.
10020 (set_register_cache): Don't initialize the register cache here.
10021 (registers_to_string, registers_from_string, register_data): Call
10022 get_regcache.
10023 * regcache.h: Add prototypes.
10024 * server.h: Likewise.
10025
100262002-04-20 Daniel Jacobowitz <drow@mvista.com>
10027
10028 * mem-break.c: New file.
10029 * mem-break.h: New file.
10030 * Makefile.in: Add mem-break.o rule; update server.h
10031 dependencies.
10032 * inferiors.c (struct inferior_info): Add target_data
10033 member.
10034 (clear_inferiors): Free target_data member if set.
10035 (inferior_target_data, set_inferior_target_data): New functions.
10036 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
10037 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
10038 * linux-low.c (linux_bp_reinsert): New variable.
10039 (struct inferior_linux_data): New.
10040 (linux_create_inferior): Use set_inferior_target_data.
10041 (linux_attach): Likewise. Call add_inferior.
10042 (linux_wait_for_one_inferior): New function.
10043 (linux_wait): Call it.
10044 (linux_write_memory): Add const.
10045 (initialize_low): Call set_breakpoint_data.
10046 * linux-low.h (struct linux_target_ops): Add breakpoint
10047 handling members.
10048 * server.c (attach_inferior): Remove extra add_inferior
10049 call.
10050 * server.h: Include mem-break.h. Update inferior.c
10051 prototypes.
10052 * target.c (read_inferior_memory)
10053 (write_inferior_memory): New functions.
10054 * target.h (read_inferior_memory)
10055 (write_inferior_memory): Change macros to prototypes.
10056 (struct target_ops): Update comments. Add const to write_memory
10057 definition.
10058
100592002-04-11 Daniel Jacobowitz <drow@mvista.com>
10060
10061 * linux-low.c (usr_store_inferior_registers): Support
10062 registers which are allowed to fail to store.
10063 * linux-low.h (linux_target_ops): Likewise.
10064 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
10065 (ppc_cannot_store_register): FPSCR may not be storable.
10066
100672002-04-09 Daniel Jacobowitz <drow@mvista.com>
10068
10069 * server.h: Include <string.h> if HAVE_STRING_H.
10070 * ChangeLog: Correct paths in last ChangeLog entry.
10071
100722002-04-09 Daniel Jacobowitz <drow@mvista.com>
10073
10074 * linux-low.h: Remove obsolete prototypes.
10075 (struct linux_target_ops): New.
10076 (extern the_low_target): New.
10077 * linux-low.c (num_regs, regmap): Remove declarations.
10078 (register_addr): Use the_low_target explicitly.
10079 (fetch_register): Likewise.
10080 (usr_fetch_inferior_registers): Likewise.
10081 (usr_store_inferior_registers): Likewise.
10082 * linux-arm-low.c (num_regs): Remove.
10083 (arm_num_regs): Define.
10084 (arm_regmap): Renamed from regmap, made static.
10085 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
10086 made static.
10087 (arm_cannot_store_register): Renamed from cannot_store_register,
10088 made static.
10089 (the_low_target): New.
10090 * linux-i386-low.c (num_regs): Remove.
10091 (i386_num_regs): Define.
10092 (i386_regmap): Renamed from regmap, made static.
10093 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
10094 made static.
10095 (i386_cannot_store_register): Renamed from cannot_store_register,
10096 made static.
10097 (the_low_target): New.
10098 * linux-ia64-low.c (num_regs): Remove.
10099 (ia64_num_regs): Define.
10100 (ia64_regmap): Renamed from regmap, made static.
10101 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
10102 made static.
10103 (ia64_cannot_store_register): Renamed from cannot_store_register,
10104 made static.
10105 (the_low_target): New.
10106 * linux-m68k-low.c (num_regs): Remove.
10107 (m68k_num_regs): Define.
10108 (m68k_regmap): Renamed from regmap, made static.
10109 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
10110 made static.
10111 (m68k_cannot_store_register): Renamed from cannot_store_register,
10112 made static.
10113 (the_low_target): New.
10114 * linux-mips-low.c (num_regs): Remove.
10115 (mips_num_regs): Define.
10116 (mips_regmap): Renamed from regmap, made static.
10117 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
10118 made static.
10119 (mips_cannot_store_register): Renamed from cannot_store_register,
10120 made static.
10121 (the_low_target): New.
10122 * linux-ppc-low.c (num_regs): Remove.
10123 (ppc_num_regs): Define.
10124 (ppc_regmap): Renamed from regmap, made static.
10125 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
10126 made static.
10127 (ppc_cannot_store_register): Renamed from cannot_store_register,
10128 made static.
10129 (the_low_target): New.
10130 * linux-s390-low.c (num_regs): Remove.
10131 (s390_num_regs): Define.
10132 (s390_regmap): Renamed from regmap, made static.
10133 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
10134 made static.
10135 (s390_cannot_store_register): Renamed from cannot_store_register,
10136 made static.
10137 (the_low_target): New.
10138 * linux-sh-low.c (num_regs): Remove.
10139 (sh_num_regs): Define.
10140 (sh_regmap): Renamed from regmap, made static.
10141 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
10142 made static.
10143 (sh_cannot_store_register): Renamed from cannot_store_register,
10144 made static.
10145 (the_low_target): New.
10146 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
10147 (the_low_target): New.
10148
101492002-04-09 Daniel Jacobowitz <drow@mvista.com>
10150
10151 * Makefile.in: Add stamp-h target.
10152 * configure.in: Create stamp-h.
10153 * configure: Regenerated.
10154
101552002-04-09 Daniel Jacobowitz <drow@mvista.com>
10156
10157 * inferiors.c: New file.
10158 * target.c: New file.
10159 * target.h: New file.
10160 * Makefile.in: Add target.o and inferiors.o. Update
10161 dependencies.
10162 * linux-low.c (inferior_pid): New static variable,
10163 moved from server.c.
10164 (linux_create_inferior): Renamed from create_inferior.
10165 Call add_inferior. Return 0 on success instead of a PID.
10166 (linux_attach): Renamed from myattach.
10167 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
10168 (linux_thread_alive): Renamed from mythread_alive.
10169 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
10170 child dies.
10171 (linux_resume): Renamed from myresume. Add missing ``return 0''.
10172 (regsets_store_inferior_registers): Correct error message.
10173 Add missing ``return 0''.
10174 (linux_fetch_registers): Renamed from fetch_inferior_registers.
10175 (linux_store_registers): Renamed from store_inferior_registers.
10176 (linux_read_memory): Renamed from read_inferior_memory.
10177 (linux_write_memory): Renamed from write_inferior_memory.
10178 (linux_target_ops): New structure.
10179 (initialize_low): Call set_target_ops ().
10180 * remote-utils.c (unhexify): New function.
10181 (hexify): New function.
10182 (input_interrupt): Send signals to ``signal_pid''.
10183 * server.c (inferior_pid): Remove.
10184 (start_inferior): Update create_inferior call.
10185 (attach_inferior): Call add_inferior.
10186 (handle_query): New function.
10187 (main): Call handle_query for `q' packets.
10188 * server.h: Include "target.h". Remove obsolete prototypes.
10189 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
10190
101912002-04-09 Daniel Jacobowitz <drow@mvista.com>
10192
10193 * Makefile.in: Add WARN_CFLAGS. Update configury
10194 dependencies.
10195 * configure.in: Check for <string.h>
10196 * configure: Regenerate.
10197 * config.in: Regenerate.
10198 * gdbreplay.c: Include needed system headers.
10199 (remote_open): Remove strchr prototype.
10200 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
10201 * regcache.c (supply_register): Change buf argument to const void *.
10202 (supply_register_by_name): Likewise.
10203 (collect_register): Change buf argument to void *.
10204 (collect_register_by_name): Likewise.
10205 * regcache.h: Add missing prototypes.
10206 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
10207 * server.c (handle_query): New function.
10208 (attached): New static variable, moved out of main.
10209 (main): Quiet longjmp clobber warnings.
10210 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
10211 * utils.c (error): Remove NORETURN.
10212 (fatal): Likewise.
This page took 1.295824 seconds and 4 git commands to generate.