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