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