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