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