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