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