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