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