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