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