Enable x32 support in gdbserver
[deliverable/binutils-gdb.git] / gdb / gdbserver / ChangeLog
CommitLineData
4d47af5c
L
12012-04-13 H.J. Lu <hongjiu.lu@intel.com>
2
3 * Makefile.in (clean): Also remove x32.c x32-linux.c
4 x32-avx.c x32-avx-linux.c.
5 (x32.o): New target.
6 (x32.c): Likewise.
7 (x32-linux.o): Likewise.
8 (x32-linux.c): Likewise.
9 (x32-avx.o): Likewise.
10 (x32-avx.c): Likewise.
11 (x32-avx-linux.o): Likewise.
12 (x32-avx-linux.c): Likewise.
13
14 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
15 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
16 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
17 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
18 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
19 i386/x32-avx-linux.xml.
20
21 * linux-x86-low.c (init_registers_x32_linux): New prototype.
22 (init_registers_x32_avx_linux): Likwise.
23 (x86_linux_update_xmltarget): Call init_registers_x32_linux
24 or init_registers_x32_avx_linux if linux_is_elf64 is false.
25
ecedbe58
PA
262012-04-13 Pedro Alves <palves@redhat.com>
27
28 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
29 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
30 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
31 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
32 the sub-make.
33
c92b5177
L
342012-04-12 H.J. Lu <hongjiu.lu@intel.com>
35
36 * linux-x86-low.c (compat_x32_clock_t): New.
37 (compat_x32_siginfo_t): Likewise.
38 (compat_x32_siginfo_from_siginfo): Likewise.
39 (siginfo_from_compat_x32_siginfo): Likewise.
40 (linux_is_elf64): Likewise.
41 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
42 and siginfo_from_compat_x32_siginfo for x32.
43 (x86_arch_setup): Set linux_is_elf64.
44
214d508e
L
452012-04-12 H.J. Lu <hongjiu.lu@intel.com>
46
47 PR gdb/13969
48 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
49 e_machine field.
50 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
51 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
52 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
53 compatible with process.
54
c9a1864a
YQ
552012-04-12 Yao Qi <yao@codesourcery.com>
56
57 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
58 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
59 (install-only, install-info, clean): Handle sub dir gnulib.
60 (all-lib, am--refresh): New targets.
61 (memmem.o): Remove target.
62 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
63 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
64 (AC_REPLACE_FUNCS): Remove memmem.
65 Invoke gl_INIT and AM_INIT_AUTOMAKE.
66 (AC_OUTPUT): Generate Makefile in gnulib/.
67 * aclocal.m4, config.in, configure: Regenerated.
68
367ba2c2
MR
692012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
70
71 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
72
9d236627
PA
732012-04-05 Pedro Alves <palves@redhat.com>
74
75 -Werror=strict-aliasing
76
77 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
78 pointer.
79
111217b3
PA
802012-04-04 Pedro Alves <palves@redhat.com>
81
82 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
83 (sparc_store_gregset_from_stack, sparc_store_gregset)
84 (sparc_breakpoint_at): Fix formatting.
85
8365dcf5
TJB
862012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
87
88 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
89 are available.
90 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
91 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
92 * config.in: Regenerate.
93 * configure: Likewise.
94
689cc2ae
PA
952012-03-29 Pedro Alves <palves@redhat.com>
96
97 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
98 Correct ptrace arguments.
99
c14dfd32
PA
1002012-03-28 Pedro Alves <palves@redhat.com>
101
102 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
103 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
104 (IA64_FR1_REGNUM): New defines.
105 (ia64_fetch_register): New.
106 (the_low_target): Install it.
107 * linux-low.h (struct linux_target_ops) <fetch_register>: New
108 field.
109 * linux-low.c (linux_fetch_registers): Try the
110 the_low_target.fetch_register hook first.
111
112 * linux-arm-low.c (the_low_target): Adjust.
113 * linux-bfin-low.c (the_low_target): Adjust.
114 * linux-cris-low.c (the_low_target): Adjust.
115 * linux-crisv32-low.c (the_low_target): Adjust.
116 * linux-m32r-low.c (the_low_target): Adjust.
117 * linux-m68k-low.c (the_low_target): Adjust.
118 * linux-mips-low.c (the_low_target): Adjust.
119 * linux-ppc-low.c (the_low_target): Adjust.
120 * linux-s390-low.c (the_low_target): Adjust.
121 * linux-sh-low.c (the_low_target): Adjust.
122 * linux-sparc-low.c (the_low_target): Adjust.
123 * linux-tic6x-low.c (the_low_target): Adjust.
124 * linux-x86-low.c (the_low_target): Adjust.
125 * linux-xtensa-low.c (the_low_target): Adjust.
126
63c88e13
PA
1272012-03-26 Pedro Alves <palves@redhat.com>
128
129 * server.c (handle_qxfer_libraries): Don't bail early if
130 the_target->qxfer_libraries_svr4 is not NULL.
131
fb723180
PA
1322012-03-26 Pedro Alves <palves@redhat.com>
133
134 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
135
0afae3cf
PA
1362012-03-23 Pedro Alves <palves@redhat.com>
137
138 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
139 "library-list-svr4" element's start tag when the the DSO list is
140 empty.
141
485f1ee4
PA
1422012-03-23 Pedro Alves <palves@redhat.com>
143
144 * linux-low.c (read_one_ptr): Read the inferior's pointer through
145 a variable whose type size is the same as the inferior's pointer
146 size.
147
a5362b9a
TS
1482012-03-21 Thomas Schwinge <thomas@codesourcery.com>
149
150 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
151 struct siginfo.
152 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
153 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
154 * linux-low.h: Include <signal.h>.
155 (struct siginfo): Remove forward declaration.
156 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
157 struct siginfo.
158
d226c142
MF
1592012-03-21 Mike Frysinger <vapier@gentoo.org>
160
161 * .gitignore: Ignore more files.
162
122f36ef
PA
1632012-03-19 Pedro Alves <palves@redhat.com>
164 Jan Kratochvil <jan.kratochvil@redhat.com>
165
166 * server.c (cont_thread, general_thread): Add describing comments.
167 (start_inferior): Clear `cont_thread'.
168 (handle_v_cont): Don't set `cont_thread' if resuming all threads
169 of a process.
170
fc3e5175
YQ
1712012-03-15 Yao Qi <yao@codesourcery.com>
172
173 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
174 handling to ...
175 (cmd_qtdp): ... here.
176
8d0d92cd
YQ
1772012-03-15 Yao Qi <yao@codesourcery.com>
178
179 * tracepoint.c (struct tracepoint_action_ops): New.
180 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
181 (m_tracepoint_action_download): New.
182 (r_tracepoint_action_download): New.
183 (x_tracepoint_action_download): New.
184 (l_tracepoint_action_download): New.
185 (add_tracepoint_action): Install `action->ops' according type.
186 (download_tracepoint_1): Move code `download' function pointer
187 of various tracepoint_action_ops.
188
87b0bb13
JK
1892012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
190
191 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
192 linux_ptrace_attach_warnings.
193
5f572dec
JK
1942012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
195
196 * Makefile.in (linux-ptrace.o): New.
197 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
198 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
199 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
200 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
201 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
202 of these targets.
203 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
204
f4647387
YQ
2052012-03-08 Yao Qi <yao@codesourcery.com>
206 Pedro Alves <palves@redhat.com>
207
208 Fix PR server/13392.
209 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
210 offset of JMP insn.
211 * tracepoint.c (remove_tracepoint): New.
212 (cmd_qtdp): Call remove_tracepoint when failed to install.
213
9b224c5e
PA
2142012-03-07 Pedro Alves <palves@redhat.com>
215
216 * linux-low.c (get_detach_signal): New.
217 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
218 Pass on pending signals to PTRACE_DETACH. Check the result of the
219 ptrace call.
220 * server.c (program_signals, program_signals_p): New.
221 (handle_general_set): Handle QProgramSignals.
222 * server.h (program_signals, program_signals_p): Declare.
223
e237a7e2
JK
2242012-03-05 Pedro Alves <palves@redhat.com>
225 Jan Kratochvil <jan.kratochvil@redhat.com>
226
227 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
228 New comment why.
229
5808517f
YQ
2302012-03-03 Yao Qi <yao@codesourcery.com>
231
232 * tracepoint.c (tracepoint_look_up_symbols): Update call to
233 agent_look_up_symbols.
234
58b4daa5
YQ
2352012-03-03 Yao Qi <yao@codesourcery.com>
236
237 * Makefile.in (linux-low.o): Keep dependence on agent.h.
238 (linux-x86-low.o): Likewise.
239 * server.h: Remove in_process_agent_loaded.
240 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
241 common/agent.c.
242 Update callers.
243
8ffcbaaf
YQ
2442012-03-03 Yao Qi <yao@codesourcery.com>
245
246 * tracepoint.c (gdb_agent_capability): New global.
247 (in_process_agent_loaded_ust): Renamed to
248 `in_process_agent_supports_ust'.
249 Update callers.
250 (in_process_agent_supports_ust): Call agent_capability_check.
251 (clear_installed_tracepoints): Assert that agent supports
252 agent.
253
d1feda86
YQ
2542012-03-03 Yao Qi <yao@codesourcery.com>
255
256 * linux-low.c (linux_supports_agent): New.
257 (linux_target_ops): Initialize field `supports_agent' with
258 linux_supports_agent.
259 * target.h (struct target_ops) <supports_agent>: New.
260 (target_supports_agent): New macro.
261 * server.c (handle_general_set): Handle packet 'QAgent'.
262 (handle_query): Send `QAgent+'.
263 * Makefile.in (server.o): Depends on agent.h.
264
2fa291ac
YQ
2652012-03-03 Yao Qi <yao@codesourcery.com>
266
267 * Makefile.in (OBS): Add agent.o.
268 Add new rule for agent.o.
269 Track dependence of tracepoint.c on agent.h.
270 * tracepoint.c (run_inferior_command_1):
271 (run_inferior_command): Call agent_run_command.
272 (gdb_ust_connect_sync_socket): Deleted. Move it to
273 common/agent.c.
274 (resume_thread, stop_thread): Likewise.
275 (gdb_ust_socket_init): Renamed to ...
276 (gdb_agent_socket_init): ... New.
277 (gdb_ust_thread): Renamed to ...
278 (gdb_agent_helper_thread): ... New.
279 (gdb_ust_init): Move some code to ...
280 (gdb_agent_init): ... here. New.
281 [HAVE_UST]: Call gdb_ust_init.
282 (initialize_tracepoint_ftlib): Call gdb_agent_init.
283 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
284 * config.in, configure: Regenerated.
285
05044653
PA
2862012-03-02 Pedro Alves <palves@redhat.com>
287
288 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
289 * linux-low.c (struct simple_pid_list): New.
290 (stopped_pids): New a struct simple_pid_list pointer.
291 (add_to_pid_list, pull_pid_from_list): New.
292 (handle_extended_wait): Don't assume the first signal new children
293 report is SIGSTOP. Adjust call to pull_pid_from_list.
294 (linux_wait_for_lwp): Adjust.
295
8d00225b
YQ
2962012-03-02 Yao Qi <yao@codesourcery.com>
297
298 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
299 debug log.
300
19560ba5
YQ
3012012-03-02 Yao Qi <yao@codesourcery.com>
302
303 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
304 `stop_pc' and `tpoint'. Update caller.
305
1faeff08
MR
3062012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
307
308 * linux-low.h (linux_target_ops): Add regset_bitmap member.
309 * linux-low.c (use_linux_regsets): New macro.
310 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
311 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
312 (linux_register_in_regsets): New function.
313 (usr_fetch_inferior_registers): Skip registers covered by
314 regsets.
315 (usr_store_inferior_registers): Likewise.
316 (usr_fetch_inferior_registers): New macro.
317 (usr_store_inferior_registers): Likewise.
318 (linux_fetch_registers): Handle mixed regset/non-regset targets.
319 (linux_store_registers): Likewise.
320 * linux-mips-low.c (init_registers_mips_dsp_linux): New
321 prototype.
322 (init_registers_mips64_dsp_linux): Likewise.
323 (init_registers_mips_linux): New macro.
324 (init_registers_mips_dsp_linux): Likewise.
325 (mips_dsp_num_regs): Likewise.
326 (DSP_BASE, DSP_CONTROL): New fallback macros.
327 (mips_base_regs): New macro.
328 (mips_regmap): Use it. Fix the size.
329 (mips_dsp_regmap): New variable.
330 (mips_dsp_regset_bitmap): Likewise.
331 (mips_arch_setup): New function.
332 (mips_cannot_fetch_register): Use the_low_target.regmap rather
333 than mips_regmap.
334 (mips_cannot_store_register): Likewise.
335 (the_low_target): Update .arch_setup, .num_regs and .regmap
336 initializers. Add .regset_bitmap initializer.
337 * linux-arm-low.c (the_low_target): Add .regset_bitmap
338 initializer.
339 * linux-bfin-low.c (the_low_target): Likewise.
340 * linux-cris-low.c (the_low_target): Likewise.
341 * linux-crisv32-low.c (the_low_target): Likewise.
342 * linux-ia64-low.c (the_low_target): Likewise.
343 * linux-m32r-low.c (the_low_target): Likewise.
344 * linux-m68k-low.c (the_low_target): Likewise.
345 * linux-ppc-low.c (the_low_target): Likewise.
346 * linux-s390-low.c (the_low_target): Likewise.
347 * linux-sh-low.c (the_low_target): Likewise.
348 * linux-sparc-low.c (the_low_target): Likewise.
349 * linux-tic6x-low.c (the_low_target): Likewise.
350 * linux-x86-low.c (the_low_target): Likewise.
351 * linux-xtensa-low.c (the_low_target): Likewise.
352 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
353 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
354 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
355 srv_xmlfiles.
356 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
357 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
358
c03e6ccc
YQ
3592012-02-29 Yao Qi <yao@codesourcery.com>
360 Pedro Alves <palves@redhat.com>
361
362 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
363 `step_over_finished' is true.
364
644cebc9
PA
3652012-02-27 Pedro Alves <palves@redhat.com>
366
367 * linux-low.c (pid_is_stopped): Delete, moved to common/.
368 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
369
c14d7ab2
PA
3702012-02-27 Pedro Alves <palves@redhat.com>
371
372 PR server/9684
373 * linux-low.c (pid_is_stopped): New.
374 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
375
412c89dd
LM
3762012-02-25 Luis Machado <lgustavo@codesourcery.com>
377
378 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
379 of conditions.
380
b745defe
MR
3812012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
382
383 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
384
9f3a5c85
LM
3852012-02-24 Luis Machado <lgustavo@codesourcery>
386
387 * server.c (handle_query): Advertise support for target-side
388 breakpoint condition evaluation.
389 (process_point_options): New function.
390 (process_serial_event): When inserting a breakpoint, check for
391 a target-side condition that should be evaluated.
392
393 * mem-break.c: Include regcache.h and ax.h.
394 (point_cond_list_t): New data structure.
395 (breakpoint) <cond_list>: New field.
396 (find_gdb_breakpoint_at): Make non-static.
397 (delete_gdb_breakpoint_at): Clear any target-side
398 conditions.
399 (clear_gdb_breakpoint_conditions): New function.
400 (add_condition_to_breakpoint): Likewise.
401 (add_breakpoint_condition): Likewise.
402 (gdb_condition_true_at_breakpoint): Likewise.
403 (gdb_breakpoint_here): Return result directly instead
404 of going through a local variable.
405
406 * mem-break.h (find_gdb_breakpoint_at): New prototype.
407 (clear_gdb_breakpoint_conditions): Likewise.
408 (add_breakpoint_condition): Likewise.
409 (gdb_condition_true_at_breakpoint): Likewise.
410
411 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
412 (need_step_over_p): Take target-side breakpoint condition into
413 consideration.
414
5e1dc496
LM
4152012-02-24 Luis Machado <lgustavo@codesourcery>
416
417 * server.h: Include tracepoint.h.
418 (agent_mem_read, agent_get_trace_state_variable_value,
419 agent_set_trace_state_variable_value,
420 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
421 get_set_tsv_func_addr): New prototypes.
422
423 * ax.h: New include file.
424 * ax.c: New source file.
425
426 * tracepoint.c: Include ax.h.
427 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
428 agent_expr, eval_result_type): Move to ax.h.
429 (parse_agent_expr): Rename to ...
430 (gdb_parse_agent_expr): ... this, make it non-static and move
431 to ax.h.
432 (unparse_agent_expr) Rename to ...
433 (gdb_unparse_agent_expr): ... this, make it non-static and move
434 to ax.h.
435 (eval_agent_expr): Rename to ...
436 (eval_tracepoint_agent_expr): ... this.
437 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
438 forward declarations.
439 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
440 (agent_get_trace_state_variable_value): New function.
441 (agent_set_trace_state_variable_value): New function.
442 (cmd_qtdp): Call gdb_parse_agent_expr (...).
443 (response_tracepoint): Call gdb_unparse_agent_expr (...).
444 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
445 (condition_true_at_tracepoint): Likewise.
446 (parse_agent_expr): Rename to ...
447 (gdb_parse_agent_expr): ... this and move to ax.c.
448 (unparse_agent_expr): Rename to ...
449 (gdb_unparse_agent_expr): ... this and move to ax.c.
450 (gdb_agent_op_name): Move to ax.c.
451 (eval_agent_expr): Rename to ...
452 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
453 and move to ax.c.
454 (eval_tracepoint_agent_expr): New function.
455 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
456 non-static.
457 (current_insn_ptr, emit_error, struct bytecode_address): Move to
458 ax.c.
459 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
460 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
461 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
462 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
463 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
464 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
465 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
466 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
467 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
468 (compile_bytecodes): Remove forward declaration.
469 (is_goto_target): Move to ax.c.
470 (compile_bytecodes): Move to ax.c and call
471 agent_get_trace_state_variable_value (...) and
472 agent_set_trace_state_variable_value (...).
473
474 * Makefile.in: Update ax.c and IPA dependencies.
475
277e4e52
PA
4762012-02-24 Pedro Alves <palves@redhat.com>
477
478 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
479 (cmd_bigqtbuffer_circular): ... this. Only handle
480 'QTBuffer:circular:'.
481 (handle_tracepoint_general_set): Adjust.
482
bf4c19f7
YQ
4832012-02-16 Yao Qi <yao@codesourcery.com>
484
485 * inferiors.c: Move code to ...
486 * dll.c: .... here. New.
487 * server.h: Declare clear_dlls.
488 * Makefile.in (SFILES): Add dll.c.
489 (OBS): Add dll.o
490 (dll.o): New rule.
491
d73f2619
YQ
4922012-02-11 Yao Qi <yao@codesourcery.com>
493
494 * server.c: (handle_monitor_command): Add a new parameter
495 `own_buf'.
496 (handle_query): Update caller.
497
f8255c2a
JB
4982012-02-09 Joel Brobecker <brobecker@adacore.com>
499
500 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
501 * configure, config.in: Regenerate.
502 * hostio.c: Provide an alternate implementation if HAVE_READLINK
503 is not defined.
504
da84f473
PA
5052012-02-02 Pedro Alves <palves@redhat.com>
506
507 Try SIGKILL first, then PTRACE_KILL.
508 * linux-low.c (linux_kill_one_lwp): New.
509 (linux_kill_one_lwp): Rename to ...
510 (kill_one_lwp_callback): ... this. Use the new
511 linux_kill_one_lwp.
512
e886a173
PA
5132012-02-02 Pedro Alves <palves@redhat.com>
514
515 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
516 inferior.
517
be07f1a2
PA
5182012-01-27 Pedro Alves <palves@redhat.com>
519
520 * linux-low.c (linux_child_pid_to_exec_file): Delete.
521 (elf_64_file_p): Make static.
522 (linux_pid_exe_is_elf_64_file): New.
523 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
524 Delete declarations.
525 (linux_pid_exe_is_elf_64_file): Declare.
526 * linux-x86-low.c (x86_arch_setup): Use
527 linux_pid_exe_is_elf_64_file.
528
d8301ad1
JK
5292012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
530
531 * linux-low.c (linux_wait_for_event_1): Rename to ...
532 (linux_wait_for_event): ... here and merge it with former
533 linux_wait_for_event - new variable wait_ptid, use it.
534 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
535
01b17894
PA
5362012-01-23 Pedro Alves <palves@redhat.com>
537
538 * server.c (main): Avoid yet another case of infinite loop while
539 detaching/killing after a longjmp.
540
e825046f
JK
5412012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
542
543 Code cleanup.
544 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
545
b9e7b9c3
UW
5462012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
547
548 * hostio.c (handle_readlink): New function.
549 (handle_vFile): Call it to handle "vFile:readlink" packets.
550
901f9912
UW
5512012-01-20 Pedro Alves <palves@redhat.com>
552 Ulrich Weigand <ulrich.weigand@linaro.org>
553
554 * server.c (handle_v_requests): Only support vAttach and vRun to
555 start multiple processes when in extended protocol mode.
556
fc1ab1a0
PA
5572012-01-17 Pedro Alves <palves@redhat.com>
558
559 * tracepoint.c (initialize_tracepoint): Use mmap instead of
560 memalign plus mprotect to allocate the scratch buffer.
561
7d5d4e98
PA
5622012-01-13 Pedro Alves <palves@redhat.com>
563
564 * server.c (attach_inferior): Clear `cont_thread'.
565
f128d5e9
PA
5662012-01-13 Pedro Alves <palves@redhat.com>
567
568 * server.c (main): Avoid infinite loop while detaching/killing
569 after a longjmp.
570
06db92f0
DE
5712012-01-09 Doug Evans <dje@google.com>
572
573 * server.c (start_inferior): Set last_ptid in --wrapper case.
574
32d92999
YQ
5752012-01-06 Yao Qi <yao@codesourcery.com>
576
577 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
578 defined.
579 [IN_PROCESS_AGENT] (debug_agent): New global variable.
580
5e0a92a9
YQ
5812012-01-04 Yao Qi <yao@codesourcery.com>
582
583 * tracepoint.c (cmd_qtdp): Print debug message
584 for static tracepoint.
585
ae639e8c
YQ
5862012-01-04 Yao Qi <yao@codesourcery.com>
587
588 * tracepoint.c (trace_vdebug): Differentiate debug message
589 between gdbserver and IPA.
590
f72429c5
YQ
5912012-01-03 Yao Qi <yao@codesourcery.com>
592
593 * tracepoint.c (tracepoint_was_hit): Don't collect for
594 static tracepoint.
595
12c3e59c
JB
5962012-01-02 Joel Brobecker <brobecker@adacore.com>
597
598 * terminal.h: Reformat copyright header.
599
67827812
JB
6002012-01-02 Joel Brobecker <brobecker@adacore.com>
601
602 * server.c (gdbserver_version): Update copyright year.
603 * gdbreplay.c (gdbreplay_version): Likewise.
604
3e52c33d
JK
6052011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
606
607 * linux-low.c (linux_create_inferior): Put empty if clause for write.
608
609 Revert:
610 2011-12-18 Hui Zhu <teawater@gmail.com>
611 * linux-low.c (linux_create_inferior): Save return value to ret.
612
66f1260e
HZ
6132011-12-18 Hui Zhu <teawater@gmail.com>
614
615 * linux-low.c (linux_create_inferior): Save return value to ret.
616
e77616d7
DE
6172011-12-16 Doug Evans <dje@google.com>
618
e7b06c57
DE
619 * linux-low.c (linux_create_inferior): If stdio connection,
620 redirect stdin from /dev/null, stdout to stderr.
621 * remote-utils.c (remote_is_stdio): New static global.
622 (remote_connection_is_stdio): New function.
623 (remote_prepare): Handle stdio connection.
624 (remote_open): Ditto.
625 (remote_close): Don't close stdin for stdio connections.
626 (read_prim,write_prim): New functions. Replace all calls to
627 read/write to these.
628 * server.c (main): Watch for "-" argument. Move call to
629 remote_prepare before start_inferior.
630 * server.h (STDIO_CONNECTION_NAME): New macro.
631 (remote_connection_is_stdio): Declare.
632
e77616d7
DE
633 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
634 in debugging output.
635
82067193
YQ
6362011-12-15 Yao Qi <yao@codesourcery.com>
637
638 * tracepoint.c: Include sys/syscall.h.
639 (gdb_ust_thread): Remove preprocessor conditional.
640
82bfbe7e
PA
6412011-12-14 Pedro Alves <pedro@codesourcery.com>
642
643 * linux-low.c (linux_detach_one_lwp): Call
644 the_low_target.prepare_to_resume before detaching.
645
712c6575
YQ
6462011-12-14 Yao Qi <yao@codesourcery.com>
647
648 * tracepoint.c (gdb_ust_thread): Don't ignore return value
649 of write.
650
d54d1edf
YQ
6512011-12-14 Yao Qi <yao@codesourcery.com>
652
653 * i386-low.c (i386_low_stopped_data_address): Initialize local
654 variable `control'.
655
6210a125
PA
6562011-12-13 Pedro Alves <pedro@codesourcery.com>
657
658 PR remote/13492
659
660 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
661 DR_CONTROL unless necessary. Extend comments.
662 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
663 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
664
2ece8244
YQ
6652011-12-13 Yao Qi <yao@codesourcery.com>
666
667 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
668 macros.
669 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
670
784867a5
JK
6712011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
672
673 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
674 Print new debug message for such case.
675
6bf36717
JK
6762011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
677
678 Fix overlapping memcpy.
679 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
680 the read_inferior_memory transfer.
681 (delete_fast_tracepoint_jump): New variable buf. Use it for the
682 write_inferior_memory transfer.
683 (set_fast_tracepoint_jump): New variable buf. Use it for the
684 read_inferior_memory and write_inferior_memory transfers.
685 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
686 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
687 Use it for the write_inferior_memory transfer.
688 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
689 buffers.
690
50275556
MR
6912011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
692
693 * linux-low.c (fetch_register, store_register): Make code
694 consistent, fix formatting.
695
7325beb4
MR
6962011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
697
698 * linux-low.c (usr_store_inferior_registers): Factor out code
699 to handle individual registers into...
700 (store_register): ... this new function.
701
c642a434
UW
7022011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
703
704 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
705 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
706 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
707 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
708 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
709 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
710 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
711 (srv_xmlfiles): Add new XML files.
712
713 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
714 and <sys/uio.h>.
715 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
716 (init_registers_s390_linux32v1): Add prototype.
717 (init_registers_s390_linux32v2): Likewise.
718 (init_registers_s390_linux64v1): Likewise.
719 (init_registers_s390_linux64v2): Likewise.
720 (init_registers_s390x_linux64v1): Likewise.
721 (init_registers_s390x_linux64v2): Likewise.
722 (s390_num_regs): Increment to 52.
723 (s390_regmap): Add orig_r2 register.
724 (s390_num_regs_3264): Increment to 68.
725 (s390_regmap_3264): Add orig_r2 register.
726 (s390_collect_ptrace_register): Handle orig_r2 register.
727 (s390_supply_ptrace_register): Likewise.
728 (s390_fill_last_break): New function.
729 (s390_store_last_break): Likewise.
730 (s390_fill_system_call): New function.
731 (s390_store_system_call): Likewise.
732 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
733 register sets.
734 (s390_check_regset): New function.
735 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
736 NT_S390_SYSTEM_CALL regsets and use appropriate description.
737 Update target_regsets for available register sets.
738
2268b414
JK
7392011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
740 Jan Kratochvil <jan.kratochvil@redhat.com>
741
742 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
743 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
744 New.
745 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
746 * linux-low.h (struct process_info_private): New member r_debug.
747 * server.c (handle_qxfer_libraries): Call
748 the_target->qxfer_libraries_svr4.
749 (handle_qxfer_libraries_svr4): New function.
750 (qxfer_packets): New entry "libraries-svr4".
751 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
752 * target.h (struct target_ops): New member qxfer_libraries_svr4.
753 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
754 PACKET_qXfer_libraries_svr4.
755
d6db1fab
UW
7562011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
757
758 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
759 PSW address/mask between 8-byte and 16-byte formats.
760 (s390_supply_ptrace_register): Likewise.
761 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
762 basic addressing mode bit.
763
242f5f1c
SS
7642011-11-24 Stan Shebs <stan@codesourcery.com>
765
766 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
767
f196051f
SS
7682011-11-17 Stan Shebs <stan@codesourcery.com>
769
770 * tracepoint.c (struct tracepoint): New field traceframe_usage.
771 (tracing_start_time): New global.
772 (tracing_stop_time): New global.
773 (tracing_user_name): New global.
774 (tracing_notes): New global.
775 (tracing_stop_note): New global.
776 (cmd_qtstart): Set traceframe_usage, start_time.
777 (stop_tracing): Set stop_time.
778 (cmd_qtstatus): Report additional status.
779 (cmd_qtp): New function.
780 (handle_tracepoint_query): Call it.
781 (cmd_qtnotes): New function.
782 (handle_tracepoint_general_set): Call it.
783 (get_timestamp): Rename from tsv_get_timestamp.
784
405f8e94
SS
7852011-11-14 Stan Shebs <stan@codesourcery.com>
786 Kwok Cheung Yeung <kcy@codesourcery.com>
787
788 * linux-x86-low.c (small_jump_insn): New.
789 (i386_install_fast_tracepoint_jump_pad): Add arguments for
790 trampoline and error message, build a trampoline and issue a small
791 jump instruction to it.
792 (x86_install_fast_tracepoint_jump_pad): Add arguments for
793 trampoline and error message.
794 (x86_get_min_fast_tracepoint_insn_len): New.
795 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
796 * linux-low.h (struct linux_target_ops): Add arguments to
797 install_fast_tracepoint_jump_pad operation, add new operation.
798 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
799 arguments.
800 (linux_get_min_fast_tracepoint_insn_len): New function.
801 (linux_target_op): Add new operation.
802 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
803 (gdb_trampoline_buffer_end): Ditto.
804 (gdb_trampoline_buffer_error): Ditto.
805 (struct ipa_sym_addresses): Add fields for new IPA variables.
806 (symbol_list): Add entries for new IPA variables.
807 (struct tracepoint): Add fields to hold the address range of the
808 trampoline used by the tracepoint.
809 (trampoline_buffer_head): New static variable.
810 (trampoline_buffer_tail): Ditto.
811 (claim_trampoline_space): New function.
812 (have_fast_tracepoint_trampoline_buffer): New function.
813 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
814 structure.
815 (install_fast_tracepoint): Ditto, also add error buffer argument.
816 (cmd_qtminftpilen): New function.
817 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
818 (fast_tracepoint_from_trampoline_address): New function.
819 (fast_tracepoint_collecting): Handle trampoline as part of jump
820 pad space.
821 (set_trampoline_buffer_space): New function.
822 (initialize_tracepoint): Initialize new IPA variables.
823 * target.h (struct target_ops): Add arguments to
824 install_fast_tracepoint_jump_pad operation, add new
825 get_min_fast_tracepoint_insn_len operation.
826 (target_get_min_fast_tracepoint_insn_len): New.
827 (install_fast_tracepoint_jump_pad): Add arguments.
828 * server.h (IPA_BUFSIZ): Define.
829 * linux-i386-ipa.c: Include extra header files.
830 (initialize_fast_tracepoint_trampoline_buffer): New function.
831 (initialize_low_tracepoint): Call it.
832 * server.h (set_trampoline_buffer_space): Declare.
833 (claim_trampoline_space): Ditto.
834 (have_fast_tracepoint_trampoline_buffer): Ditto.
835
1e4d1764
YQ
8362011-11-14 Yao Qi <yao@codesourcery.com>
837
838 * server.c (handle_query): Handle InstallInTrace for qSupported.
839 * tracepoint.c (add_tracepoint): Sort list.
840 (install_tracepoint, download_tracepoint): New.
841 (cmd_qtdp): Call them to install and download tracepoints.
842 (sort_tracepoints): Removed.
843 (cmd_qtstart): Update.
844
5c73ff4e
YQ
8452011-11-14 Yao Qi <yao@codesourcery.com>
846
847 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
848 * mem-break.h: Declare.
849 * tracepoint.c (cmd_qtstart): Move some code to ...
850 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
851 New.
852 (download_tracepoints): Move some code to ...
853 (download_tracepoint_1): ... here. New.
854
86a30030
YQ
8552011-11-08 Yao Qi <yao@codesourcery.com>
856
857 * remote-utils.c (relocate_instruction): A comment fix.
858
8d26e50c
JB
8592011-11-07 Joel Brobecker <brobecker@adacore.com>
860
861 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
862 (i386_dr_low_get_control, i386_dr_low_get_status): Use
863 dr_status_mirror and dr_control_mirror from debug_reg_state.
864 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
865 (i386_initial_stuff): Remove use of deleted globals.
866 (i386_get_thread_context, i386_set_thread_context,
867 i386_thread_added): Use dr_status_mirror and dr_control_mirror
868 from debug_reg_state.
869
a59306a3
YQ
8702011-11-05 Yao Qi <yao@codesourcery.com>
871
872 * tracepoint.c (gdb_collect): Loop over tracepoints of same
873 address as TPOINT's.
874
3065dfb6
SS
8752011-11-02 Stan Shebs <stan@codesourcery.com>
876
877 * tracepoint.c (agent_mem_read_string): New function.
878 (eval_agent_expr): Call it for tracenz.
879 * server.c (handle_query): Report support for tracenz.
880
fd0d8c7c
YQ
8812011-11-02 Yao Qi <yao@codesourcery.com>
882
883 * tracepoint.c (cmd_qtstart): Remove unused local variables.
884
609086b1
YQ
8852011-11-02 Yao Qi <yao@codesourcery.com>
886
887 * target.h: Fix a typo in comment.
888
b9fd1791
PA
8892011-10-31 Pedro Alves <pedro@codesourcery.com>
890
891 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
892 clobber the breakpoints' shadows with fast tracepoint jumps.
893 * mem-break.h (check_mem_write): Add `myaddr' parameter.
894 * target.c (write_inferior_memory): Also pass MYADDR down to
895 check_mem_write.
896
03583c20
UW
8972011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
898
899 * configure.ac: Check support for personality routine.
900 * configure: Regenerate.
901 * config.in: Likewise.
902 * linux-low.c: Include <sys/personality.h>.
903 Define ADDR_NO_RANDOMIZE if necessary.
904 (linux_create_inferior): Disable address space randomization when
905 forking inferior, if requested.
906 (linux_supports_disable_randomization): New function.
907 (linux_target_ops): Install it.
908 * server.h (disable_randomization): Declare.
909 * server.c (disable_randomization): New global variable.
910 (handle_general_set): Handle QDisableRandomization.
911 (handle_query): Likewise for qSupported.
912 (main): Support --disable-randomization and --no-disable-randomization
913 command line arguments.
914 * target.h (struct target_ops): Add supports_disable_randomization.
915 (target_supports_disable_randomization): New macro.
916
723b724b
MF
9172011-09-29 Mike Frysinger <vapier@gentoo.org>
918
919 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
920 ifdef check.
921 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
922 [!PT_GETDSBT] (target_loadmap): New definition.
923 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
924 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
925 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
926 and PT_GETDSBT to LINUX_LOADMAP.
927 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
928 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
929
55329a5c 9302011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
71487fd7
UW
931
932 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
933 (arm_linux_hwbp_cap): New static variable.
934 (arm_linux_get_hwbp_cap): Replace by ...
935 (arm_linux_init_hwbp_cap): ... this new function.
936 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
937 (arm_linux_get_hw_watchpoint_count): Likewise.
938 (arm_linux_get_hw_watchpoint_max_length): Likewise.
939 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
940 (arm_prepare_to_resume): Use perror_with_name instead of error.
941
55329a5c 9422011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
09b4ad9f
UW
943
944 * linux-arm-low.c: Include <signal.h>.
945 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
946 (struct arm_linux_hwbp_cap): New data type.
947 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
948 (struct arm_linux_hw_breakpoint): New data type.
949 (MAX_BPTS, MAX_WPTS): Define.
950 (struct arch_process_info, struct arch_lwp_info): New data types.
951 (arm_linux_get_hwbp_cap): New function.
952 (arm_linux_get_hw_breakpoint_count): Likewise.
953 (arm_linux_get_hw_watchpoint_count): Likewise.
954 (arm_linux_get_hw_watchpoint_max_length): Likewise.
955 (arm_hwbp_control_initialize): Likewise.
956 (arm_hwbp_control_is_enabled): Likewise.
957 (arm_hwbp_control_is_initialized): Likewise.
958 (arm_hwbp_control_disable): Likewise.
959 (arm_linux_hw_breakpoint_equal): Likewise.
960 (arm_linux_hw_point_initialize): Likewise.
961 (struct update_registers_data): New data structure.
962 (update_registers_callback: New function.
963 (arm_insert_point): Likewise.
964 (arm_remove_point): Likewise.
965 (arm_stopped_by_watchpoint): Likewise.
966 (arm_stopped_data_address): Likewise.
967 (arm_new_process): Likewise.
968 (arm_new_thread): Likewise.
969 (arm_prepare_to_resume): Likewise.
970 (the_low_target): Register arm_insert_point, arm_remove_point,
971 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
972 arm_new_thread, and arm_prepare_to_resume.
973
6b9801d4
SS
9742011-09-15 Stan Shebs <stan@codesourcery.com>
975
976 * server.h (struct emit_ops): Add compare-goto fields.
977 * tracepoint.c (gdb_agent_op_sizes): New table.
978 (emit_eq_goto): New function.
979 (emit_ne_goto): New function.
980 (emit_lt_goto): New function.
981 (emit_le_goto): New function.
982 (emit_gt_goto): New function.
983 (emit_ge_goto): New function.
984 (is_goto_target): New function.
985 (compile_bytecodes): Recognize special cases of compare-goto
986 combinations and call specialized emitters for them.
987 * linux-x86-low.c (amd64_emit_eq_goto): New function.
988 (amd64_emit_ne_goto): New function.
989 (amd64_emit_lt_goto): New function.
990 (amd64_emit_le_goto): New function.
991 (amd64_emit_gt_goto): New function.
992 (amd64_emit_ge_goto): New function.
993 (amd64_emit_ops): Add the new functions.
994 (i386_emit_eq_goto): New function.
995 (i386_emit_ne_goto): New function.
996 (i386_emit_lt_goto): New function.
997 (i386_emit_le_goto): New function.
998 (i386_emit_gt_goto): New function.
999 (i386_emit_ge_goto): New function.
1000 (i386_emit_ops): Add the new functions.
1001
bf15cbda
SS
10022011-09-08 Stan Shebs <stan@codesourcery.com>
1003
1004 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
1005 (i386_emit_epilogue): Restore %ebx.
1006
943ca1dd
JZ
10072011-08-31 Jie Zhang <jzhang918@gmail.com>
1008
1009 * server.c (step_thread): Remove definition.
1010 (process_serial_event): Don't handle Hs.
1011 * server.h (step_thread): Remove declaration.
1012 * target.c (set_desired_inferior): Remove use of step_thread.
1013
e3deef73
LM
10142011-08-24 Luis Machado <lgustavo@codesourcery.com>
1015
1016 * linux-low.c: Include linux-procfs.h.
1017 (linux_attach_lwp_1): Update comments.
1018 (linux_attach): Scan for existing threads when attaching to a
1019 process that is the tgid.
1020 * Makefile.in: Update dependencies.
1021
13da1c97
LM
10222011-08-24 Luis Machado <lgustavo@codesourcery.com>
1023
1024 * configure.srv: Add linux-procfs.o dependencies.
1025
881127c9
YQ
10262011-08-14 Yao Qi <yao@codesourcery.com>
1027
1028 * target.h (struct target_ops): Fix indent.
1029 * win32-low.c (win32_target_ops): Fix comment.
1030
58dbd541
YQ
10312011-08-14 Andrew Jenner <andrew@codesourcery.com>
1032 Yao Qi <yao@codesourcery.com>
1033
1034 * Makefile.in (clean): Remove tic6x-*.c files.
1035 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
1036 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
1037 (tic6x-c64xp-linux.c): Likewise.
1038 * configure.srv: Add support for tic6x-*-uclinux.
1039 * linux-tic6x-low.c: New.
1040 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
1041
78d85199
YQ
10422011-08-14 Andrew Stubbs <ams@codesourcery.com>
1043 Yao Qi <yao@codesourcery.com>
1044
1045 * target.h (struct target_ops): Add read_loadmap.
1046 * linux-low.c (struct target_loadseg): New type.
1047 (struct target_loadmap): New type.
1048 (linux_read_loadmap): New function.
1049 (linux_target_ops): Add linux_read_loadmap.
1050 * server.c (handle_query): Support qXfer:fdpic:read packet.
1051 * win32-low.c (win32_target_ops): Initialize field `read_loadmap' to NULL.
1052
a959a88d
EZ
10532011-08-05 Eli Zaretskii <eliz@gnu.org>
1054
1055 * win32-low.c: Include <stdint.h>.
1056
1ced966e
PA
10572011-07-22 Pedro Alves <pedro@codesourcery.com>
1058
1059 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
1060 to the inferior here.
1061 (i386_remove_aligned_watchpoint): Ditto.
1062 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
1063 fit part of the watchpoint in the debug registers.
1064 (i386_update_inferior_debug_regs): New.
1065 (i386_low_insert_watchpoint): Work on a local mirror of the debug
1066 registers, and only update the inferior on success.
1067 (i386_low_remove_watchpoint): Ditto.
1068
d26e3629
KY
10692011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
1070
1071 * linux-low.c (compare_ints, unique, list_threads, show_process,
1072 linux_core_of_thread): Delete.
1073 (linux_target_ops): Change linux_core_of_thread to
1074 linux_common_core_of_thread.
1075 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
1076 * utils.c (malloc_failure): Change type of argument.
1077 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
1078 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
1079 common/linux-osdata.c, common/ptid.c and common/buffer.c.
1080 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
1081 (IPA_OBJS): Add common-utils-ipa.o.
1082 (ptid_h, linux_osdata_h): New macros.
1083 (server_h): Add common/common-utils.h, common/xml-utils.h,
1084 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
1085 common/ptid.h.
1086 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
1087 ptid.o, buffer.o): New rules.
1088 (linux-low.o): Add common/linux-osdata.h as a dependency.
1089 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
1090 * configure.ac: Add AC_HEADER_DIRENT check.
1091 * config.in: Regenerate.
1092 * configure: Regenerate.
1093 * remote-utils.c (xml_escape_text): Delete.
1094 (buffer_grow, buffer_free, buffer_init, buffer_finish,
1095 buffer_xml_printf): Move to common/buffer.c.
1096 * server.c (main): Remove call to initialize_inferiors.
1097 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
1098 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
1099 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
1100 internal_error, gdb_assert, gdb_assert_fail): Delete.
1101 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
1102 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
1103 common/buffer.h.
1104 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
1105 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
1106 initialize_inferiors): Delete.
1107
2275a1a7
PA
11082011-07-20 Pedro Alves <pedro@codesourcery.com>
1109
1110 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
1111 symbol error.
1112
0a5b1e09
PA
11132011-05-31 Pedro Alves <pedro@codesourcery.com>
1114
1115 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
1116 assertion.
1117 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
1118
6938fd34
YQ
11192011-05-26 Yao Qi <yao@codesourcery.com>
1120
1121 * Makefile.in (thread-db.o): Track dependence to
1122 common/gdb_thread_db.h.
1123 * thread-db.c: include gdb_thread_db.h from right place.
1124
b481f9e0
TT
11252011-05-16 Adrian Cornish <gnu@bluedreamer.com>
1126
1127 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
1128 __FILE__ and __LINE__ to internal_error.
1129
98a5dd13
DE
11302011-05-13 Doug Evans <dje@google.com>
1131
1132 * thread-db.c (try_thread_db_load_from_sdir): New function.
1133 (try_thread_db_load_from_dir): New function.
1134 (thread_db_load_search): Handle $sdir, ignore $pdir.
1135 Remove trying of system directories if search of
1136 libthread-db-search-path fails, that is now done via $sdir.
1137
d248b706
KY
11382011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
1139
1140 * server.c (handle_query): Add EnableDisableTracepoints to the list
1141 of supported features.
1142 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
1143 tracepoints.
1144 (cmd_qtenable_disable): New.
1145 (cmd_qtstart): Install tracepoints even if disabled.
1146 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
1147 receiving a QTEnable or QTDisable packet.
1148 (gdb_collect): Skip data collection if fast tracepoint is disabled.
1149 (ust_marker_to_static_tracepoint): Do not ignore disabled static
1150 tracepoints.
1151 (gdb_probe): Skip data collection if static tracepoint is disabled.
1152
84e578fb
DE
11532011-05-10 Doug Evans <dje@google.com>
1154
1155 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
1156
71f55dd8
DE
11572011-05-04 Doug Evans <dje@google.com>
1158
1159 * linux-low.c (linux_join): Skip process lookup.
1160 * spu-low.c (spu_join): Ditto.
1161 * server.c (join_inferiors_callback): Delete.
1162 (process_serial_event): For 'D' packet (detach) call join_inferior
1163 directly.
1164
4d393d60
JM
11652011-05-04 Joseph Myers <joseph@codesourcery.com>
1166
1167 * README: Don't mention xscale*-*-linux*.
1168 * configure.srv (xscale*-*-linux*): Don't handle target.
1169
b00ad6ff
NF
11702011-04-27 Nathan Froyd <froydnj@codesourcery.com>
1171
1172 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
1173 casting pointers.
1174 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
1175 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
1176 (i386_emit_void_call_2): Likewise.
1177
af96c192
YQ
11782011-04-26 Yao Qi <yao@codesourcery.com>
1179
1180 * linux-low.c: Move common macros to linux-ptrace.h.
1181 Include linux-ptrace.h.
1182 * Makefile.in (linux_ptrace_h): New.
1183 (linux-low.o): Depends on linux-ptrace.h.
1184
03f2bd59
JK
11852011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
1186
1187 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
1188 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
1189 (remote_prepare): New function with most of the TCP code from ...
1190 (remote_open): ... here. Detect PORT here unconditionally. Move also
1191 setting transport_is_reliable.
1192 * server.c (run_once): New variable.
1193 (gdbserver_usage): Document it.
1194 (main): Set run_once for `--once'. Call remote_prepare. Exit after
1195 the first run if RUN_ONCE.
1196 * server.h (run_once, remote_prepare): New declarations.
1197
7a9dd1b2
TT
11982011-04-19 Tom Tromey <tromey@redhat.com>
1199
1200 * win32-low.c (handle_load_dll): Remove duplicate "the".
1201
81239425
PM
12022011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
1203
1204 Remove support for old Cygwin 1.5 versions.
1205 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
1206 function to avoid warning.
1207 (win32_add_one_solib): Use cygwin_conv_path function to avoid
1208 warning.
1209
9e0627f1
PM
12102011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
1211
1212 * gdbserver/server.h (Macro _): Define it if not available.
1213
588eebee
MS
12142011-03-14 Michael Snyder <msnyder@vmware.com>
1215
348af9f7 1216 * hostio.c (handle_close): Remove unnecessary null test.
588eebee 1217
43f70d4c
JB
12182011-03-10 Joel Brobecker <brobecker@adacore.com>
1219
1220 * Makefile.in (maintainer-clean realclean distclean): Remove
1221 "make ... subdir_do" command.
1222
348af9f7
MS
12232011-03-10 Michael Snyder <msnyder@vmware.com>
1224
1225 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
1226
1227 * server.c (handle_v_run): Free alloced buffer on early return.
1228
e637a4f5
YQ
12292011-03-09 Yao Qi <yao@codesourcery.com>
1230
1231 Revert:
1232 2011-03-04 Yao Qi <yao@codesourcery.com>
1233
1234 * Makefile.in: Remove GNU make feature --directory.
1235
1236 2011-03-05 Yao Qi <yao@codesourcery.com>
1237
1238 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
1239 (subdir_do): New make target. Copied from gdb/Makefile.
1240 (maintainer-clean, realclean, distclean, clean): Call corresponding
1241 make targets in common/Makefile.
1242
1243 2011-02-11 Yao Qi <yao@codesourcery.com>
1244
1245 * configure.ac: Call AC_PROG_RANLIB.
1246 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
1247 * configure: Regenerate.
1248
e6edda56
JK
12492011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
1250
1251 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
1252
e5141119
JB
12532011-03-06 Yao Qi <yao@codesourcery.com>
1254
1255 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
1256
64794aa4
JB
12572011-03-05 Yao Qi <yao@codesourcery.com>
1258
1259 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
1260 (subdir_do): New make target. Copied from gdb/Makefile.
1261 (maintainer-clean, realclean, distclean, clean): Call corresponding
1262 make targets in common/Makefile.
1263
7a762829
YQ
12642011-03-04 Yao Qi <yao@codesourcery.com>
1265
1266 * Makefile.in: Remove GNU make feature --directory.
1267
348af9f7
MS
12682011-03-04 Michael Snyder <msnyder@vmware.com>
1269
1270 * server.c (queue_stop_reply): Call xmalloc not malloc.
1271
12722011-03-02 Michael Snyder <msnyder@vmware.com>
1273
1274 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
1275
9f72fee2
MS
12762011-02-28 Michael Snyder <msnyder@vmware.com>
1277
588eebee
MS
1278 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
1279 (cmd_qtframe): Ditto.
1280 (cmd_qtbuffer): Ditto.
1281 (cmd_bigqtbuffer): Ditto.
1282
9f72fee2
MS
1283 * utils.c (decimal2str): Initialize 'width' to nine, then
1284 don't mess with it.
1285
8040bd49
UW
12862011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
1287
1288 * hostio.c (require_data): Free *data, not data.
1289
7e52cbd0
JK
12902011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
1291
1292 * hostio.c (require_data): Use free, not xfree.
1293
9130f83e
MS
12942011-02-27 Michael Snyder <msnyder@vmware.com>
1295
4b812f4e
MS
1296 * server.c (handle_query): Discard unused value.
1297
9130f83e
MS
1298 * hostio.c (require_data): Free malloc memory before returning
1299 error.
1300
69d37113
MS
13012011-02-26 Michael Snyder <msnyder@vmware.com>
1302
1303 * linux-low.c (list_threads): Call closedir for dirent.
1304
35f5825a
MS
13052011-02-27 Michael Snyder <msnyder@vmware.com>
1306
2a589cef
MS
1307 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
1308 a case statement falls through.
1309
0adea5f7
MS
1310 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
1311
35f5825a
MS
1312 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
1313 in comparison.
1314
238f1c74
MS
13152011-02-26 Michael Snyder <msnyder@vmware.com>
1316
1317 * utils.c (decimal2str): Eliminate dead code and dead param.
1318 (pulongest): Drop dead param from call to decimal2str.
1319 (plongest): Ditto.
1320
633ff500
JB
13212011-02-24 Joel Brobecker <brobecker@adacore.com>
1322
1323 Revert the following patch (not approved yet):
1324 2011-02-21 Hui Zhu <teawater@gmail.com>
1325 * tracepoint.c (tp_printf): New function.
1326 (eval_agent_expr): Handle gdb_agent_op_printf.
1327
f9c6ff72
HZ
13282011-02-21 Hui Zhu <teawater@gmail.com>
1329
1330 * tracepoint.c (tp_printf): New function.
1331 (eval_agent_expr): Handle gdb_agent_op_printf.
1332
94d5e490
TT
13332011-02-18 Tom Tromey <tromey@redhat.com>
1334
1335 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
1336 (tracepoint.o): Likewise.
1337 * tracepoint.c (enum gdb_agent_op): Use ax.def.
1338 (gdb_agent_op_names): Likewise.
1339
c7f96d2b
TT
13402011-02-18 Tom Tromey <tromey@redhat.com>
1341
1342 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
1343 gdb_agent_op_rot>: New constants.
1344 (gdb_agent_op_names): Add pick and roll.
1345 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
1346 cases.
1347
0feedb2c
JK
13482011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
1349
1350 * aclocal.m4: Regenerated with aclocal-1.11.1.
1351
b3b9301e
PA
13522011-02-14 Pedro Alves <pedro@codesourcery.com>
1353
1354 * server.c (handle_qxfer_traceframe_info): New.
1355 (qxfer_packets): Register "traceframe-info".
1356 (handle_query): Report support for qXfer:traceframe-info:read+.
1357 * tracepoint.c (match_blocktype): New.
1358 (traceframe_find_block_type): Rename to ...
1359 (traceframe_walk_blocks): ... this. Add callback filter argument,
1360 and use it.
1361 (traceframe_find_block_type): New, reimplemented on top of
1362 traceframe_walk_blocks.
1363 (build_traceframe_info_xml): New.
1364 (traceframe_read_info): New.
1365 * server.h (traceframe_read_info): Declare.
1366
4f3e6fb7
YQ
13672011-02-11 Yao Qi <yao@codesourcery.com>
1368
1369 * configure.ac: Call AC_PROG_RANLIB.
1370 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
1371 * configure: Regenerate.
1372
764880b7
PA
13732011-02-07 Pedro Alves <pedro@codesourcery.com>
1374
1375 * server.c (gdb_read_memory): Change return semantics to allow
1376 partial transfers.
1377 (handle_search_memory_1): Adjust.
1378 (process_serial_event) <'m' packet>: Handle partial transfers.
1379 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
1380
1c79eb8a
PA
13812011-01-28 Pedro Alves <pedro@codesourcery.com>
1382
1383 * regcache.c (init_register_cache): Initialize
1384 regcache->register_status.
1385 (free_register_cache): Release regcache->register_status.
1386 (regcache_cpy): Copy register_status.
1387 (registers_to_string): Print 'x's for unavailable registers.
1388 (supply_register): Mark the register's status valid or
1389 unavailable, depending on whether a buffer was passed in or not.
1390 (supply_register_zeroed): New.
1391 (supply_regblock): Mark the registers' status valid or
1392 unavailable, depending on whether a buffer was passed in or not.
1393 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
1394 (struct regcache): New `register_status' field.
1395 (supply_register_zeroed): Declare.
1396 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
1397 supply_register_zeroed, rather than passing a NULL buffer to
1398 supply_register.
1399 * tracepoint.c (fetch_traceframe_registers): Update comment.
1400
85724a0e
PA
14012011-01-28 Pedro Alves <pedro@codesourcery.com>
1402
1403 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
1404 buffer explicit.
1405
d08aafef
PA
14062011-01-25 Pedro Alves <pedro@codesourcery.com>
1407
1408 * server.h (decode_xfer_write): Change prototype.
1409 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
1410 and don't extract the annex here.
1411 * server.c (decode_xfer_read): Remove `annex' parameter,
1412 and don't extract the annex here.
1413 (decode_xfer): New.
1414 (struct qxfer): New.
1415 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
1416 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
1417 (handle_qxfer_statictrace): New functions, abstracted out from
1418 handle_query, and made to use the struct qxfer interface.
1419 (handle_threads_qxfer_proper): Rename to ...
1420 (handle_qxfer_threads_proper): ... this.
1421 (handle_threads_qxfer): Rename to ...
1422 (handle_qxfer_threads): ... this. Adjust.
1423 (qxfer_packets): New array.
1424 (handle_qxfer): New function.
1425 (handle_query): Use handle_qxfer.
1426
493e2a69
MS
14272011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
1428
1429 * gdbreplay.c: Shorten lines of >= 80 columns.
1430 * linux-low.c: Ditto.
1431 * linux-ppc-low.c: Ditto.
1432 * linux-s390-low.c: Ditto.
1433 * linux-sparc-low.c: Ditto.
1434 * linux-x86-low.c: Ditto.
1435 * linux-xtensa-low.c: Ditto.
1436 * mem-break.c: Ditto.
1437 * nto-low.c: Ditto.
1438 * regcache.h: Ditto.
1439 * remote-utils.c: Ditto.
1440 * server.c: Ditto.
1441 * server.h: Ditto.
1442 * thread-db.c: Ditto.
1443 * tracepoint.c: Ditto.
1444 * utils.c: Ditto.
1445 * win32-low.h: Ditto.
1446
44944448
JB
14472011-01-05 Joel Brobecker <brobecker@adacore.com>
1448
1449 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
1450 update.
1451
71ce852c
JB
14522011-01-01 Joel Brobecker <brobecker@adacore.com>
1453
1454 * server.c (gdbserver_version): Update copyright year in version
1455 output.
1456 * gdbreplay.c (gdbreplay_version): Ditto.
1457
eb826dc6
MF
14582010-12-29 Jie Zhang <jie.zhang@analog.com>
1459
1460 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
1461 * linux-bfin-low.c: New file.
1462 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
1463 PT_DATA_ADDR for BFIN targets.
1464 * Makefile.in (SFILES): Add linux-bfin-low.c.
1465 (clean): Remove reg-bfin.c.
1466 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
1467 * README: Mention supported Blackfin targets.
1468
39ab222a
MF
14692010-12-23 Mike Frysinger <vapier@gentoo.org>
1470
1471 * .gitignore: New file.
1472
a1f2ce7d
MF
14732010-11-16 Mike Frysinger <vapier@gentoo.org>
1474
1475 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
1476
f474844c
JZ
14772010-10-22 Jie Zhang <jie@codesourcery.com>
1478
1479 * Makefile.in: Add FLAGS_TO_PASS variable.
1480 (install): Remove dependency of install-only and recursively
1481 invoke make for install-only.
1482
f1048712
DE
14832010-10-04 Doug Evans <dje@google.com>
1484
1485 * Makefile.in (uninstall): Use $(DESTDIR).
1486
b53a1623
PA
14872010-09-24 Pedro Alves <pedro@codesourcery.com>
1488
e6ee044d
PA
1489 PR gdb/11842
1490
b53a1623
PA
1491 * linux-x86-low.c (compat_siginfo_from_siginfo)
1492 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
1493 si_code is < 0. Check for si_code == SI_TIMER before checking for
1494 si_code < 0.
1495
fa1bd1e4
JB
14962010-09-13 Joel Brobecker <brobecker@adacore.com>
1497
1498 * lynx-i386-low.c: New file.
1499 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
1500
47fac8f8
JB
15012010-09-13 Joel Brobecker <brobecker@adacore.com>
1502
1503 * lynx-low.c (ptrace_request_to_str): Remove handling for
1504 request values that have been removed in LynxOS 5.x.
1505
1adfc54d
JB
15062010-09-13 Joel Brobecker <brobecker@adacore.com>
1507
1508 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
1509 <ptrace.h>
1510
c2a66c29
NS
15112010-09-09 Nathan Sidwell <nathan@codesourcery.com>
1512
1513 * configure.ac: Add --enable-inprocess-agent option.
1514 * configure: Rebuilt.
1515
32fcada3
YQ
15162010-09-06 Yao Qi <yao@codesourcery.com>
1517
1518 * linux-low.c (linux_kill): Remove unused variable.
1519 (linux_stabilize_threads): Likewise.
1520 * server.c (start_inferior): Likewise.
1521 (queue_stop_reply_callback): Likewise.
1522 * tracepoint.c (do_action_at_tracepoint): Likewise.
1523
0cccb683
YQ
15242010-09-06 Yao Qi <yao@codesourcery.com>
1525
1526 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
1527 on return.
1528
423ec54c
JK
15292010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
1530
1531 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
1532
12ac6819
PA
15332010-09-06 Pedro Alves <pedro@codesourcery.com>
1534
1535 * Makefile.in (install-only): Replace $IPA_DEPFILES with
1536 "$(IPA_DEPFILES)".
1537
8ed54b31
JB
15382010-09-01 Joel Brobecker <brobecker@adacore.com>
1539
1540 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
1541 gdbserver/lynx-ppc-low.c: New files.
1542 * Makefile.in (lynx_low_h): New variable.
1543 (lynx-low.o, lynx-ppc-low.o): New rules.
1544 * configure.ac: On LynxOS, link with -lnetinet.
1545 * configure.srv: Add handling of powerpc-*-lynxos* targets.
1546 * configure: regenerate.
1547
bb0116a4
JB
15482010-09-01 Joel Brobecker <brobecker@adacore.com>
1549
1550 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
1551 * configure.ac: Add check for vasprintf and vsnprintf.
1552 * configure, config.in: Regenerate.
1553 * server.h (vasprintf, vsnprintf): Add conditional declarations.
1554
a778ab81 15552010-09-01 Joel Brobecker <brobecker@adacore.com>
1556
1557 * gdbreplay.c: Move include of alloca.h up, next to include of
1558 malloc.h.
1559 * server.h: Add include of malloc.h.
1560 * mem-break.c: Remove include of malloc.h.
1561 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
1562
8b034a19 15632010-09-01 Joel Brobecker <brobecker@adacore.com>
1564
1565 * Makefile.in (memmem.o): Build with -Wno-error.
1566
15672010-09-01 Joel Brobecker <brobecker@adacore.com>
1568
1569 * utils.c (xsnprintf): Make non-static.
1570 * server.h: Add xsnprintf declaration.
1571 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
1572 replace calls to snprintf by calls to xsnprintf throughout.
1573
15742010-09-01 Joel Brobecker <brobecker@adacore.com>
1575
1576 * configure.ac: Add configure check for alloca.
1577 * configure, config.in: Regenerate.
1578 * server.h: Include alloca.h if it exists.
1579 * gdbreplay.c: Include alloca.h if it exists.
1580
1a981360
PA
15812010-08-28 Pedro Alves <pedro@codesourcery.com>
1582
1583 * linux-low.c (__SIGRTMIN): Define if not already defined.
1584 (linux_create_inferior): Check for __ANDROID__ rather than
1585 __SIGRTMIN.
1586 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
1587 are already deferred.
1588 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
1589 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
1590 stopped and already has a pending signal to report.
1591 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
1592 a pending signal to report or is moving out of a jump pad.
1593 (linux_init_signals): Check for __ANDROID__ rather than
1594 __SIGRTMIN.
1595
b4d51a55
PA
15962010-08-28 Pedro Alves <pedro@codesourcery.com>
1597
1598 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
1599 debug_threads check. Avoid a linear search when not doing debug
1600 output.
1601
ec48365d
PA
16022010-08-27 Pedro Alves <pedro@codesourcery.com>
1603
1604 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
1605 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
1606 (struct file_handler) <fd>: Change type to gdb_fildes_t.
1607 (process_event): Change local fd's type to gdb_fildes_t.
1608 (create_file_handler): Adjust prototype.
1609 (delete_file_handler): Adjust prototype.
1610 (handle_file_event): Adjust prototype. Use pfildes.
1611 (create_file_event): Adjsut prototype.
1612 * remote-utils.c (remote_desc, listen_desc): Change type to
1613 gdb_fildes_t.
1614 * server.h: New gdb_fildes_t typedef.
1615 [USE_WIN32API]: Include winsock2.h.
1616 (delete_file_handler, add_file_handler): Adjust prototypes.
1617 (pfildes): Declare.
1618 * utils.c (pfildes): New.
1619
854d88f0
PA
16202010-08-27 Pedro Alves <pedro@codesourcery.com>
1621
1622 * configure.ac (build_warnings): Add -Wno-char-subscripts.
1623 * configure: Regenerate.
1624
0146f85b
PA
16252010-08-27 Pedro Alves <pedro@codesourcery.com>
1626
1627 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
1628 (linux_done_accessing_memory): ... this.
1629 (linux_target_ops): Adjust.
1630 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
1631 * nto-low.c (nto_target_ops): Adjust comment.
1632 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
1633 * spu-low.c (spu_target_ops): Adjust comment.
1634 * target.h (target_ops): Rename unprepare_to_access_memory field
1635 to done_accessing_memory.
1636 (unprepare_to_access_memory): Rename to ...
1637 (done_accessing_memory): ... this.
1638
90d74c30
PA
16392010-08-26 Pedro Alves <pedro@codesourcery.com>
1640
1641 * linux-low.c (linux_prepare_to_access_memory): New.
1642 (linux_unprepare_to_access_memory): New.
1643 (linux_target_ops): Install them.
1644 * server.c (read_memory): Rename to ...
1645 (gdb_read_memory): ... this. Use
1646 prepare_to_access_memory/prepare_to_access_memory.
1647 (write_memory): Rename to ...
1648 (gdb_write_memory): ... this. Use
1649 prepare_to_access_memory/prepare_to_access_memory.
1650 (handle_search_memory_1): Adjust.
1651 (process_serial_event): Adjust.
1652 * target.h (struct target_ops): New fields
1653 prepare_to_access_memory and unprepare_to_access_memory.
1654 (prepare_to_access_memory, unprepare_to_access_memory): New.
1655 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
1656 prepare_to_access_memory/prepare_to_access_memory.
1657 * nto-low.c (nto_target_ops): Adjust.
1658 * spu-low.c (spu_target_ops): Adjust.
1659 * win32-low.c (win32_target_ops): Adjust.
1660
fd467969
PA
16612010-08-26 Pedro Alves <pedro@codesourcery.com>
1662
1663 * Makefile.in (WARN_CFLAGS): Get it from configure.
1664 (WERROR_CFLAGS): New.
1665 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
1666 * configure.ac: Introduce --enable-werror, which adds -Werror to
1667 the compiler command line. Enabled by default. Disable with
1668 --disable-werror. Add -Wdeclaration-after-statement
1669 Wpointer-arith and -Wformat-nonliteral to warning flags.
1670 * configure: Regenerate.
1671
331e2f5f
PA
16722010-08-26 Pedro Alves <pedro@codesourcery.com>
1673
1674 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
1675
e581f2b4
PA
16762010-08-26 Pedro Alves <pedro@codesourcery.com>
1677
1678 * gdbreplay.c (remote_error): New.
1679 (gdbchar): New.
1680 (expect): Use gdbchar. Check for error reading from GDB.
1681 Clarify sync error output.
1682 (play): Check for errors writing to GDB.
1683 * linux-low.c (sigchld_handler): Really ignore `write' errors.
1684 * remote-utils.c (getpkt): Check for errors writing to the remote
1685 descriptor.
1686
3c11dd79
PA
16872010-08-25 Pedro Alves <pedro@codesourcery.com>
1688
1689 * linux-low.c (linux_wait_1): Move non-debugging code out of
1690 `debug_threads' control.
1691
d20a8ad9
PA
16922010-08-25 Pedro Alves <pedro@codesourcery.com>
1693
1694 * linux-low.c (linux_wait_1): Don't set last_status here.
1695 * server.c (push_event, queue_stop_reply_callback): Assert we're
1696 not pushing a TARGET_WAITKIND_IGNORE event.
1697 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
1698 (myresume, handle_target_event): Set the thread's last_resume_kind
1699 and last_status from the target returned status.
1700
964e4306
PA
17012010-08-25 Pedro Alves <pedro@codesourcery.com>
1702
1703 PR threads/10729
1704
1705 * linux-x86-low.c (update_debug_registers_callback): New.
1706 (i386_dr_low_set_addr): Use it.
1707 (i386_dr_low_get_addr): New.
1708 (i386_dr_low_set_control): Use update_debug_registers_callback.
1709 (i386_dr_low_get_control): New.
1710 (i386_dr_low_get_status): Adjust.
1711 * linux-low.c (linux_stop_lwp): New.
1712 * linux-low.h (linux_stop_lwp): Declare.
1713
1714 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
1715 argument instead of a i386_debug_reg_state.
1716 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
1717 a i386_debug_reg_state.
1718 (i386_insert_aligned_watchpoint): Adjust.
1719 (i386_remove_aligned_watchpoint): Adjust.
1720 (i386_low_stopped_data_address): Read the debug registers from the
1721 inferior instead of from the mirrors.
1722 * i386-low.h (struct i386_debug_reg_state): Extend comment.
1723 (i386_dr_low_get_addr): Declare.
1724 (i386_dr_low_get_control): Declare.
1725 (i386_dr_low_get_status): Change prototype.
1726
1727 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
1728 (i386_dr_low_get_addr): New.
1729 (i386_dr_low_get_control): New.
1730 (i386_dr_low_get_status): Adjust prototype. Return
1731 dr_status_mirror.
1732 (i386_initial_stuff): Clear dr_status_mirror and
1733 dr_control_mirror.
1734 (i386_get_thread_context): Adjust.
1735 (i386_set_thread_context): Adjust.
1736 (i386_thread_added): Adjust.
1737
5f21a75b
PA
17382010-08-24 Pedro Alves <pedro@codesourcery.com>
1739
1740 * linux-low.h (linux_thread_area): Delete declaration.
1741
3e4c1235
TS
17422010-08-11 Thomas Schwinge <thomas@codesourcery.com>
1743
1744 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
1745 after its termination.
1746
1971b033
PA
17472010-08-09 Pedro Alves <pedro@codesourcery.com>
1748
1749 * linux-low.c (gdb_wants_lwp_stopped): Delete.
1750 (gdb_wants_all_stopped): Delete.
1751 (linux_wait_1): Don't call them.
1752 * server.c (handle_v_cont): Tag all threads as want-stopped.
1753 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
1754 stopped as "client-wants-stopped".
1755
310444ac
PA
17562010-07-31 Pedro Alves <pedro@codesourcery.com>
1757
1758 * Makefile.in (signals_h): New.
1759 (server_h): Depend on it.
1760 (server.o): Don't depend on $(signals_def).
1761 (signals.o): Depend on $(signals_def).
1762
a19cae16
JK
17632010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
1764
1765 * Makefile.in (signals_def): New.
1766 (server_h): Append include/gdb/signals.h and signals_def.
1767 (server.o): Append signals_def.
1768
30d50328
JK
17692010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
1770
1771 * server.c (handle_target_event): Use target_signal_to_host for
1772 resume_info.sig initialization.
1773 * target.h (struct thread_resume) <sig>: New comment.
1774
5c3216e2
OS
17752010-07-20 Ozkan Sezer <sezeroz@gmail.com>
1776
c6f46ca0
OS
1777 * server.c (handle_query): strcpy() the returned string from paddress()
1778 instead of sprintf().
5c3216e2
OS
1779 * utils.c (paddress): Return phex_nz().
1780
6bd31874
JB
17812010-07-07 Joel Brobecker <brobecker@adacore.com>
1782
1783 * server.c (handle_v_cont): Call mourn_inferior if process
1784 just exited.
1785 (myresume): Likewise.
1786
0fb4aa4b
PA
17872010-07-01 Pedro Alves <pedro@codesourcery.com>
1788
1789 Static tracepoints, and integration with UST.
1790
1791 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
1792 * mem-break.c (uninsert_all_breakpoints)
1793 (reinsert_all_breakpoints): New.
1794 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
1795 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
1796 (gdb_agent_ust_loaded, helper_thread_id)
1797 (gdb_agent_helper_thread_id): New macros.
1798 (struct ipa_sym_addresses): Add addr_ust_loaded,
1799 addr_helper_thread_id, addr_cmd_buf.
1800 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
1801 (in_process_agent_loaded_ust): New.
1802 (write_e_ust_not_loaded): New.
1803 (maybe_write_ipa_ust_not_loaded): New.
1804 (struct collect_static_trace_data_action): New.
1805 (enum tracepoint_type) <static_tracepoint>: New.
1806 (struct tracepoint) <handle>: Mention static tracepoints.
1807 (struct static_tracepoint_ctx): New.
1808 (CMD_BUF_SIZE): New.
1809 (add_tracepoint_action): Handle static tracepoint actions.
1810 (unprobe_marker_at): New.
1811 (clear_installed_tracepoints): Handle static tracepoints.
1812 (cmd_qtdp): Handle static tracepoints.
1813 (probe_marker_at): New.
1814 (cmd_qtstart): Handle static tracepoints.
1815 (response_tracepoint): Handle static tracepoints.
1816 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
1817 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
1818 (get_context_regcache): Handle static tracepoints.
1819 (do_action_at_tracepoint): Handle static tracepoint actions.
1820 (traceframe_find_block_type): Handle static trace data blocks.
1821 (traceframe_read_sdata): New.
1822 (download_tracepoints): Download static tracepoint actions.
1823 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
1824 (GDB_PROBE_NAME): New.
1825 (ust_ops): New.
1826 (GET_UST_SYM): New.
1827 (USTF): New.
1828 (dlsym_ust): New.
1829 (ust_marker_to_static_tracepoint): New.
1830 (gdb_probe): New.
1831 (collect_ust_data_at_tracepoint): New.
1832 (gdb_ust_probe): New.
1833 (UNIX_PATH_MAX, SOCK_DIR): New.
1834 (gdb_ust_connect_sync_socket): New.
1835 (resume_thread, stop_thread): New.
1836 (run_inferior_command): New.
1837 (init_named_socket): New.
1838 (gdb_ust_socket_init): New.
1839 (cstr_to_hexstr): New.
1840 (next_st): New.
1841 (first_marker, next_marker): New.
1842 (response_ust_marker): New.
1843 (cmd_qtfstm, cmd_qtsstm): New.
1844 (unprobe_marker_at, probe_marker_at): New.
1845 (cmd_qtstmat, gdb_ust_thread): New.
1846 (gdb_ust_init): New.
1847 (initialize_tracepoint_ftlib): Call gdb_ust_init.
1848 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
1849 (ST_REGENTRY): New.
1850 (x86_64_st_collect_regmap): New.
1851 (X86_64_NUM_ST_COLLECT_GREGS): New.
1852 (AMD64_RIP_REGNUM): New.
1853 (supply_static_tracepoint_registers): New.
1854 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
1855 (ST_REGENTRY): New.
1856 (i386_st_collect_regmap): New.
1857 (i386_NUM_ST_COLLECT_GREGS): New.
1858 (supply_static_tracepoint_registers): New.
1859 * server.c (handle_query): Handle qXfer:statictrace:read.
1860 <qSupported>: Report support for StaticTracepoints, and
1861 qXfer:statictrace:read features.
1862 * server.h (traceframe_read_sdata)
1863 (supply_static_tracepoint_registers): Declare.
1864 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
1865 (unpack_varlen_hex): Include in IPA build.
1866 * Makefile.in (ustlibs, ustinc): New.
1867 (IPA_OBJS): Add remote-utils-ipa.o.
1868 ($(IPA_LIB)): Link -ldl and -lpthread.
1869 (UST_CFLAGS): New.
1870 (IPAGENT_CFLAGS): Add UST_CFLAGS.
1871 * config.in, configure: Regenerate.
1872
9e4344e5
PA
18732010-06-20 Ian Lance Taylor <iant@google.com>
1874 Pedro Alves <pedro@codesourcery.com>
1875
1876 * linux-x86-low.c (always_true): Delete.
1877 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
1878 trying to fool the compiler with always_true.
1879
c6beb2cb
PA
18802010-06-20 Pedro Alves <pedro@codesourcery.com>
1881
1882 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
1883 conditions in gdbserver.
1884
d2ed6730
UW
18852010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
1886
1887 * spu-low.c (spu_read_memory): Wrap around local store limit.
1888 (spu_write_memory): Likewise.
1889
4e29fb54
PA
18902010-06-15 Pedro Alves <pedro@codesourcery.com>
1891
1892 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
1893 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
1894 LONGEST uses.
1895 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
1896 uses.
1897 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
1898 uses with LONGEST uses.
1899
6a271cae
PA
19002010-06-14 Stan Shebs <stan@codesourcery.com>
1901 Pedro Alves <pedro@codesourcery.com>
1902
1903 Bytecode compiler.
1904
1905 * linux-x86-low.c: Include limits.h.
1906 (add_insns): New.
1907 (always_true): New.
1908 (EMIT_ASM): New.
1909 (EMIT_ASM32): New.
1910 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
1911 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
1912 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
1913 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
1914 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
1915 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
1916 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
1917 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
1918 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
1919 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
1920 (amd64_emit_void_call_2): New.
1921 (amd64_emit_ops): New.
1922 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
1923 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
1924 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
1925 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
1926 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
1927 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
1928 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
1929 (i386_emit_call, i386_emit_reg, i386_emit_pop)
1930 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
1931 (i386_emit_stack_adjust, i386_emit_int_call_1)
1932 (i386_emit_void_call_2): New.
1933 (i386_emit_ops): New.
1934 (x86_emit_ops): New.
1935 (the_low_target): Install x86_emit_ops.
1936 * server.h (struct emit_ops): New.
1937 (get_raw_reg_func_addr): Declare.
1938 (current_insn_ptr, emit_error): Declare.
1939 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
1940 (set_trace_state_variable_value): New defines.
1941 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
1942 addr_get_trace_state_variable_value and
1943 addr_set_trace_state_variable_value.
1944 (symbol_list): New fields for get_raw_reg,
1945 get_trace_state_variable_value and set_trace_state_variable_value.
1946 (condfn): New typedef.
1947 (struct tracepoint): New field `compiled_cond'.
1948 (do_action_at_tracepoint): Clear compiled_cond.
1949 (get_trace_state_variable_value, set_trace_state_variable_value):
1950 Export in the IPA.
1951 (condition_true_at_tracepoint): If there's a compiled condition,
1952 run that.
1953 (current_insn_ptr, emit_error): New globals.
1954 (struct bytecode_address): New.
1955 (get_raw_reg_func_addr): New.
1956 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
1957 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
1958 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
1959 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
1960 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
1961 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
1962 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
1963 (compile_tracepoint_condition, compile_bytecodes): New.
1964 * target.h (emit_ops): Forward declare.
1965 (struct target_ops): New field emit_ops.
1966 (target_emit_ops): New.
1967 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
1968 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
1969 * linux-low.c (linux_emit_ops): New.
1970 (linux_target_ops): Install it.
1971 * linux-low.h (struct linux_target_ops): New field emit_ops.
1972
92b72907
UW
19732010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
1974
1975 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
1976 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
1977
fa593d66
PA
19782010-06-01 Pedro Alves <pedro@codesourcery.com>
1979 Stan Shebs <stan@codesourcery.com>
1980
1981 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
1982 (all): Depend on $(extra_libraries).
1983 (install-only): Install the IPA.
1984 (IPA_OBJS, IPA_LIB): New.
1985 (clean): Remove the IPA lib.
1986 (IPAGENT_CFLAGS): New.
1987 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
1988 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
1989 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
1990 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
1991 * configure.ac: Check for atomic builtins support in the compiler.
1992 (IPA_DEPFILES, extra_libraries): Define.
1993 * configure.srv (ipa_obj): Add description.
1994 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
1995 (i[34567]86-*-linux*): Set ipa_obj.
1996 (x86_64-*-linux*): Set ipa_obj.
1997 * linux-low.c (stabilizing_threads): New.
1998 (supports_fast_tracepoints): New.
1999 (linux_detach): Stabilize threads before detaching.
2000 (handle_tracepoints): Handle internal tracing breakpoints. Assert
2001 the lwp is either not stabilizing, or is moving out of a jump pad.
2002 (linux_fast_tracepoint_collecting): New.
2003 (maybe_move_out_of_jump_pad): New.
2004 (enqueue_one_deferred_signal): New.
2005 (dequeue_one_deferred_signal): New.
2006 (linux_wait_for_event_1): If moving out of a jump pad, defer
2007 pending signals to later.
2008 (linux_stabilize_threads): New.
2009 (linux_wait_1): Check if threads need moving out of jump pads, and
2010 do it if so.
2011 (stuck_in_jump_pad_callback): New.
2012 (move_out_of_jump_pad_callback): New.
2013 (lwp_running): New.
2014 (linux_resume_one_lwp): Handle moving out of jump pads.
2015 (linux_set_resume_request): Dequeue deferred signals.
2016 (need_step_over_p): Also step over fast tracepoint jumps.
2017 (start_step_over): Also uninsert fast tracepoint jumps.
2018 (finish_step_over): Also reinsert fast tracepoint jumps.
2019 (linux_install_fast_tracepoint_jump): New.
2020 (linux_target_ops): Install linux_stabilize_threads and
2021 linux_install_fast_tracepoint_jump_pad.
2022 * linux-low.h (linux_target_ops) <get_thread_area,
2023 install_fast_tracepoint_jump_pad>: New fields.
2024 (struct lwp_info) <collecting_fast_tracepoint,
2025 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
2026 (linux_get_thread_area): Declare.
2027 * linux-x86-low.c (jump_insn): New.
2028 (x86_get_thread_area): New.
2029 (append_insns): New.
2030 (push_opcode): New.
2031 (amd64_install_fast_tracepoint_jump_pad): New.
2032 (i386_install_fast_tracepoint_jump_pad): New.
2033 (x86_install_fast_tracepoint_jump_pad): New.
2034 (the_low_target): Install x86_get_thread_area and
2035 x86_install_fast_tracepoint_jump_pad.
2036 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
2037 (struct fast_tracepoint_jump): New.
2038 (fast_tracepoint_jump_insn): New.
2039 (fast_tracepoint_jump_shadow): New.
2040 (find_fast_tracepoint_jump_at): New.
2041 (fast_tracepoint_jump_here): New.
2042 (delete_fast_tracepoint_jump): New.
2043 (set_fast_tracepoint_jump): New.
2044 (uninsert_fast_tracepoint_jumps_at): New.
2045 (reinsert_fast_tracepoint_jumps_at): New.
2046 (set_breakpoint_at): Use write_inferior_memory.
2047 (uninsert_raw_breakpoint): Use write_inferior_memory.
2048 (check_mem_read): Mask out fast tracepoint jumps.
2049 (check_mem_write): Mask out fast tracepoint jumps.
2050 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
2051 (set_fast_tracepoint_jump): Declare.
2052 (delete_fast_tracepoint_jump)
2053 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
2054 (reinsert_fast_tracepoint_jumps_at): Declare.
2055 * regcache.c: Don't compile many functions when building the
2056 in-process agent library.
2057 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
2058 the register buffer in the heap.
2059 (free_register_cache): If the register buffer isn't owned by the
2060 regcache, don't free it.
2061 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
2062 pre-existing register caches.
2063 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
2064 type.
2065 (convert_ascii_to_int): : Constify `from' parameter type.
2066 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
2067 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
2068 the needed buffer in-place.
2069 (relocate_instruction): New.
2070 * server.c (handle_query) <qSymbols>: If the target supports
2071 tracepoints, give it a chance of looking up symbols. Report
2072 support for fast tracepoints.
2073 (handle_status): Stabilize threads.
2074 (process_serial_event): Adjust.
2075 * server.h (struct fast_tracepoint_jump): Forward declare.
2076 (struct process_info) <fast_tracepoint_jumps>: New field.
2077 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
2078 (decode_X_packet, decode_M_packet): Adjust.
2079 (relocate_instruction): Declare.
2080 (in_process_agent_loaded): Declare.
2081 (tracepoint_look_up_symbols): Declare.
2082 (struct fast_tpoint_collect_status): Declare.
2083 (fast_tracepoint_collecting): Declare.
2084 (force_unlock_trace_buffer): Declare.
2085 (handle_tracepoint_bkpts): Declare.
2086 (initialize_low_tracepoint)
2087 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
2088 * target.h (struct target_ops) <stabilize_threads,
2089 install_fast_tracepoint_jump_pad>: New fields.
2090 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
2091 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
2092 [HAVE_STDINT_H]: Include stdint.h.
2093 (trace_debug_1): Rename to ...
2094 (trace_vdebug): ... this.
2095 (trace_debug): Rename to ...
2096 (trace_debug_1): ... this. Add `level' parameter.
2097 (trace_debug): New.
2098 (ATTR_USED, ATTR_NOINLINE): New.
2099 (IP_AGENT_EXPORT): New.
2100 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
2101 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
2102 (about_to_request_buffer_space, trace_buffer_is_full)
2103 (stopping_tracepoint, expr_eval_result, error_tracepoint)
2104 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
2105 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
2106 (traceframe_write_count, traceframes_created)
2107 (trace_state_variables)
2108 New renaming defines.
2109 (struct ipa_sym_addresses): New.
2110 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
2111 (symbol_list): New.
2112 (ipa_sym_addrs): New.
2113 (all_tracepoint_symbols_looked_up): New.
2114 (in_process_agent_loaded): New.
2115 (write_e_ipa_not_loaded): New.
2116 (maybe_write_ipa_not_loaded): New.
2117 (tracepoint_look_up_symbols): New.
2118 (debug_threads) [IN_PROCESS_AGENT]: New.
2119 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
2120 (UNKNOWN_SIDE_EFFECTS): New.
2121 (stop_tracing): New.
2122 (flush_trace_buffer): New.
2123 (stop_tracing_bkpt): New.
2124 (flush_trace_buffer_bkpt): New.
2125 (read_inferior_integer): New.
2126 (read_inferior_uinteger): New.
2127 (read_inferior_data_pointer): New.
2128 (write_inferior_data_pointer): New.
2129 (write_inferior_integer): New.
2130 (write_inferior_uinteger): New.
2131 (struct collect_static_trace_data_action): Delete.
2132 (enum tracepoint_type): New.
2133 (struct tracepoint) <type>: New field `type'.
2134 <actions_str, step_actions, step_actions_str>: Only include in GDBserver.
2135 <orig_size, obj_addr_on_target, adjusted_insn_addr>
2136 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
2137 (tracepoints): Use IP_AGENT_EXPORT.
2138 (last_tracepoint): Don't include in the IPA.
2139 (stopping_tracepoint): Use IP_AGENT_EXPORT.
2140 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
2141 (alloced_trace_state_variables): New.
2142 (trace_state_variables): Use IP_AGENT_EXPORT.
2143 (traceframe_t): Delete unused variable.
2144 (circular_trace_buffer): Don't include in the IPA.
2145 (trace_buffer_start): Delete.
2146 (struct trace_buffer_control): New.
2147 (trace_buffer_free): Delete.
2148 (struct ipa_trace_buffer_control): New.
2149 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
2150 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
2151 New.
2152 (trace_buffer_ctrl): New.
2153 (TRACE_BUFFER_CTRL_CURR): New.
2154 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
2155 Reimplement as macros.
2156 (trace_buffer_wrap): Delete.
2157 (traceframe_write_count, traceframe_read_count)
2158 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
2159 (struct tracepoint_hit_ctx) <type>: New field.
2160 (struct fast_tracepoint_ctx): New.
2161 (memory_barrier): New.
2162 (cmpxchg): New.
2163 (record_tracepoint_error): Update atomically in the IPA.
2164 (clear_inferior_trace_buffer): New.
2165 (about_to_request_buffer_space): New.
2166 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
2167 updating the same buffer.
2168 (add_tracepoint): Default the tracepoint's type to trap
2169 tracepoint, and orig_size to -1.
2170 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
2171 internal variables.
2172 (create_trace_state_variable): New parameter `gdb'. Handle it.
2173 (clear_installed_tracepoints): Clear fast tracepoint jumps.
2174 (cmd_qtdp): Handle fast tracepoints.
2175 (cmd_qtdv): Adjust.
2176 (max_jump_pad_size): New.
2177 (gdb_jump_pad_head): New.
2178 (get_jump_space_head): New.
2179 (claim_jump_space): New.
2180 (sort_tracepoints): New.
2181 (MAX_JUMP_SIZE): New.
2182 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
2183 IPA.
2184 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
2185 support. Upload fast traceframes, and delete internal IPA
2186 breakpoints.
2187 (stop_tracing_handler): New.
2188 (flush_trace_buffer_handler): New.
2189 (cmd_qtstop): Upload fast tracepoints.
2190 (response_tracepoint): Handle fast tracepoints.
2191 (tracepoint_finished_step): Upload fast traceframes. Set the
2192 tracepoint hit context's tracepoint type.
2193 (handle_tracepoint_bkpts): New.
2194 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
2195 type. Add comment about fast tracepoints.
2196 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
2197 non-existing action_str field.
2198 (get_context_regcache): Handle fast tracepoints.
2199 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
2200 to the regcache.
2201 (fast_tracepoint_from_jump_pad_address): New.
2202 (fast_tracepoint_from_ipa_tpoint_address): New.
2203 (collecting_t): New.
2204 (force_unlock_trace_buffer): New.
2205 (fast_tracepoint_collecting): New.
2206 (collecting): New.
2207 (gdb_collect): New.
2208 (write_inferior_data_ptr): New.
2209 (target_tp_heap): New.
2210 (target_malloc): New.
2211 (download_agent_expr): New.
2212 (UALIGN): New.
2213 (download_tracepoints): New.
2214 (download_trace_state_variables): New.
2215 (upload_fast_traceframes): New.
2216 (IPA_FIRST_TRACEFRAME): New.
2217 (IPA_NEXT_TRACEFRAME_1): New.
2218 (IPA_NEXT_TRACEFRAME): New.
2219 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
2220 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
2221 (gdb_jump_pad_buffer_end): New.
2222 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
2223 (initialize_tracepoint): Adjust.
2224 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
2225 buffer. Initialize the low module.
2226 * utils.c (PREFIX, TOOLNAME): New.
2227 (malloc_failure): Use PREFIX.
2228 (error): In the IPA, an error causes an exit.
2229 (fatal, warning): Use PREFIX.
2230 (internal_error): Use TOOLNAME.
2231 (NUMCELLS): Increase to 10.
2232 * configure, config.in: Regenerate.
2233
d149dd1d
PA
22342010-06-01 Pedro Alves <pedro@codesourcery.com>
2235
2236 * server.c (handle_query) <qSupported>: Do two passes over the
2237 qSupported string to avoid nesting strtok.
2238
f6528abd
JK
22392010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
2240
2241 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
2242 (CDEPS): New.
2243 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
2244 -Wl,--dynamic-list.
2245 * configure: Regenerate.
2246 * proc-service.list: New.
2247
ca2a87a0
JK
22482010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
2249
2250 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
2251 New comment.
2252
363a6e9f
OS
22532010-05-26 Ozkan Sezer <sezeroz@gmail.com>
2254
2255 * gdbreplay.c (remote_open): Check error return from socket() call by
2256 its equality to -1 not by it being negative.
2257 * remote-utils.c (remote_open): Likewise.
2258
d23b6cb1
PA
22592010-05-23 Pedro Alves <pedro@codesourcery.com>
2260
2261 * config.h: Regenerate.
2262
28d3cf85
MK
22632010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
2264
2265 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
2266 doesn't provide PTRACE_GET_THREAD_AREA.
2267
fea36a59
MK
22682010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
2269
2270 * linux-m68k-low.c: Include <asm/ptrace.h>
2271 (ps_get_thread_area): Implement.
2272
24b066ba
DE
22732010-05-03 Doug Evans <dje@google.com>
2274
2275 * event-loop.c (struct callback_event): New struct.
2276 (callback_list): New global.
2277 (append_callback_event, delete_callback_event): New functions.
2278 (process_callback): New function.
2279 (start_event_loop): Call it.
2280 * remote-utils.c (NOT_SCHEDULED): Define.
2281 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
2282 moved out of readchar.
2283 (readchar): Rewrite. Call reschedule before returning.
2284 (reset_readchar): New function.
2285 (remote_close): Call it.
2286 (process_remaining, reschedule): New functions.
2287 * server.h (callback_handler_func): New typedef.
2288 (append_callback_event, delete_callback_event): Declare.
2289
9836d6ea
PA
22902010-05-03 Pedro Alves <pedro@codesourcery.com>
2291
2292 * proc-service.c (ps_pglobal_lookup): Use
2293 thread_db_look_up_one_symbol.
2294 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
2295 parameter. Use it instead of all_symbols_looked_up.
2296 * server.h (struct process_info) <all_symbols_looked_up>: Delete
2297 field.
2298 (all_symbols_looked_up): Don't declare.
2299 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
2300 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
2301 field.
2302 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
2303 Set all_symbols_looked_up here.
2304 (thread_db_look_up_one_symbol): New.
2305 (thread_db_get_tls_address): Adjust.
2306 (thread_db_load_search, try_thread_db_load_1): Always allocate the
2307 thread_db object on the heap, and tentatively set it in the
2308 process structure.
2309 (thread_db_init): Don't set all_symbols_looked_up here.
2310 * linux-low.h (thread_db_look_up_one_symbol): Declare.
2311
7984d532
PA
23122010-05-03 Pedro Alves <pedro@codesourcery.com>
2313
2314 * linux-low.c (linux_kill, linux_detach): Adjust.
2315 (status_pending_p_callback): Remove redundant statement. Check
2316 for !TARGET_WAITIKIND_IGNORE, instead of
2317 TARGET_WAITKIND_STOPPED.
2318 (handle_tracepoints): Make sure LWP is locked. Adjust.
2319 (linux_wait_for_event_1): Adjust.
2320 (linux_cancel_breakpoints): New.
2321 (unsuspend_one_lwp): New.
2322 (unsuspend_all_lwps): New.
2323 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
2324 (send_sigstop_callback): Change return type to int, add new
2325 `except' parameter and handle it.
2326 (suspend_and_send_sigstop_callback): New.
2327 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
2328 pass them down. If SUSPEND, also increment the lwp's suspend
2329 count.
2330 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
2331 (need_step_over_p): Don't consider suspended LWPs.
2332 (start_step_over): Adjust.
2333 (proceed_one_lwp): Change return type to int, add new `except'
2334 parameter and handle it.
2335 (unsuspend_and_proceed_one_lwp): New.
2336 (proceed_all_lwps): Use find_inferior instead of
2337 for_each_inferior.
2338 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
2339 also decrement the suspend count of LWPs. Pass `except' down,
2340 instead of hacking its suspend count.
2341 (linux_pause_all): Add `freeze' parameter. Adjust.
2342 (linux_unpause_all): New.
2343 (linux_target_ops): Install linux_unpause_all.
2344 * server.c (handle_status): Adjust.
2345 * target.h (struct target_ops): New fields `unpause_all' and
2346 `cancel_breakpoints'. Add new parameter to `pause_all'.
2347 (pause_all): Add new `freeze' parameter.
2348 (unpause_all): New.
2349 (cancel_breakpoints): New.
2350 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
2351 cancel breakpoints.
2352 (cmd_qtstart): Pause threads.
2353 (stop_tracing): Pause threads, and cancel breakpoints.
2354 * win32-low.c (win32_target_ops): Adjust.
2355
e471f25b
PA
23562010-05-03 Pedro Alves <pedro@codesourcery.com>
2357
2358 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
2359 the inferior right away from here...
2360 (linux_wait_1): ... to here, and adjust to check the thread's
2361 last_resume_kind instead of the lwp's step or stop_expected flags.
2362
1915ef4f
PA
23632010-05-02 Pedro Alves <pedro@codesourcery.com>
2364
2365 * README: Use consistent `GDB' and `GDBserver' spellings.
2366
f9e39928
PA
23672010-05-02 Pedro Alves <pedro@codesourcery.com>
2368
2369 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
2370 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
2371 (linux_detach_one_lwp): Assume the lwp is stopped.
2372 (any_thread_of): Delete.
2373 (linux_detach): Stop all lwps here. Don't blindly delete all
2374 breakpoints.
2375 (delete_lwp_callback): New.
2376 (linux_mourn): Delete all lwps of the process that is gone.
2377 (linux_wait_1): Don't delete the last lwp of the process here.
2378 * mem-break.h (mark_breakpoints_out): Declare.
2379 * mem-break.c (mark_breakpoints_out): New.
2380 (free_all_breakpoints): Use it.
2381 * server.c (handle_target_event): If the process is gone, mark
2382 breakpoints out.
2383 * thread-db.c (struct thread_db) <create_bp>: New field.
2384 (thread_db_enable_reporting): Fix prototype. Store a thread event
2385 breakpoint reference in the thread_db struct.
2386 (thread_db_load_search): Clear the thread_db object.
2387 (try_thread_db_load_1): Ditto.
2388 (switch_to_process): New.
2389 (disable_thread_event_reporting): Use it.
2390 (remove_thread_event_breakpoints): New.
2391 (thread_db_detach, thread_db_mourn): Use it.
2392
1e7fc18c
PA
23932010-05-01 Pedro Alves <pedro@codesourcery.com>
2394
2395 * linux-low.c (linux_enable_event_reporting): New.
2396 (linux_wait_for_event_1, handle_extended_wait): Use it.
2397
02fc4de7
PA
23982010-04-30 Pedro Alves <pedro@codesourcery.com>
2399
2400 * linux-low.c (linux_kill_one_lwp, linux_kill)
2401 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
2402 (send_sigstop): Take an lwp_info as parameter instead. Queue a
2403 SIGSTOP even if the LWP is stopped.
2404 (send_sigstop_callback): New.
2405 (stop_all_lwps): Use send_sigstop_callback instead.
2406 (linux_resume_one_thread): Adjust.
2407 (proceed_one_lwp): Still proceed an LWP that the client has
2408 requested to stop, if we haven't reported it as stopped yet. Make
2409 sure that LWPs the client want stopped, have a pending SIGSTOP.
2410
bc3b5632
DE
24112010-04-26 Doug Evans <dje@google.com>
2412
ae1ada35
DE
2413 * server.c (handle_general_set): Make static.
2414
bc3b5632
DE
2415 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
2416 Print received char after testing for error/eof instead of before.
2417 (input_interrupt): Tweak comment.
2418
65730243
DE
24192010-04-23 Doug Evans <dje@google.com>
2420
2421 * server.c (start_inferior): Print inferior argv if --debug.
2422
a8ae7dc0
AR
24232010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
2424
2425 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
2426 * nto-x86-low.c: Include server.h
2427
1c07cc19
PM
24282010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
2429
2430 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
2431 be consistent with other sources of this directory.
2432 (init_registers_amd64): Correct name of source file of this function
2433 in the comment.
2434
e0a61e09
PM
24352010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
2436
2437 * configure.srv (x86_64-*-mingw*): New configuration for Windows
2438 64-bit executables.
2439
54709339
PM
24402010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
2441
2442 * win32-i386-low.c: Add 64-bit support.
2443 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
2444 (init_registers_amd64): Declare.
2445 (mappings): Add 64-bit version of array.
2446 (init_windows_x86): New function.
2447 (the_low_target): Change init_arch field to init_windows_x86.
2448
e8f0053d
PM
24492010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
2450
2451 * win32-low.c: Adapt to support also 64-bit architecture.
2452 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
2453 (get_image_name): Use SIZE_T type for local variable `done'.
2454 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
2455 (toolhelp_get_dll_name): Idem.
2456 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
2457 Use uintptr_t typecast to avoid warning.
2458 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
2459 (handle_exception): Use phex_nz to avoid warning.
2460 (win32_wait): Remove unused local variable `process'.
2461
c481e77e
PM
24622010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
2463
2464 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
2465 `amd64-avx.o'.
2466
12ea4b69
PM
24672010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
2468
2469 * configure.ac: Use `ws2_32' library for srv_mingw.
2470 * configure: Regenerate.
2471 * gdbreplay.c: Include winsock2.h instead of winsock.h.
2472 * remote-utils.c: Likewise.
2473
f6d1620c
L
24742010-04-17 H.J. Lu <hongjiu.lu@intel.com>
2475
2476 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
2477 if __x86_64__ is defined.
2478
8e642873
PM
24792010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
2480
2481 * configure: Regenerate.
2482
711e434b
PM
24832010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
2484
2485 * server.c (handle_query): Handle 'qGetTIBAddr' query.
2486 * target.h (target_ops): New get_tib_address field.
2487 * win32-low.h (win32_thread_info): Add thread_local_base field.
2488 * win32-low.c (child_add_thread): Add tlb argument.
2489 Set thread_local_base field to TLB.
2490 (get_child_debug_event): Adapt to child_add_thread change.
2491 (win32_get_tib_address): New function.
2492 (win32_target_ops): Set get_tib_address field to
2493 win32_get_tib_address.
2494 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
2495
505106cd
PA
24962010-04-12 Pedro Alves <pedro@codesourcery.com>
2497
505106cd
PA
2498 * linux-low.c (linux_mourn): Also remove the process.
2499 * server.c (handle_target_event): Don't remove the process here.
2500 * nto-low.c (nto_mourn): New.
2501 (nto_target_ops): Install it.
2502 * spu-low.c (spu_mourn): New.
2503 (spu_target_ops): Install it.
2504 * win32-low.c (win32_mourn): New.
2505 (win32_target_ops): Install it.
2506
e8470a06
PA
25072010-04-12 Pedro Alves <pedro@codesourcery.com>
2508
2509 * server.h (buffer_xml_printf): Remove redundant `;'.
2510
45ba0d02
PA
25112010-04-12 Pedro Alves <pedro@codesourcery.com>
2512
2513 * regcache.c (set_register_cache): Invalidate regcaches before
2514 changing the register cache layout.
2515 (regcache_invalidate_one): Allow a NULL regcache.
2516 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
2517 regcaches before changing the register cache layout or the target
2518 regsets.
2519
59e04013
L
25202010-04-12 H.J. Lu <hongjiu.lu@intel.com>
2521
2522 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
2523 variable warning on Linux/x86-64.
2524
8336d594
PA
25252010-04-11 Pedro Alves <pedro@codesourcery.com>
2526
2527 GDBserver disconnected tracing support.
2528
2529 * linux-low.c (linux_remove_process): Delete.
2530 (add_lwp): Don't set last_resume_kind here.
2531 (linux_kill): Use `mourn'.
2532 (linux_detach): Use `thread_db_detach', and `mourn'.
2533 (linux_mourn): New.
2534 (linux_attach_lwp_1): Adjust comment.
2535 (linux_attach): last_resume_kind moved the thread_info; adjust.
2536 (status_pending_p_callback): Adjust.
2537 (linux_wait_for_event_1): Adjust.
2538 (count_events_callback, select_singlestep_lwp_callback)
2539 (select_event_lwp_callback, cancel_breakpoints_callback)
2540 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
2541 (proceed_one_lwp): Adjust.
2542 (linux_async): Add debug output.
2543 (linux_thread_stopped): New.
2544 (linux_pause_all): New.
2545 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
2546 linux_pause_all.
2547 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
2548 (thread_db_free): Delete declaration.
2549 (thread_db_detach, thread_db_mourn): Declare.
2550 * thread-db.c (thread_db_init): Use thread_db_mourn.
2551 (thread_db_free): Delete, split in two.
2552 (disable_thread_event_reporting): New.
2553 (thread_db_detach): New.
2554 (thread_db_mourn): New.
2555
2556 * server.h (struct thread_info) <last_resume_kind>: New field.
2557 <attached>: Add comment.
2558 <gdb_detached>: New field.
2559 (handler_func): Change return type to int.
2560 (handle_serial_event, handle_target_event): Ditto.
2561 (gdb_connected): Declare.
2562 (tracing): Delete.
2563 (disconnected_tracing): Declare.
2564 (stop_tracing): Declare.
2565
2566 * server.c (handle_query) <qSupported>: Report support for
2567 disconnected tracing.
2568 (queue_stop_reply_callback): Account for running threads.
2569 (gdb_wants_thread_stopped): New.
2570 (gdb_wants_all_threads_stopped): New.
2571 (gdb_reattached_process): New.
2572 (handle_status): Clear the `gdb_detached' flag of all processes.
2573 In all-stop, stop all threads.
2574 (main): Be sure to leave tfind mode. Handle disconnected tracing.
2575 (process_serial_event): If the remote connection breaks, or if an
2576 exit was forced with "monitor exit", force an event loop exit.
2577 Handle disconnected tracing on detach.
2578 (handle_serial_event): Adjust.
2579 (handle_target_event): If GDB isn't connected, forward events back
2580 to the inferior, unless the last process exited, in which case,
2581 exit gdbserver. Adjust interface.
2582
2583 * remote-utils.c (remote_open): Don't block in accept. Instead
2584 register an event loop source on the listen socket file
2585 descriptor. Refactor bits into ...
2586 (listen_desc): ... this new global.
2587 (gdb_connected): ... this new function.
2588 (enable_async_notification): ... this new function.
2589 (handle_accept_event): ... this new function.
2590 (remote_close): Clear remote_desc.
2591
2592 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
2593
2594 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
2595 New fields.
2596 (mourn_inferior): Define.
2597 (target_process_qsupported): Avoid the dangling else problem.
2598 (thread_stopped): Define.
2599 (pause_all): Define.
2600 (target_waitstatus_to_string): Declare.
2601 * target.c (target_waitstatus_to_string): New.
2602
2603 * tracepoint.c (tracing): Make extern.
2604 (disconnected_tracing): New.
2605 (stop_tracing): Make extern. Handle tracing stops due to GDB
2606 disconnecting.
2607 (cmd_qtdisconnected): New.
2608 (cmd_qtstatus): Report disconnected tracing status in trace reply.
2609 (handle_tracepoint_general_set): Handle QTDisconnected.
2610
2611 * event-loop.c (event_handler_func): Change return type to int.
2612 (process_event): Bail out if the event handler wants the event
2613 loop to stop.
2614 (handle_file_event): Ditto.
2615 (start_event_loop): Bail out if the event handler wants the event
2616 loop to stop.
2617
2618 * nto-low.c (nto_target_ops): Adjust.
2619 * spu-low.c (spu_wait): Don't remove the process here.
2620 (spu_target_ops): Adjust.
2621 * win32-low.c (win32_wait): Don't remove the process here.
2622 (win32_target_ops): Adjust.
2623
5d267c4c
PA
26242010-04-11 Pedro Alves <pedro@codesourcery.com>
2625
2626 * regcache.c (realloc_register_cache): Invalidate inferior's
2627 regcache before recreating it.
2628
623ccd72
PA
26292010-04-09 Pedro Alves <pedro@codesourcery.com>
2630
2631 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
2632
219f2f23
PA
26332010-04-09 Stan Shebs <stan@codesourcery.com>
2634 Pedro Alves <pedro@codesourcery.com>
2635
2636 * server.h (LONGEST): New.
2637 (struct thread_info) <while_stepping>: New field.
2638 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
2639 Declare.
2640 (initialize_tracepoint, handle_tracepoint_general_set)
2641 (handle_tracepoint_query, tracepoint_finished_step)
2642 (tracepoint_was_hit, release_while_stepping_state_list):
2643 (current_traceframe): Declare.
2644 * server.c (handle_general_set): Handle tracepoint packets.
2645 (read_memory): New.
2646 (write_memory): New.
2647 (handle_search_memory_1): Use read_memory.
2648 (handle_query): Report support for conditional tracepoints, trace
2649 state variables, and tracepoint sources. Handle tracepoint
2650 queries.
2651 (main): Initialize the tracepoints module.
2652 (process_serial_event): Handle traceframe reads/writes.
2653
2654 * linux-low.c (handle_tracepoints): New.
2655 (linux_wait_1): Call it.
2656 (linux_resume_one_lwp): Handle while-stepping.
2657 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
2658 (linux_target_ops): Install them.
2659 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
2660 New field.
2661 * linux-x86-low.c (x86_supports_tracepoints): New.
2662 (the_low_target). Install it.
2663
2664 * mem-break.h (delete_breakpoint): Declare.
2665 * mem-break.c (delete_breakpoint): Make external.
2666
2667 * target.h (struct target_ops): Add `supports_tracepoints',
2668 `read_pc', and `write_pc' fields.
2669 (target_supports_tracepoints): Define.
2670 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
2671 (phex_nz): New.
2672
2673 * regcache.h (struct regcache) <registers_owned>: New field.
2674 (init_register_cache, regcache_cpy): Declare.
2675 (regcache_read_pc, regcache_write_pc): Declare.
2676 (register_cache_size): Declare.
2677 (supply_regblock): Declare.
2678 * regcache.c (init_register_cache): New.
2679 (new_register_cache): Use it.
2680 (regcache_cpy): New.
2681 (register_cache_size): New.
2682 (supply_regblock): New.
2683 (regcache_read_pc, regcache_write_pc): New.
889bf7c5 2684
219f2f23
PA
2685 * tracepoint.c: New.
2686
2687 * Makefile.in (OBS): Add tracepoint.o.
2688 (tracepoint.o): New rule.
2689
3a13a53b
L
26902010-04-08 H.J. Lu <hongjiu.lu@intel.com>
2691
2692 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
2693 (i386-mmx.o): New.
2694 (i386-mmx.c): Likewise.
2695 (i386-mmx-linux.o): Likewise.
2696 (i386-mmx-linux.c): Likewise.
2697
2698 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
2699 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
2700 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
2701 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
2702
2703 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
2704 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
2705 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
2706
1570b33e
L
27072010-04-07 H.J. Lu <hongjiu.lu@intel.com>
2708
2709 * Makefile.in (clean): Updated.
2710 (i386-avx.o): New.
2711 (i386-avx.c): Likewise.
2712 (i386-avx-linux.o): Likewise.
2713 (i386-avx-linux.c): Likewise.
2714 (amd64-avx.o): Likewise.
2715 (amd64-avx.c): Likewise.
2716 (amd64-avx-linux.o): Likewise.
2717 (amd64-avx-linux.c): Likewise.
2718
2719 * configure.srv (srv_i386_regobj): Add i386-avx.o.
2720 (srv_i386_linux_regobj): Add i386-avx-linux.o.
2721 (srv_amd64_regobj): Add amd64-avx.o.
2722 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
2723 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
2724 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
2725 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
2726 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
2727 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
2728 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
2729
2730 * i387-fp.c: Include "i386-xstate.h".
2731 (i387_xsave): New.
2732 (i387_cache_to_xsave): Likewise.
2733 (i387_xsave_to_cache): Likewise.
2734 (x86_xcr0): Likewise.
2735
2736 * i387-fp.h (i387_cache_to_xsave): Likewise.
2737 (i387_xsave_to_cache): Likewise.
2738 (x86_xcr0): Likewise.
2739
2740 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
2741 * linux-crisv32-low.c (target_regsets): Likewise.
2742 * linux-m68k-low.c (target_regsets): Likewise.
2743 * linux-mips-low.c (target_regsets): Likewise.
2744 * linux-ppc-low.c (target_regsets): Likewise.
2745 * linux-s390-low.c (target_regsets): Likewise.
2746 * linux-sh-low.c (target_regsets): Likewise.
2747 * linux-sparc-low.c (target_regsets): Likewise.
2748 * linux-xtensa-low.c (target_regsets): Likewise.
2749
2750 * linux-low.c: Include <sys/uio.h>.
2751 (regsets_fetch_inferior_registers): Support nt_type.
2752 (regsets_store_inferior_registers): Likewise.
2753 (linux_process_qsupported): New.
2754 (linux_target_ops): Add linux_process_qsupported.
2755
2756 * linux-low.h (regset_info): Add nt_type.
2757 (linux_target_ops): Add process_qsupported.
2758
2759 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
2760 and <sys/uio.h>.
2761 (init_registers_i386_avx_linux): New.
2762 (init_registers_amd64_avx_linux): Likewise.
2763 (xmltarget_i386_linux_no_xml): Likewise.
2764 (xmltarget_amd64_linux_no_xml): Likewise.
2765 (PTRACE_GETREGSET): Likewise.
2766 (PTRACE_SETREGSET): Likewise.
2767 (x86_fill_xstateregset): Likewise.
2768 (x86_store_xstateregset): Likewise.
2769 (use_xml): Likewise.
2770 (x86_linux_update_xmltarget): Likewise.
2771 (x86_linux_process_qsupported): Likewise.
2772 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
2773 (x86_arch_setup): Don't call init_registers_amd64_linux nor
2774 init_registers_i386_linux here. Call
2775 x86_linux_update_xmltarget.
2776 (the_low_target): Add x86_linux_process_qsupported.
2777
2778 * server.c (handle_query): Call target_process_qsupported.
2779
2780 * target.h (target_ops): Add process_qsupported.
2781 (target_process_qsupported): New.
2782
fc7238bb
PA
27832010-04-03 Pedro Alves <pedro@codesourcery.com>
2784
2785 * inferiors.c (add_thread): Set last_status kind to
2786 TARGET_WAITKIND_IGNORE.
2787 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
2788 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
2789 (linux_wait_1): Move `thread' local definition to block that uses
2790 it. Don't NULL initialize `event_child'.
2791 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
2792 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
2793 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
2794
bdabb078
PA
27952010-04-01 Pedro Alves <pedro@codesourcery.com>
2796
2797 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
2798 an extended waitstatus, or by a watchpoint.
2799 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
2800 thread was stepping or has been stopped by a watchpoint.
2801
d3bbe7a0
PA
28022010-04-01 Pedro Alves <pedro@codesourcery.com>
2803
2804 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
2805 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
2806 of another, then delete the previous, and validate all
2807 breakpoints.
2808 (validate_inserted_breakpoint): New.
2809 (delete_disabled_breakpoints): New.
2810 (validate_breakpoints): New.
2811 (check_mem_read): Validate breakpoints before trusting their
2812 shadow. Delete disabled breakpoints.
2813 (check_mem_write): Validate breakpoints before trusting they
2814 should be inserted. Delete disabled breakpoints.
2815 * mem-break.h (validate_breakpoints):
2816 * server.c (handle_query): Validate breakpoints when we see a
2817 qSymbol query.
2818
8b07ae33
PA
28192010-04-01 Pedro Alves <pedro@codesourcery.com>
2820
2821 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
2822 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
2823 if we could tell there's a GDB breakpoint at stop_pc.
2824 (need_step_over_p): Don't do a step over if we find a GDB
2825 breakpoint at the resume PC.
2826
2827 * mem-break.c (struct raw_breakpoint): New.
2828 (enum bkpt_type): New type `gdb_breakpoint'.
2829 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
2830 fields. New field `raw'.
2831 (find_raw_breakpoint_at): New.
2832 (set_raw_breakpoint_at): Handle refcounting. Create a raw
2833 breakpoint instead.
2834 (set_breakpoint_at): Adjust.
2835 (delete_raw_breakpoint): New.
2836 (release_breakpoint): New.
2837 (delete_breakpoint): Rename to...
2838 (delete_breakpoint_1): ... this. Add proc parameter. Use
2839 release_breakpoint. Return ENOENT.
2840 (delete_breakpoint): Reimplement.
2841 (find_breakpoint_at): Delete.
2842 (find_gdb_breakpoint_at): New.
2843 (delete_breakpoint_at): Delete.
2844 (set_gdb_breakpoint_at): New.
2845 (delete_gdb_breakpoint_at): New.
2846 (gdb_breakpoint_here): New.
2847 (set_reinsert_breakpoint): Use release_breakpoint.
2848 (uninsert_breakpoint): Rename to ...
2849 (uninsert_raw_breakpoint): ... this.
2850 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
2851 (reinsert_raw_breakpoint): Change parameter type to
2852 raw_breakpoint.
2853 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
2854 instead.
2855 (check_breakpoints): Adjust. Use release_breakpoint.
2856 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
2857 (breakpoint_inserted_here): Ditto.
2858 (check_mem_read): Adjust to iterate over raw breakpoints instead.
2859 Don't trust the breakpoint's shadow if it is not inserted.
2860 (check_mem_write): Adjust to iterate over raw breakpoints instead.
2861 (delete_all_breakpoints): Adjust.
2862 (free_all_breakpoints): Mark all breakpoints as uninserted, and
2863 use delete_breakpoint_1.
2864
2865 * mem-break.h (breakpoints_supported): Delete declaration.
2866 (set_gdb_breakpoint_at): Declare.
2867 (gdb_breakpoint_here): Declare.
2868 (delete_breakpoint_at): Delete.
2869 (delete_gdb_breakpoint_at): Declare.
2870
2871 * server.h (struct raw_breakpoint): Forward declare.
2872 (struct process_info): New field `raw_breakpoints'.
2873
2874 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
2875 breakpoints.
2876
6bf5e0ba
PA
28772010-03-24 Pedro Alves <pedro@codesourcery.com>
2878
2879 * linux-low.c (status_pending_p_callback): Fix comment.
2880 (linux_wait_for_event_1): Move most of the internal breakpoint
2881 handling from here...
2882 (linux_wait_1): ... to here.
2883 (count_events_callback): New.
2884 (select_singlestep_lwp_callback): New.
2885 (select_event_lwp_callback): New.
2886 (cancel_breakpoints_callback): New.
2887 (select_event_lwp): New.
2888 (linux_wait_1): Simplify internal breakpoint handling. Give equal
2889 priority to all LWPs that have had events that should be reported
2890 to the client. Cancel breakpoints when about to reporting the
2891 event to the client, not while stopping lwps. No longer cancel
2892 finished single-steps here.
2893 (cancel_finished_single_step): Delete.
2894 (cancel_finished_single_steps): Delete.
2895
414a389f
PA
28962010-03-24 Pedro Alves <pedro@codesourcery.com>
2897
2898 * mem-break.c (enum bkpt_type): New.
2899 (struct breakpoint): New field `type'.
2900 (set_breakpoint_at): Change return type to struct breakpoint
2901 pointer. Set type to `other_breakpoint' by default.
2902 (delete_breakpoint): Rewrite, supporting more than one breakpoint
2903 in the breakpoint list.
2904 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
2905 (reinsert_breakpoint): Rename to ...
2906 (reinsert_raw_breakpoint): ... this.
2907 (reinsert_breakpoints_at): Adjust.
2908 * mem-break.h (struct breakpoint): Declare.
2909 (set_breakpoint_at): Change return type to struct breakpoint
2910 pointer.
2911
2280c721
PA
29122010-03-24 Pedro Alves <pedro@codesourcery.com>
2913
2914 * server.c (handle_query): Assign, not compare.
2915
d50171e4
PA
29162010-03-24 Pedro Alves <pedro@codesourcery.com>
2917
2918 Teach linux gdbserver to step-over-breakpoints.
2919
2920 * linux-low.c (can_hardware_single_step): New.
2921 (supports_breakpoints): New.
2922 (handle_extended_wait): If stopping threads, read the stop pc of
2923 the new cloned LWP.
2924 (get_pc): New.
2925 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
2926 low target doesn't support retrieving the PC.
2927 (add_lwp): Set last_resume_kind to resume_continue.
2928 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
2929 (linux_attach): Don't clear stop_expected. Set the lwp's
2930 last_resume_kind to resume_stop.
2931 (linux_detach_one_lwp): Don't check for removed breakpoints.
2932 (check_removed_breakpoint): Delete.
2933 (status_pending_p): Rename to ...
2934 (status_pending_p_callback): ... this. Don't check for removed
2935 breakpoints. Don't consider threads that are stopped from GDB's
2936 perspective.
2937 (linux_wait_for_lwp): Always read the stop_pc here.
2938 (cancel_breakpoint): New.
2939 (step_over_bkpt): New global.
2940 (linux_wait_for_event_1): Implement stepping over breakpoints.
2941 (gdb_wants_lwp_stopped): New.
2942 (gdb_wants_all_stopped): New.
2943 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
2944 single-step traps here. Store the thread's last reported target
2945 wait status.
2946 (send_sigstop): Don't clear stop_expected. Always set it,
2947 instead.
2948 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
2949 (cancel_finished_single_step): New.
2950 (cancel_finished_single_steps): New.
2951 (wait_for_sigstop): Don't cancel finished single-step traps here.
2952 (linux_resume_one_lwp): Don't check for removed breakpoints.
2953 Don't set `step' on non-hardware step archs.
2954 (linux_set_resume_request): Ignore resume_stop requests if already
2955 stopping or stopped. Set the lwp's last_resume_kind.
2956 (resume_status_pending_p): Don't check for removed breakpoints.
2957 (need_step_over_p): New.
2958 (start_step_over): New.
2959 (finish_step_over): New.
2960 (linux_resume_one_thread): Always queue a sigstop for resume_stop
2961 requests. Clear the thread's last reported target waitstatus.
2962 Don't use the `suspended' flag. Don't consider pending breakpoints.
2963 (linux_resume): Start a step-over if necessary.
2964 (proceed_one_lwp): New.
2965 (proceed_all_lwps): New.
2966 (unstop_all_lwps): New.
2967 * linux-low.h (struct lwp_info): Rewrite comment for the
2968 `suspended' flag. Add the `stop_pc' field. Delete the
2969 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
2970 Add `'last_resume_kind' and `need_step_over' fields.
2971 * inferiors.c (struct thread_info): Delete, moved elsewhere.
2972 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
2973 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
2974 (set_raw_breakpoint_at): New.
2975 (set_breakpoint_at): Rewrite to use it.
2976 (reinsert_breakpoint_handler): Delete.
2977 (set_reinsert_breakpoint): New.
2978 (reinsert_breakpoint_by_bp): Delete.
2979 (delete_reinsert_breakpoints): New.
2980 (uninsert_breakpoint): Rewrite.
2981 (uninsert_breakpoints_at): New.
2982 (reinsert_breakpoint): Rewrite.
2983 (reinsert_breakpoints_at): New.
2984 (check_breakpoints): Rewrite.
2985 (breakpoint_here): New.
2986 (breakpoint_inserted_here): New.
2987 (check_mem_read): Adjust.
2988 * mem-break.h (breakpoints_supported, breakpoint_here)
2989 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
2990 (reinsert_breakpoint_by_bp): Delete declaration.
2991 (delete_reinsert_breakpoints): Declare.
2992 (reinsert_breakpoint): Delete declaration.
2993 (reinsert_breakpoints_at): Declare.
2994 (uninsert_breakpoint): Delete declaration.
2995 (uninsert_breakpoints_at): Declare.
2996 (check_breakpoints): Adjust prototype.
2997 * server.h: Adjust include order.
2998 (struct thread_info): Declare here. Add a `last_status' field.
2999
30ba68cb
MS
30002010-03-23 Michael Snyder <msnyder@vmware.com>
3001
3002 * server.c (crc32): New function.
3003 (handle_query): Add handling for 'qCRC:' request.
3004
b9a881c2
PA
30052010-03-23 Pedro Alves <pedro@codesourcery.com>
3006
3007 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
3008 lwp had been stopped by a watchpoint.
3009
e92d13d5
PA
30102010-03-16 Pedro Alves <pedro@codesourcery.com>
3011
3012 * server.h (internal_error): Declare.
3013 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
3014 * utils.c (internal_error): New function.
3015
64daa791
AS
30162010-03-15 Andreas Schwab <schwab@redhat.com>
3017
3018 * configure.srv: Fix typo setting srv_regobj.
3019
f52cd8cd
PA
30202010-03-15 Pedro Alves <pedro@codesourcery.com>
3021
3022 * linux-low.c (fetch_register): Avoid passing a non string literal
3023 format to `error'.
3024 (usr_store_inferior_registers): Ditto.
3025
93ae6fdc
PA
30262010-03-14 Pedro Alves <pedro@codesourcery.com>
3027
3028 * linux-low.c (linux_write_memory): Bail out early if peeking
3029 memory failed.
3030
c3adc08c
PA
30312010-03-14 Pedro Alves <pedro@codesourcery.com>
3032
3033 * linux-low.h (struct lwp_info): New fields
3034 `stopped_by_watchpoint' and `stopped_data_address'.
3035 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
3036 here, and cache them in the lwp object.
3037 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
3038 directly.
3039 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
3040 field.
3041 (linux_stopped_by_watchpoint): Rewrite.
3042 (linux_stopped_data_address): Rewrite.
3043
bce522a2
PA
30442010-03-06 Simo Melenius <simo.melenius@iki.fi>
3045
3046 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
3047 switching the current inferior, not before.
3048
90884b2b
L
30492010-03-01 H.J. Lu <hongjiu.lu@intel.com>
3050
3051 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
3052 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
3053 i386-linux.c and amd64-linux.c.
3054 (reg-i386.o): Removed.
3055 (reg-i386.c): Likewise.
3056 (reg-i386-linux.o): Likewise.
3057 (reg-i386-linux.c): Likewise.
3058 (reg-x86-64.o): Likewise.
3059 (reg-x86-64.c): Likewise.
3060 (reg-x86-64-linux.o): Likewise.
3061 (reg-x86-64-linux.c): Likewise.
3062 (i386.o): New.
3063 (i386.c): Likewise.
3064 (i386-linux.o): Likewise.
3065 (i386-linux.c): Likewise.
3066 (amd64.o): Likewise.
3067 (amd64.c): Likewise.
3068 (amd64-linux.o): Likewise.
3069 (amd64-linux.c): Likewise.
3070
3071 * configure.srv (srv_i386_regobj): New.
3072 (srv_i386_linux_regobj): Likewise.
3073 (srv_amd64_regobj): Likewise.
3074 (srv_amd64_linux_regobj): Likewise.
3075 (srv_i386_32bit_xmlfiles): Likewise.
3076 (srv_i386_64bit_xmlfiles): Likewise.
3077 (srv_i386_xmlfiles): Likewise.
3078 (srv_amd64_xmlfiles): Likewise.
3079 (srv_i386_linux_xmlfiles): Likewise.
3080 (srv_amd64_linux_xmlfiles): Likewise.
3081 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
3082 srv_xmlfiles to $srv_i386_xmlfiles.
3083 (i[34567]86-*-mingw32ce*): Likewise.
3084 (i[34567]86-*-mingw*): Likewise.
3085 (i[34567]86-*-nto*): Likewise.
3086 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
3087 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
3088 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
3089 (x86_64-*-linux*): Likewise.
3090
3091 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
3092 (init_registers_amd64_linux): New.
3093 (x86_arch_setup): Replace init_registers_x86_64_linux with
3094 init_registers_amd64_linux.
3095
193f13e6
MK
30962010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
3097
3098 * configure.ac: Check for libdl. If it is not available link against
3099 static libthread_db.
3100 * configure: Regenerate.
3101
85d721b8
PA
31022010-02-22 Pedro Alves <pedro@codesourcery.com>
3103
3104 PR9605
3105
3106 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
3107 handing a read watchpoint.
3108 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
3109
6076632b
DE
31102010-02-12 Doug Evans <dje@google.com>
3111
3112 * linux-low.c (linux_supports_tracefork_flag): Document.
3113 (linux_look_up_symbols): Add comment.
3114
3327ccf7
L
31152010-02-03 H.J. Lu <hongjiu.lu@intel.com>
3116
3117 * regcache.c (supply_register): Clear regcache if buf is NULL.
3118
0718675c 31192010-02-02 Nicolas Roche <roche@sourceware.org>
3327ccf7 3120 Joel Brobecker <brobecker@adacore.com>
0718675c
JB
3121
3122 * inferiors.c (find_inferior): Add function documentation.
3123 (unloaded_dll): Handle the case where the unloaded dll has not
3124 been previously registered in the dll list.
3125
177321bd
DJ
31262010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
3127
3128 * linux-arm-low.c (thumb_breakpoint_len): Delete.
3129 (thumb2_breakpoint): New.
3130 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
3131
2b009048
DJ
31322010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
3133
3134 * linux-low.c (get_stop_pc): Check for SIGTRAP.
3135 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
3136 breakpoints.
3137
3be029c7
PA
31382010-01-21 Pedro Alves <pedro@codesourcery.com>
3139
3140 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
3141
18f5de3b
JK
31422010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
3143
3144 * linux-s390-low.c (s390_collect_ptrace_register)
3145 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
3146
3743bb4f
DE
31472010-01-21 Doug Evans <dje@google.com>
3148
14ce3065
DE
3149 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
3150 (PTRACE_ARG4_TYPE): New macro.
3151 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
3152 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
3153 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
3154 (usr_store_inferior_registers): Ditto.
3155 (linux_read_memory, linux_write_memory): Ditto.
3156 (linux_test_for_tracefork): Ditto.
3157
3743bb4f
DE
3158 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
3159 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
3160
8b315be5
PA
31612010-01-21 Pedro Alves <pedro@codesourcery.com>
3162
3163 * proc-service.c (ps_lgetregs): Don't refetch registers from the
3164 target.
3165
85492558
PA
31662010-01-21 Pedro Alves <pedro@codesourcery.com>
3167
3168 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
3169 prototype to take a regcache. Adjust.
3170
442ea881
PA
31712010-01-20 Pedro Alves <pedro@codesourcery.com>
3172
3173 * regcache.h (struct thread_info): Forward declare.
3174 (struct regcache): New.
3175 (new_register_cache): Adjust prototype.
3176 (get_thread_regcache): Declare.
3177 (free_register_cache): Adjust prototype.
3178 (registers_to_string, registers_from_string): Ditto.
3179 (supply_register, supply_register_by_name, collect_register)
3180 (collect_register_as_string, collect_register_by_name): Ditto.
3181 * regcache.c (struct inferior_regcache_data): Delete.
3182 (get_regcache): Rename to ...
3183 (get_thread_regcache): ... this. Adjust. Switch inferior before
3184 fetching registers.
3185 (regcache_invalidate_one): Adjust.
3186 (regcache_invalidate): Fix prototype.
3187 (new_register_cache): Return the new register cache.
3188 (free_register_cache): Change prototype.
3189 (realloc_register_cache): Adjust.
3190 (registers_to_string): Change prototype to take a regcache. Adjust.
3191 (registers_from_string): Ditto.
3192 (register_data): Ditto.
3193 (supply_register): Ditto.
3194 (supply_register_by_name): Ditto.
3195 (collect_register): Ditto.
3196 (collect_register_as_string): Ditto.
3197 (collect_register_by_name): Ditto.
3198 * server.c (process_serial_event): Adjust.
3199 * linux-low.h (regset_fill_func, regset_store_func): Change
3200 prototype.
3201 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
3202 Change prototype.
3203 * linux-low.c (get_stop_pc): Adjust.
3204 (check_removed_breakpoint): Adjust.
3205 (linux_wait_for_event): Adjust.
3206 (linux_resume_one_lwp): Adjust.
3207 (fetch_register): Add regcache parameter. Adjust.
3208 (usr_store_inferior_registers): Ditto.
3209 (regsets_fetch_inferior_registers): Ditto.
3210 (regsets_store_inferior_registers): Ditto.
3211 (linux_fetch_registers, linux_store_registers): Ditto.
3212 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
3213 regcache. Adjust.
3214 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
3215 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
3216 prototype to take a regcache.
3217 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
3218 * remote-utils.c (convert_ascii_to_int, outreg)
3219 (prepare_resume_reply): Change prototype to take a regcache.
3220 Adjust.
3221 * target.h (struct target_ops) <fetch_registers, store_registers>:
3222 Change prototype to take a regcache.
3223 (fetch_inferior_registers, store_inferior_registers): Change
3224 prototype to take a regcache. Adjust.
3225 * proc-service.c (ps_lgetregs): Adjust.
3226 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
3227 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
3228 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
3229 take a regcache. Adjust.
3230 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
3231 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
3232 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
3233 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
3234 * linux-cris-low.c (cris_get_pc, cris_set_pc)
3235 (cris_cannot_fetch_register):
3236 (cris_breakpoint_at): Change prototype to take a regcache.
3237 Adjust.
3238 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
3239 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
3240 to take a regcache. Adjust.
3241 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
3242 Adjust.
3243 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
3244 take a regcache. Adjust.
3245 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
3246 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
3247 (m68k_set_pc): Change prototype to take a regcache. Adjust.
3248 * linux-mips-low.c (mips_get_pc):
3249 (mips_set_pc): Change prototype to take a regcache. Adjust.
3250 (mips_reinsert_addr): Adjust.
3251 (mips_collect_register): Change prototype to take a regcache.
3252 Adjust.
3253 (mips_supply_register):
3254 (mips_collect_register_32bit, mips_supply_register_32bit)
3255 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
3256 (mips_store_fpregset): Ditto.
3257 * linux-ppc-low.c (ppc_supply_ptrace_register, ppc_supply_ptrace_register):
3258 Ditto.
3259 (parse_spufs_run): Adjust.
3260 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
3261 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
3262 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
3263 take a regcache. Adjust.
3264 * linux-s390-low.c (s390_collect_ptrace_register)
3265 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
3266 (s390_set_pc): Change prototype to take a regcache. Adjust.
3267 (s390_arch_setup): Adjust.
3268 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
3269 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
3270 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
3271 (sparc_fill_gregset, sparc_store_gregset_from_stack)
3272 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
3273 regcache. Adjust.
3274 (sparc_breakpoint_at): Adjust.
3275 * linux-xtensa-low.c (xtensa_fill_gregset):
3276 (xtensa_store_gregset):
3277 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
3278 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
3279 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
3280 prototype to take a regcache. Adjust.
3281 * win32-arm-low.c (arm_fetch_inferior_register)
3282 (arm_store_inferior_register): Change prototype to take a
3283 regcache. Adjust.
3284 * win32-i386-low.c (i386_fetch_inferior_register)
3285 (i386_store_inferior_register): Change prototype to take a
3286 regcache. Adjust.
3287 * win32-low.c (child_fetch_inferior_registers)
3288 (child_store_inferior_registers): Change prototype to take a
3289 regcache. Adjust.
3290 (win32_wait): Adjust.
3291 (win32_fetch_inferior_registers): Change prototype to take a
3292 regcache. Adjust.
3293 (win32_store_inferior_registers): Adjust.
3294 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
3295 store_inferior_register>: Change prototype to take a regcache.
3296
60c3d7b0
DE
32972010-01-20 Doug Evans <dje@google.com>
3298
3299 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
3300 #ifdef.
3301 (linux_wait_for_event1, linux_init_signals): Ditto.
ec8ebe72 3302 (W_STOPCODE): Provide definition if missing.
60c3d7b0 3303
dc146f7c
VP
33042010-01-13 Vladimir Prus <vladimir@codesourcery.com>
3305
3306 * linux-low.c (linux_core_of_thread): New.
3307 (compare_ints, show_process, list_threads): New.
3308 (linux_qxfer_osdata): Report threads and cores.
3309 (linux_target_op): Register linux_core_of_thread.
3310 * remote-utils.c (prepare_resume_reply): Report the core.
3311 (buffer_xml_printf): Support %d specifier.
3312 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
3313 New.
3314 (handle_query): Handle qXfer:threads. Announce availability
3315 thereof.
3316 * target.h (struct target_ops): New field core_of_thread.
3317
7803799a
UW
33182010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
3319
3320 * Makefile.in (clean): Remove new generated files.
3321 (reg-s390.o, reg-s390.c): Remove rules.
3322 (reg-s390x.o, reg-s390x.c): Likewise.
3323 (s390-linux32.o, s390-linux32.c): Add rules.
3324 (s390-linux64.o, s390-linux64.c): Likewise.
3325 (s390x-linux64.o, s390x-linux64.c): Likewise.
3326 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
3327 * linux-s390-low.c: Include <elf.h>.
3328 (HWCAP_S390_HIGH_GPRS): Define if undefined.
3329 (init_registers_s390): Remove prototype.
3330 (init_registers_s390x): Likewise.
3331 (init_registers_s390_linux32): Add prototype.
3332 (init_registers_s390_linux64): Likewise.
3333 (init_registers_s390x_linux64): Likewise.
3334 (s390_num_regs_3264): New define.
3335 (s390_regmap_3264): New global variable.
3336 (s390_cannot_fetch_register): Remove obsolete check.
3337 (s390_cannot_store_register): Likewise.
3338 (s390_collect_ptrace_register): Handle upper/lower register halves.
3339 (s390_supply_ptrace_register): Likewise.
3340 (s390_fill_gregset): Update to register number changes.
3341 (s390_get_hwcap): New routine.
3342 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
3343 Install appropriate regmap and register set.
3344
6e7ffa39
JB
33452010-01-01 Joel Brobecker <brobecker@adacore.com>
3346
3347 * server.c (gdbserver_version): Update copyright year to 2010.
3348 * gdbreplay.c (gdbreplay_version): Likewise.
3349
957f3f49
DE
33502009-12-28 Doug Evans <dje@google.com>
3351
3352 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
3353 elf/external.h. Include <elf.h> instead but only if necessary.
3354
ca5c370d
PA
33552009-12-28 Pedro Alves <pedro@codesourcery.com>
3356
3357 * linux-low.c (linux_remove_process): Remove `detaching'
3358 parameter. Don't release/detach from thread_db here.
3359 (linux_kill): Release/detach from thread_db here, ...
3360 (linux_detach): ... and here, before actually detaching.
3361 (linux_wait_1): ... and here, when a process exits.
3362 * thread-db.c (any_thread_of): New.
3363 (thread_db_free): Switch the current inferior to a thread of the
3364 passed in process.
3365
4ee62156
DE
33662009-12-21 Doug Evans <dje@google.com>
3367
d90e6a88
DE
3368 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
3369
c5f62d5f
DE
3370 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
3371 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
3372 warning ifndef __NR_tkill. Move setting of errno there too.
3373 Delete unnecessary resetting of errno after syscall.
3374 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
3375
10e86dd7
DE
3376 * configure.ac: Check for dladdr.
3377 * config.in: Regenerate.
3378 * configure: Regenerate.
3379 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
3380 (try_thread_db_load): Update.
3381
4ee62156
DE
3382 * linux-low.c (my_waitpid): Delete unnecessary prototype.
3383
00f515da
DE
33842009-12-18 Doug Evans <dje@google.com>
3385
e9464885
DE
3386 * event-loop.c: Include unistd.h if it exists.
3387
07d4f67e
DE
3388 * linux-low.c (my_waitpid): Move definition away from being in
3389 between linux_tracefork_child/linux_test_for_tracefork.
3390
00f515da
DE
3391 * gdb_proc_service.h (psaddr_t): Fix type.
3392 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
3393 signature to match glibc.
3394
1de1badb
DE
33952009-12-16 Doug Evans <dje@google.com>
3396
3397 * linux-low.c (linux_read_memory): Fix argument to read.
3398
aeeb81d1
PA
33992009-11-26 Pedro Alves <pedro@codesourcery.com>
3400
3401 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
3402 events, don't leave current_inferior pointing at null.
3403
10357975
PA
34042009-11-26 Pedro Alves <pedro@codesourcery.com>
3405
3406 * win32-low.c (LOG): Delete.
3407 (OUTMSG): Output to stderr.
3408 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
3409 on compile time LOG macro.
3410 (win32_wait): Fix debug output.
3411
cf6e3471
PA
34122009-11-26 Pedro Alves <pedro@codesourcery.com>
3413
3414 * win32-low.c (win32_add_one_solib): If the dll name is
3415 "ntdll.dll", prepend the system directory to the dll path.
3416
0c85e18e
MK
34172009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
3418
3419 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
3420
9ac544ce 34212009-11-17 Nathan Sidwell <nathan@codesourcery.com>
889bf7c5 3422 Vladimir Prus <vladimir@codesourcery.com>
9ac544ce
MK
3423
3424 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
3425 * configure.ac: Check for __mcoldfire__ and set
3426 gdb_cv_m68k_is_coldfire.
3427 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
3428 reg-cf.o and reg-m68k.o.
3429 * configure: Regenerated.
3430
fd7dd3e6
PA
34312009-11-16 Pedro Alves <pedro@codesourcery.com>
3432
3433 * linux-low.c (linux_remove_process): Add `detaching' parameter.
3434 Pass it to thread_db_free.
3435 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
3436 proper `detaching' argument to linux_remove_process.
3437 * linux-low.h (thread_db_free): Add `detaching' parameter.
3438 * thread-db.c (thread_db_init): Pass false as `detaching' argument
3439 to thread_db_free.
3440 (thread_db_free): Add `detaching' parameter. Only
3441 call td_ta_clear_event if detaching from process.
3442
75aa492e
MK
34432009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
3444
3445 * thread-db.c (thread_db_free): Fix typo.
3446
21e1bee4
PP
34472009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
3448
3449 PR gdb/10838
3450 * thread-db.c (thread_db_free): Call td_ta_clear_event.
3451
8838b45e
NS
34522009-11-03 Nathan Sidwell <nathan@codesourcery.com>
3453
3454 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
3455 with an i686 compiler.
3456 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
3457 needed.
3458 * configure: Rebuilt.
3459
8a35fb51
SL
34602009-10-29 Sandra Loosemore <sandra@codesourcery.com>
3461
3462 PR gdb/10783
3463
3464 * server.c (handle_search_memory_1): Correct read_addr initialization
3465 in loop for searching subsequent chunks.
3466
96f15937
PP
34672009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
3468
3469 * configure.ac: New --with-libthread-db option.
3470 * thread-db.c: Allow direct dependence on libthread_db.
3471 (thread_db_free): Adjust.
3472 * config.in: Regenerate.
3473 * configure: Likewise.
889bf7c5 3474
5f7d1694
PP
34752009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
3476
3477 PR gdb/10757
3478 * thread-db.c (attach_thread): New function.
3479 (maybe_attach_thread): Return success/failure.
3480 (find_new_threads_callback): Adjust.
889bf7c5
PA
3481 (thread_db_find_new_threads): Loop until no new threads.
3482
88e3b899
PA
34832009-10-13 Pedro Alves <pedro@codesourcery.com>
3484
3485 * proc-service.c (ps_lgetregs): Formatting.
3486
cdbfd419
PP
34872009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
3488
3489 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
3490 * configure.ac: Adjust.
3491 * linux-low.h (struct process_info_private): Move members to struct
3492 thread_db.
3493 (thread_db_free, thread_db_handle_monitor_command): New prototype.
3494 * linux-low.c (linux_remove_process): Adjust.
3495 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
3496 * server.c (handle_query): Move code ...
3497 (handle_monitor_command): ... here. New function.
3498 * target.h (struct target_ops): New member.
3499 * thread-db.c (struct thread_db): New.
3500 (libthread_db_search_path): New variable.
3501 (thread_db_create_event, thread_db_enable_reporting)
3502 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
3503 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
3504 (try_thread_db_load_1, dladdr_to_soname): New functions.
3505 (try_thread_db_load, thread_db_load_search): New functions.
3506 (thread_db_init): Search for libthread_db.
3507 (thread_db_free): New function.
3508 (thread_db_handle_monitor_command): Likewise.
3509 * config.in: Regenerate.
3510 * configure: Regenerate.
889bf7c5 3511
4168d2d6
UW
35122009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
3513
3514 * spu-low.c (spu_kill): Wait for inferior to terminate.
3515 Call clear_inferiors.
3516 (spu_detach): Call clear_inferiors.
3517
81ecdfbb
RW
35182009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
3519
3520 * aclocal.m4: Regenerate.
3521 * config.in: Likewise.
3522 * configure: Likewise.
3523
0b9ff2c0
UW
35242009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
3525
3526 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
3527 (parse_spufs_run): New function.
3528 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
3529 (ppc_breakpoint_at): Handle SPU breakpoints.
3530
efcbbd14
UW
35312009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
3532
3533 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
3534 (SPUFS_MAGIC): Define.
3535 (spu_enumerate_spu_ids): New function.
3536 (linux_qxfer_spu): New function.
3537 (linux_target_ops): Install linux_qxfer_spu.
3538
f4d9bade
UW
35392009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
3540
3541 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
3542 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
3543 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
3544 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
3545 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
3546 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
3547 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
3548 (init_registers_powerpc_cell32l): Add prototype.
3549 (init_registers_powerpc_cell64l): Likewise.
3550 (ppc_arch_setup): Detect Cell/B.E. architecture.
3551
96e946ca
RW
35522009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
3553
3554 * Makefile.in (datarootdir): New variable.
3555
58d6951d
DJ
35562009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
3557
3558 * linux-low.c (linux_write_memory): Update debugging output.
3559 * Makefile.in (clean): Add new descriptions.
3560 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
3561 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
3562 * configure.srv: Add new files for arm*-*-linux*.
3563 * linux-arm-low.c: Add new declarations.
3564 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
3565 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
3566 (HWCAP_VFPv3D16): New.
3567 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
3568 instead of __IWMMXT__.
3569 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
3570 (arm_arch_setup): New.
3571 (target_regsets): Remove #ifdef. Add VFP regset.
3572 (the_low_target): Use arm_arch_setup.
3573
12b42a12
DJ
35742009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
3575
3576 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
3577 the main thread again.
3578
ac8c974e
AR
35792009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
3580
3581 Adding Neutrino gdbserver.
3582 * configure: Regenerated.
3583 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
3584 * configure.srv (i[34567]86-*-nto*): New target.
3585 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
3586 * remote-utils.c [__QNX__]: Include sys/iomgr.h
3587 (nto_comctrl) [__QNX__]: New function.
3588 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
3589
4424e0c3 35902009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7437790a
PA
3591
3592 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
3593 srv_tgtobj.
3594
912cf4ba
PA
35952009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
3596 Pedro Alves <pedro@codesourcery.com>
3597
3598 * win32-i386-low.c (i386_get_thread_context): Handle systems that
3599 don't support CONTEXT_EXTENDED_REGISTERS.
3600 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
3601 (the_low_target): Install them.
3602 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
3603 failing with ERROR_PIPE_NOT_CONNECTED.
3604
aa5ca48f
DE
36052009-06-30 Doug Evans <dje@google.com>
3606 Pierre Muller <muller@ics.u-strasbg.fr>
3607
3608 Add h/w watchpoint support to x86-linux, win32-i386.
3609 * Makefile.in (SFILES): Add i386-low.c
3610 (i386_low_h): Define.
3611 (i386-low.o): Add dependencies.
3612 (linux-x86-low.o): Add i386-low.h dependency.
3613 (win32-i386-low.o): Ditto.
3614 * i386-low.c: New file.
3615 * i386-low.h: New file.
3616 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
3617 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
3618 * linux-low.c (linux_add_process): Initialize arch_private.
3619 (linux_remove_process): Free arch_private.
3620 (add_lwp): Initialize arch_private.
3621 (delete_lwp): Free arch_private.
3622 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
3623 provided.
3624 * linux-low.h (process_info_private): New member arch_private.
3625 (lwp_info): New member arch_private.
3626 (linux_target_ops): New members new_process, new_thread,
3627 prepare_to_resume.
3628 (ptid_of): New macro.
3629 * linux-x86-low.c: Include stddef.h, i386-low.h.
3630 (arch_process_info): New struct.
3631 (arch_lwp_info): New struct.
3632 (x86_linux_dr_get, x86_linux_dr_set): New functions.
3633 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
3634 (i386_dr_low_get_status): New function.
3635 (x86_insert_point, x86_remove_point): New functions.
3636 (x86_stopped_by_watchpoint): New function.
3637 (x86_stopped_data_address): New function.
3638 (x86_linux_new_process, x86_linux_new_thread): New functions.
3639 (x86_linux_prepare_to_resume): New function.
3640 (the_low_target): Add entries for insert_point, remove_point,
3641 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
3642 prepare_to_resume.
3643 * server.c (debug_hw_points): New global.
3644 (monitor_show_help): Document set debug-hw-points.
3645 (handle_query): Process "set debug-hw-points".
3646 * server.h (debug_hw_points): Declare.
3647 (paddress): Declare.
3648 * utils.c (NUMCELLS, CELLSIZE): New macros.
3649 (get_sell, xsnprintf, paddress): New functions.
3650 * win32-arm-low.c (the_low_target): Add entries for insert_point,
3651 remove_point, stopped_by_watchpoint, stopped_data_address.
3652 * win32-i386-low.c: Include i386-low.h.
3653 (debug_reg_state): Replaces dr.
3654 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
3655 (i386_dr_low_get_status): New function.
3656 (i386_insert_point, i386_remove_point): New functions.
3657 (i386_stopped_by_watchpoint): New function.
3658 (i386_stopped_data_address): New function.
3659 (i386_initial_stuff): Update.
3660 (get_thread_context,set_thread_context,i386_thread_added): Update.
3661 (the_low_target): Add entries for insert_point,
3662 remove_point, stopped_by_watchpoint, stopped_data_address.
3663 * win32-low.c (win32_insert_watchpoint): New function.
3664 (win32_remove_watchpoint): New function.
3665 (win32_stopped_by_watchpoint): New function.
3666 (win32_stopped_data_address): New function.
3667 (win32_target_ops): Add entries for insert_watchpoint,
3668 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
3669 * win32-low.h (win32_target_ops): New members insert_point,
3670 remove_point, stopped_by_watchpoint, stopped_data_address.
3671
d993e290
PA
36722009-06-25 Pedro Alves <pedro@codesourcery.com>
3673
3674 * server.c (process_serial_event): Re-return unsupported, not
3675 error, if the type isn't recognized. Re-allow supporting only
3676 insert or remove packets. Also call require_running for
3677 breakpoints. Add missing break statement to default case. Tidy.
3678 * target.h (struct target_ops): Rename insert_watchpoint to
3679 insert_point, and remove_watchpoint to remove_point.
3680
3681 * linux-low.h (struct linux_target_ops): Likewise.
3682 * linux-low.c (linux_insert_watchpoint): Rename to ...
3683 (linux_insert_point): ... this. Adjust.
3684 (linux_remove_watchpoint): Rename to ...
3685 (linux_remove_point): ... this. Adjust.
3686 (linux_target_ops): Adjust.
3687 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
3688 (cris_insert_point): ... this.
3689 (cris_remove_watchpoint): Rename to ...
3690 (cris_remove_point): ... this.
3691 (the_low_target): Adjust.
3692
0f54c268
PM
36932009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
3694
3695 * server.c (handle_v_kill): Pass signal_pid to
3696 kill_inferior if multi_process is zero.
3697
c6314022
AR
36982009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
3699
3700 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
3701 * target.h (target_ops): Comment for *_watchpoint to make it clear
3702 the functions can get types '0' and '1'.
3703
4463ce24
AR
37042009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
3705
3706 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
3707 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
3708 * regcache.c (get_regcache): Likewise.
3709 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
3710 * win32-low.c (child_fetch_inferior_registers): Remove check for
3711 regno 0.
3712
cf8fd78b
PA
37132009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
3714 Pedro Alves <pedro@codesourcery.com>
3715
3716 * target.h (struct target_ops) <supports_multi_process>: New
3717 callback.
3718 (target_supports_multi_process): New.
3719 * server.c (handle_query): Even if GDB reports support, only
3720 enable multi-process if the target also supports it. Report
3721 multi-process support only if the target backend supports it.
3722 * linux-low.c (linux_supports_multi_process): New function.
3723 (linux_target_ops): Install it as target_supports_multi_process
3724 callback.
3725
47c0c975
DE
37262009-05-24 Doug Evans <dje@google.com>
3727
e09875d4
DE
3728 Global renaming of find_thread_pid to find_thread_ptid.
3729 * server.h (find_thread_ptid): Renamed from find_thread_pid.
3730 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
3731 All callers updated.
3732
e27d73f6
DE
3733 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
3734 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
3735 directly.
3736
47c0c975
DE
3737 * linux-low.c (get_stop_pc): Print pc if debug_threads.
3738 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
3739 (linux_resume_one_lwp): Ditto.
3740
2acc282a
DE
37412009-05-23 Doug Evans <dje@google.com>
3742
3743 * linux-low.c (linux_resume_one_lwp): Change type of first arg
3744 from struct inferior_list_entry * to struct lwp_info *.
3745 All callers updated.
3746
9f1036c1
DE
37472009-05-13 Doug Evans <dje@google.com>
3748
3749 * linux-x86-low.c: Don't include assert.h.
3750 (x86_siginfo_fixup): Use fatal, not assert.
3751 (x86_arch_setup): Fix comment.
3752
d0722149
DE
37532009-05-12 Doug Evans <dje@google.com>
3754
3755 Biarch support for i386/amd64 gdbserver.
3756 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
3757 Add linux-x86-low.c.
3758 (linux-i386-low.o, linux-x86-64-low.o): Delete.
3759 (linux-x86-low.o): Add.
3760 * linux-x86-64-low.c: Delete.
3761 * linux-i386-low.c: Delete.
3762 * linux-x86-low.c: New file.
3763 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
3764 linux-x86-low.o.
3765 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
3766 linux-x86-low.o.
3767 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
3768 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
3769 (linux_child_pid_to_exec_file): New function.
3770 (elf_64_header_p, elf_64_file_p): New functions.
3771 (siginfo_fixup): New function.
3772 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
3773 give target a chance to convert layout.
3774 * linux-low.h (linux_target_ops): New member siginfo_fixup.
3775 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
3776
fdeb2a12
DE
37772009-05-07 Doug Evans <dje@google.com>
3778
3779 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
3780 (regsets_store_inferior_registers): Ditto.
3781
a6dbe5df
PA
37822009-05-06 Pedro Alves <pedro@codesourcery.com>
3783
3784 PR server/10048
3785
3786 * linux-low.c (must_set_ptrace_flags): Delete.
3787 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
3788 of the global.
3789 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
3790 `lwp->must_set_ptrace_flags' instead.
ba42693b 3791 (linux_wait_for_event_1): Set ptrace options here.
a6dbe5df
PA
3792 (linux_wait_1): ... not here.
3793
5091eb23
DE
37942009-04-30 Doug Evans <dje@google.com>
3795
9f767825
DE
3796 * inferiors.c (started_inferior_callback): New function.
3797 (attached_inferior_callback): New function.
3798 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
3799 * server.c (print_started_pid, print_attached_pid): New functions.
3800 (detach_or_kill_for_exit): New function.
3801 (main): Call it instead of for_each_inferior (kill_inferior_callback).
3802 * server.h (have_started_inferiors_p): Declare.
3803 (have_attached_inferiors_p): Declare.
3804
5091eb23
DE
3805 * inferiors.c (remove_process): Fix memory leak, free process.
3806 * linux-low.c (linux_remove_process): New function.
3807 (linux_kill): Call it instead of remove_process.
3808 (linux_detach, linux_wait_1): Ditto.
3809
155c8968
PA
38102009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
3811
3812 * configure.srv: Add x86 Windows CE target.
3813
7fe519cb
UW
38142009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
3815
3816 * inferiors.c (get_thread_process): Make global.
3817 * server.h (get_thread_process): Add prototype.
3818 * thread-db.c (find_one_thread): Use get_thread_process
3819 instead of current_process.
3820 (thread_db_get_tls_address): Do not crash if called when
3821 thread layer is not yet initialized.
3822
5472f405
UW
38232009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
3824
3825 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
3826 * spu-low.c (current_tid): Rename to ...
3827 (current_ptid): ... this.
3828 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
3829 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
3830 ptid_get_lwp (current_ptid) instead of current_tid.
3831 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
3832 instead of current_tid. Use find_process_pid to verify pid
3833 argument is valid. Pass proper argument to remove_process.
3834 (spu_thread_alive): Compare current_ptid instead of current_tid.
3835 (spu_resume): Likewise.
3836
55ac2b99
PA
38372009-04-02 Pedro Alves <pedro@codesourcery.com>
3838
3839 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
3840 variable.
3841
95954743
PA
38422009-04-01 Pedro Alves <pedro@codesourcery.com>
3843
3844 Implement the multiprocess extensions, and add linux multiprocess
3845 support.
3846
3847 * server.h (ULONGEST): Declare.
3848 (struct ptid, ptid_t): New.
3849 (minus_one_ptid, null_ptid): Declare.
3850 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
3851 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
3852 (struct inferior_list_entry): Change `id' type from unsigned from
3853 to ptid_t.
3854 (struct sym_cache, struct breakpoint, struct
3855 process_info_private): Forward declare.
3856 (struct process_info): Declare.
3857 (current_process): Declare.
3858 (all_processes): Declare.
3859 (initialize_inferiors): Declare.
3860 (add_thread): Adjust to use ptid_t.
3861 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
3862 (add_process, remove_process, find_thread_pid): Declare.
3863 (find_inferior_id): Adjust to use ptid_t.
3864 (cont_thread, general_thread, step_thread): Change type to ptid_t.
3865 (multi_process): Declare.
3866 (push_event): Adjust to use ptid_t.
3867 (read_ptid, write_ptid): Declare.
3868 (prepare_resume_reply): Adjust to use ptid_t.
3869 (clear_symbol_cache): Declare.
3870 * inferiors.c (all_processes): New.
3871 (null_ptid, minus_one_ptid): New.
3872 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
3873 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
3874 (add_thread): Change unsigned long to ptid. Remove gdb_id
3875 parameter. Adjust.
3876 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
3877 (gdb_id_to_thread): Rename to ...
3878 (find_thread_pid): ... this. Change unsigned long to ptid.
3879 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
3880 (loaded_dll, pull_pid_from_list): Adjust.
3881 (add_process, remove_process, find_process_pid)
3882 (get_thread_process, current_process, initialize_inferiors): New.
3883 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
3884 (struct target_waitstatus) <related_pid>: Ditto.
3885 (struct target_ops) <kill, detach>: Add `pid' argument. Change
3886 return type to int.
3887 (struct target_ops) <join>: Add `pid' argument.
3888 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
3889 (struct target_ops) <wait>: Add `ptid' field. Change return type
3890 to ptid.
3891 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
3892 (mywait): Add `ptid' argument. Change return type to ptid_t.
3893 (target_pid_to_str): Declare.
3894 * target.c (set_desired_inferior): Adjust to use ptids.
3895 (mywait): Add new `ptid' argument. Adjust.
3896 (target_pid_to_str): New.
3897 * mem-break.h (free_all_breakpoints): Declare.
3898 * mem-break.c (breakpoints): Delelete.
3899 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
3900 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
3901 to use per-process breakpoint list.
3902 (free_all_breakpoints): New.
3903 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
3904 (symbol_cache, all_symbols_looked_up): Delete.
3905 (hexchars): New.
3906 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
3907 read_ptid): New.
3908 (prepare_resume_reply): Change ptid argument's type from unsigned
3909 long to ptid_t. Adjust. Implement W;process and X;process.
3910 (free_sym_cache, clear_symbol_cache): New.
3911 (look_up_one_symbol): Adjust to per-process symbol cache. *
3912 * server.c (cont_thread, general_thread, step_thread): Change type
3913 to ptid_t.
3914 (attached): Delete.
3915 (multi_process): New.
3916 (last_ptid): Change type to ptid_t.
3917 (struct vstop_notif) <ptid>: Change type to ptid_t.
3918 (queue_stop_reply, push_event): Change `ptid' argument's type to
3919 ptid_t.
3920 (discard_queued_stop_replies): Add `pid' argument.
3921 (start_inferior): Adjust to use ptids. Adjust to mywait interface
3922 changes. Don't reference the `attached' global.
3923 (attach_inferior): Adjust to mywait interface changes.
3924 (handle_query): Adjust to use ptids. Parse GDB's qSupported
3925 features. Handle and report "multiprocess+". Handle
3926 "qAttached:PID".
3927 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
3928 changes.
3929 (handle_v_kill): New.
3930 (handle_v_stopped): Adjust to use target_pid_to_str.
3931 (handle_v_requests): Allow multiple attaches and runs when
3932 multiprocess extensions are in effect. Handle "vKill".
3933 (myresume): Adjust to use ptids.
3934 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
3935 (handle_status): Adjust to discard_queued_stop_replies interface
3936 change.
3937 (first_thread_of, kill_inferior_callback)
3938 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
3939 (main): Call initialize_inferiors. Adjust to use ptids, killing
3940 and detaching from all inferiors. Handle multiprocess packet
3941 variants.
3942 * linux-low.h: Include gdb_proc_service.h.
3943 (struct process_info_private): New.
3944 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
3945 <lwpid_of>: Use ptid_get_lwp.
3946 (get_lwp_thread): Adjust.
3947 (struct lwp_info): Add `dead' member.
3948 (find_lwp_pid): Declare.
3949 * linux-low.c (thread_db_active): Delete.
3950 (new_inferior): Adjust comment.
3951 (inferior_pid): Delete.
3952 (linux_add_process): New.
3953 (handle_extended_wait): Adjust.
3954 (add_lwp): Change unsigned long to ptid.
3955 (linux_create_inferior): Add process to processes table. Adjust
3956 to use ptids. Don't set new_inferior here.
3957 (linux_attach_lwp): Rename to ...
3958 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
3959 it. Adjust to use ptids.
3960 (linux_attach_lwp): New.
3961 (linux_attach): Add process to processes table. Don't set
3962 new_inferior here.
3963 (struct counter): New.
3964 (second_thread_of_pid_p, last_thread_of_process_p): New.
3965 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
3966 multiple processes.
3967 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
3968 processes. Remove process from process table.
3969 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
3970 to multiple processes.
3971 (any_thread_of): New.
3972 (linux_detach): Add `pid' argument, and handle it. Remove process
3973 from processes table.
3974 (linux_join): Add `pid' argument. Handle it.
3975 (linux_thread_alive): Change unsighed long argument to ptid_t.
3976 Consider dead lwps as not being alive.
3977 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
3978 threads we're not interested in.
3979 (same_lwp, find_lwp_pid): New.
3980 (linux_wait_for_lwp): Change `pid' argument's type from int to
3981 ptid_t. Adjust.
3982 (linux_wait_for_event): Rename to ...
3983 (linux_wait_for_event_1): ... this. Change `pid' argument's type
3984 from int to ptid_t. Adjust.
3985 (linux_wait_for_event): New.
3986 (linux_wait_1): Add `ptid' argument. Change return type to
3987 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
3988 that exit from the process table.
3989 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
3990 Adjust.
3991 (mark_lwp_dead): New.
3992 (wait_for_sigstop): Adjust to use ptids. If a process exits while
3993 stopping all threads, mark its main lwp as dead.
3994 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
3995 ptids.
3996 (fetch_register, usr_store_inferior_registers)
3997 (regsets_fetch_inferior_registers)
3998 (regsets_store_inferior_registers, linux_read_memory)
3999 (linux_write_memory): Inline `inferior_pid'.
4000 (linux_look_up_symbols): Adjust to use per-process
4001 `thread_db_active'.
4002 (linux_request_interrupt): Adjust to use ptids.
4003 (linux_read_auxv): Inline `inferior_pid'.
4004 (initialize_low): Don't reference thread_db_active.
4005 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
4006 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
4007 (ps_getpid): Return the pid of the current inferior.
4008 * thread-db.c (proc_handle, thread_agent): Delete.
4009 (thread_db_create_event, thread_db_enable_reporting): Adjust to
4010 per-process data.
4011 (find_one_thread): Change argument type to ptid_t. Adjust to
4012 per-process data.
4013 (maybe_attach_thread): Adjust to per-process data and ptids.
4014 (thread_db_find_new_threads): Ditto.
4015 (thread_db_init): Ditto.
4016 * spu-low.c (spu_create_inferior, spu_attach): Add process to
4017 processes table. Adjust to use ptids.
4018 (spu_kill, spu_detach): Adjust interface. Remove process from
4019 processes table.
4020 (spu_join, spu_thread_alive): Adjust interface.
4021 (spu_wait): Adjust interface. Remove process from processes
4022 table. Adjust to use ptids.
4023 * win32-low.c (current_inferior_tid): Delete.
4024 (current_inferior_ptid): New.
4025 (debug_event_ptid): New.
4026 (thread_rec): Take a ptid. Adjust.
4027 (child_add_thread): Add `pid' argument. Adjust to use ptids.
4028 (child_delete_thread): Ditto.
4029 (do_initial_child_stuff): Add `attached' argument. Add process to
4030 processes table.
4031 (child_fetch_inferior_registers, child_store_inferior_registers):
4032 Adjust.
4033 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
4034 (win32_attach): Pass 1 to do_initial_child_stuff.
4035 (win32_kill): Adjust interface. Remove process from processes
4036 table.
4037 (win32_detach): Ditto.
4038 (win32_join): Adjust interface.
4039 (win32_thread_alive): Take a ptid.
4040 (win32_resume): Adjust to use ptids.
4041 (get_child_debug_event): Ditto.
4042 (win32_wait): Adjust interface. Remove exiting process from
4043 processes table.
4044
bd99dc85
PA
40452009-04-01 Pedro Alves <pedro@codesourcery.com>
4046
4047 Non-stop mode support.
4048
4049 * server.h (non_stop): Declare.
4050 (gdb_client_data, handler_func): Declare.
4051 (delete_file_handler, add_file_handler, start_event_loop):
4052 Declare.
4053 (handle_serial_event, handle_target_event, push_event)
4054 (putpkt_notif): Declare.
4055 * target.h (enum resume_kind): New.
4056 (struct thread_resume): Replace `step' field by `kind' field.
4057 (TARGET_WNOHANG): Define.
4058 (struct target_ops) <wait>: Add `options' argument.
4059 <supports_non_stop, async, start_non_stop>: New fields.
4060 (target_supports_non_stop, target_async): New.
4061 (start_non_stop): Declare.
4062 (mywait): Add `options' argument.
4063 * target.c (mywait): Add `options' argument. Print child exit
4064 notifications here.
4065 (start_non_stop): New.
4066 * server.c (non_stop, own_buf, mem_buf): New globals.
4067 (struct vstop_notif): New.
4068 (notif_queue): New global.
4069 (queue_stop_reply, push_event, discard_queued_stop_replies)
4070 (send_next_stop_reply): New.
4071 (start_inferior): Adjust to use resume_kind. Adjust to mywait
4072 interface changes.
4073 (attach_inferior): In non-stop mode, don't wait for the target
4074 here.
4075 (handle_general_set): Handle QNonStop.
4076 (handle_query): When handling qC, return the current general
4077 thread, instead of the first thread of the list.
4078 (handle_query): If the backend supports non-stop mode, include
4079 QNonStop+ in the qSupported query response.
4080 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
4081 and non-stop mode.
4082 (handle_v_attach, handle_v_run): Handle non-stop mode.
4083 (handle_v_stopped): New.
4084 (handle_v_requests): Report support for vCont;t. Handle vStopped.
4085 (myresume): Adjust to use resume_kind. Handle non-stop.
4086 (queue_stop_reply_callback): New.
4087 (handle_status): Handle non-stop mode.
4088 (main): Clear non_stop flag on reconnection. Use the event-loop.
4089 Refactor serial protocol handling from here ...
4090 (process_serial_event): ... to this new function. When GDB
4091 selects any thread, select one here. In non-stop mode, wait until
4092 GDB acks all pending events before exiting.
4093 (handle_serial_event, handle_target_event): New.
4094 * remote-utils.c (remote_open): Install remote_desc in the event
4095 loop.
4096 (remote_close): Remove remote_desc from the event loop.
4097 (putpkt_binary): Rename to...
4098 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
4099 (putpkt_binary): New as wrapper around putpkt_binary_1.
4100 (putpkt_notif): New.
4101 (prepare_resume_reply): In non-stop mode, don't change the
4102 general_thread.
4103 * event-loop.c: New.
4104 * Makefile.in (OBJ): Add event-loop.o.
4105 (event-loop.o): New rule.
4106
4107 * linux-low.h (pid_of): Moved here.
4108 (lwpid_of): New.
4109 (get_lwp_thread): Use lwpid_of.
4110 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
4111 * linux-low.c (pid_of): Delete.
4112 (inferior_pid): Use lwpid_of.
4113 (linux_event_pipe): New.
4114 (target_is_async_p): New.
4115 (delete_lwp): New.
4116 (handle_extended_wait): Use lwpid_of.
4117 (add_lwp): Don't set lwpid field.
4118 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
4119 (linux_kill_one_lwp): If killing a running lwp, stop it first.
4120 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
4121 (linux_detach_one_lwp): If detaching from a running lwp, stop it
4122 first. Adjust to linux_wait_for_event interface changes. Use
4123 lwpid_of.
4124 (linux_detach): Don't delete the main lwp here.
4125 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
4126 (status_pending_p): Don't consider explicitly suspended lwps.
4127 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
4128 pointer. Add OPTIONS argument. Change return type to int. Use
4129 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
4130 (linux_wait_for_event): Take an integer pid instead of a lwp_info
4131 pointer. Add status pointer argument. Return a pid instead of a
4132 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
4133 changes. In non-stop mode, don't switch to a random thread.
4134 (linux_wait): Rename to...
4135 (linux_wait_1): ... this. Add target_options argument, and handle
4136 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
4137 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
4138 clean exit and signal exit code. Don't stop all threads in
4139 non-stop mode. In all-stop mode, only stop all threads when
4140 reporting a stop to GDB. Handle explicit thread stop requests.
4141 (async_file_flush, async_file_mark): New.
4142 (linux_wait): New.
4143 (send_sigstop): Use lwpid_of.
4144 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
4145 interface changes. In non-stop mode, don't switch to a random
4146 thread.
4147 (linux_resume_one_lwp): Use lwpid_of.
4148 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
4149 (linux_resume_one_thread): ... this. Handle resume_stop. In
4150 non-stop mode, don't look for pending flag in all threads.
4151 (resume_status_pending_p): Don't consider explicitly suspended
4152 threads.
4153 (my_waitpid): Reimplement. Emulate __WALL.
4154 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
4155 Use lwpid_of.
4156 (sigchld_handler, linux_supports_non_stop, linux_async)
4157 (linux_start_non_stop): New.
4158 (linux_target_ops): Register linux_supports_non_stop, linux_async
4159 and linux_start_non_stop.
4160 (initialize_low): Install SIGCHLD handler.
4161 * thread-db.c (thread_db_create_event, find_one_thread)
4162 (thread_db_get_tls_address): Use lwpid_of.
4163 * win32-low.c (win32_detach): Adjust to use resume_kind.
4164 (win32_wait): Add `options' argument.
4165 * spu-low.c (spu_resume): Adjust to use resume_kind.
4166 (spu_wait): Add `options' argument.
4167
5b1c542e
PA
41682009-04-01 Pedro Alves <pedro@codesourcery.com>
4169
4170 Decouple target code from remote protocol.
4171
4172 * target.h (enum target_waitkind): New.
4173 (struct target_waitstatus): New.
4174 (struct target_ops) <wait>: Return an unsigned long. Take a
4175 target_waitstatus pointer instead of a char pointer.
4176 (mywait): Likewise.
4177 * target.c (mywait): Change prototype to return an unsigned long.
4178 Take a target_waitstatus pointer instead of a char pointer. Adjust.
4179 * server.h (thread_from_wait, old_thread_from_wait): Delete
4180 declarations.
4181 (prepare_resume_reply): Change prototype to take a
4182 target_waitstatus.
4183 * server.c (thread_from_wait, old_thread_from_wait): Delete.
4184 (last_status, last_ptid): New.
4185 (start_inferior): Remove "statusptr" argument. Adjust. Return a
4186 pid instead of a signal.
4187 (attach_inferior): Remove "status" and "signal" parameters.
4188 Adjust.
4189 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
4190 not as an address.
4191 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
4192 (handle_v_requests, myresume): Remove "status" and "signal"
4193 parameters. Adjust.
4194 (handle_status): New.
4195 (main): Delete local `status'. Adjust.
4196 * remote-utils.c: Include target.h.
4197 (prepare_resume_reply): Change prototype to take a
4198 target_waitstatus. Adjust.
4199
4200 * linux-low.c (linux_wait): Adjust to new target_ops->wait
4201 interface.
4202 * spu-low.c (spu_wait): Adjust.
4203 * win32-low.c (enum target_waitkind, struct target_waitstatus):
4204 Delete.
4205 (win32_wait): Adjust.
4206
2bd7c093
PA
42072009-04-01 Pedro Alves <pedro@codesourcery.com>
4208
4209 * target.h (struct thread_resume): Delete leave_stopped member.
4210 (struct target_ops): Add a `n' argument to the `resume' callback.
4211 * server.c (start_inferior): Adjust.
4212 (handle_v_cont, myresume): Adjust.
4213 * linux-low.c (check_removed_breakpoint): Adjust to resume
4214 interface change, and to removed leave_stopped field.
4215 (resume_ptr): Delete.
4216 (struct thread_resume_array): New.
4217 (linux_set_resume_request): Add new `arg' parameter. Adjust to
4218 resume interface change.
4219 (linux_continue_one_thread, linux_queue_one_thread)
4220 (resume_status_pending_p): Check if the resume field is NULL
4221 instead of checking the leave_stopped member.
4222 (linux_resume): Adjust to the target resume interface change.
4223 * spu-low.c (spu_resume): Adjust to the target resume interface
4224 change.
4225 * win32-low.c (win32_detach, win32_resume): Ditto.
4226
c35fafde
PA
42272009-04-01 Pedro Alves <pedro@codesourcery.com>
4228
4229 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
4230 flag.
4231 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
4232 pending.
4233 (linux_continue_one_thread): Only preserve the stepping flag if
4234 there's a pending breakpoint.
4235
0a59d50b
PA
42362009-03-31 Pedro Alves <pedro@codesourcery.com>
4237
4238 * server.c (main): After the inferior having exited, call
4239 remote_close before exiting gdbserver.
4240
f04c6d38
TJB
42412009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
4242
4243 Fix size of FPSCR in Power 7 processors.
4244 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
4245 (PPC_FEATURE_HAS_DFP): New #define.
4246 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
4247 size of the FPSCR.
4248
78e5cee6
PA
42492009-03-23 Pedro Alves <pedro@codesourcery.com>
4250
4251 * server.c (handle_query) Whitespace and formatting.
4252
1b3f6016
PA
42532009-03-22 Pedro Alves <pedro@codesourcery.com>
4254
4255 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
4256 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
4257 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
4258 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
4259 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
4260 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
4261 Makefile.in, configure.ac: Fix whitespace throughout.
4262 * configure: Regenerate.
4263
a07b2135
PA
42642009-03-22 Pedro Alves <pedro@codesourcery.com>
4265
4266 * inferiors.c (find_inferior): Make it safe for the callback
4267 function to delete the currently iterated inferior.
4268
67cc2626
PA
42692009-03-22 Pedro Alves <pedro@codesourcery.com>
4270
4271 * Makefile.in (linuw_low_h): Move higher.
4272 (thread-db.o): Depend on $(linux_low_h).
4273
54a0b537
PA
42742009-03-17 Pedro Alves <pedro@codesourcery.com>
4275
4276 Rename "process" to "lwp" throughout.
4277
4278 * linux-low.c (all_processes): Rename to...
4279 (all_lwps): ... this.
4280 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
4281 (add_process): Rename to ...
4282 (add_lwp): ... this. Adjust.
4283 (linux_create_inferior): Adjust.
4284 (linux_attach_lwp): Adjust.
4285 (linux_attach): Adjust.
4286 (linux_kill_one_process): Rename to ...
4287 (linux_kill_one_lwp): ... this. Adjust.
4288 (linux_kill): Adjust.
4289 (linux_detach_one_process): Rename to ...
4290 (linux_detach_one_lwp): ... this. Adjust.
4291 (linux_detach): Adjust.
4292 (check_removed_breakpoint): Adjust.
4293 (status_pending_p): Adjust.
4294 (linux_wait_for_process): Rename to ...
4295 (linux_wait_for_lwp): ... this. Adjust.
4296 (linux_wait_for_event): Adjust.
4297 (send_sigstop): Adjust.
4298 (wait_for_sigstop): Adjust.
4299 (stop_all_processes): Rename to ...
4300 (stop_all_lwps): ... this.
4301 (linux_resume_one_process): Rename to ...
4302 (linux_resume_one_lwp): ... this. Adjust.
4303 (linux_set_resume_request, linux_continue_one_thread)
4304 (linux_queue_one_thread, resume_status_pending_p)
4305 (usr_store_inferior_registers, regsets_store_inferior_registers)
4306 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
4307 Adjust.
4308 * linux-low.h (get_process): Rename to ...
4309 (get_lwp): ... this. Adjust.
4310 (get_thread_process): Rename to ...
4311 (get_thread_lwp): ... this. Adjust.
4312 (get_process_thread): Rename to ...
4313 (get_lwp_thread): ... this. Adjust.
4314 (struct process_info): Rename to ...
4315 (struct lwp_info): ... this.
4316 (all_processes): Rename to ...
4317 (all_lwps): ... this.
4318 * proc-service.c (ps_lgetregs): Adjust.
4319 * thread-db.c (thread_db_create_event, find_one_thread)
4320 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
4321
0b16c5cf
PA
43222009-03-14 Pedro Alves <pedro@codesourcery.com>
4323
4324 * server.c (handle_query): Handle "qAttached".
4325
32de4b9d
NS
43262009-03-13 Nathan Sidwell <nathan@codesourcery.com>
4327
4328 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
4329 GPLv3, update license URL.
4330
2aecd87f
DE
43312009-03-01 Doug Evans <dje@google.com>
4332
93efd302 4333 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
2aecd87f
DE
4334 (server_h): Add gdb_signals.h.
4335 (signals.o): Update.
4336 * server.h (target_signal_from_host,target_signal_to_host_p)
4337 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
4338
86b1f9c5
PM
43392009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
4340
4341 * remote-utils.c (getpkt): Also generate remote-debug
4342 information if noack_mode is set.
4343
4aa995e1
PA
43442009-02-06 Pedro Alves <pedro@codesourcery.com>
4345
4346 * server.c (handle_query): Report qXfer:siginfo:read and
4347 qXfer:siginfo:write as supported and handle them.
4348 * target.h (struct target_ops) <qxfer_siginfo>: New field.
4349 * linux-low.c (linux_xfer_siginfo): New.
4350 (linux_target_ops): Set it.
4351
62709adf
PA
43522009-01-26 Pedro Alves <pedro@codesourcery.com>
4353
4354 * server.c (gdbserver_usage): Mention --remote-debug.
4355 (main): Accept '--remote-debug' switch.
4356
aef93bd7
DE
43572009-01-18 Doug Evans <dje@google.com>
4358
4359 * regcache.c (new_register_cache): No need to check result of xcalloc.
4360 * server.c (handle_search_memory): Back out calls to xmalloc,
4361 result is checked and error is returned to user upon failure.
4362 (handle_query): Ditto. Add more checks for result of malloc.
4363 (handle_v_cont): Check result of malloc, report error back to
4364 user upon failure.
4365 (handle_v_run): Ditto. Call freeargv.
4366 * server.h (freeargv): Declare.
4367 * utils.c (freeargv): New fn.
4368
54363045
DE
43692009-01-15 Doug Evans <dje@google.com>
4370
f626972c
DE
4371 * gdbreplay.c (perror_with_name): Make arg const char *.
4372 * server.h (target_signal_to_name): Make return type const char *.
0842e787 4373 * thread-db.c (thread_db_err_str): Make return type const char *.
f626972c 4374 * utils.c (perror_with_name): Make arg const char *.
54363045 4375
18aae699
PA
43762009-01-14 Pedro Alves <pedro@codesourcery.com>
4377
4378 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
4379 when handling a EXIT_PROCESS_DEBUG_EVENT.
4380
ff703abe
JB
43812009-01-06 Joel Brobecker <brobecker@adacore.com>
4382
4383 * gdbreplay.c (gdbreplay_version): Update copyright year.
4384 * server.c (gdbserver_version): Likewise.
4385
f21cc1a2 43862009-01-05 Doug Evans <dje@google.com>
0e21c1ec
DE
4387
4388 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
f21cc1a2 4389 (handle_extended_wait): Improve comment.
0e21c1ec 4390
bca929d3
DE
43912008-12-13 Doug Evans <dje@google.com>
4392
4393 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
4394 * server.h (ATTR_MALLOC): New macro.
4395 (xmalloc,xcalloc,xstrdup): Declare.
4396 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
4397 * inferiors.c: Ditto.
4398 * linux-low.c: Ditto.
4399 * mem-break.c: Ditto.
4400 * regcache.c: Ditto.
4401 * remote-utils.c: Ditto.
4402 * server.c: Ditto.
4403 * target.c: Ditto.
4404 * win32-low.c: Ditto.
4405
97438e3f
DE
44062008-12-12 Doug Evans <dje@google.com>
4407
896c7fbb
DE
4408 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
4409 in debugging printf.
4410
97438e3f
DE
4411 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
4412
e3b886f8
DE
44132008-12-09 Doug Evans <dje@google.com>
4414
4415 * linux-low.h (struct process_info): Delete member tid, unused.
4416 * thread-db.c (find_one_thread): Update.
4417 (maybe_attach_thread): Update.
4418
07e059b5
VP
44192008-12-02 Pedro Alves <pedro@codesourcery.com>
4420
889bf7c5
PA
4421 * target.h (struct target_ops): Add qxfer_osdata member.
4422 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
4423 and dirent.h.
4424 (linux_qxfer_osdata): New functions.
4425 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
4426 callback.
4427 * server.c (handle_query): Handle "qXfer:osdata:read:".
4428 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
4429 (buffer_xml_printf): New functions.
4430 * server.h (struct buffer): New.
4431 (buffer_grow_str, buffer_grow_str0): New macros.
4432 (buffer_grow, buffer_free, buffer_init, buffer_finish)
4433 (buffer_xml_printf): Declare.
07e059b5 4434
4cab47ab
DE
44352008-11-24 Doug Evans <dje@google.com>
4436
4437 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
4438
f142445f
DJ
44392008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
4440
4441 * server.c (handle_v_run): Always use the supplied argument list.
4442
d0107bb6 44432008-11-19 Bob Wilson <bob.wilson@acm.org>
889bf7c5 4444
d0107bb6
BW
4445 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
4446 (xtensa_regmap_table): Add entry for scompare1.
889bf7c5 4447
2c4ad781
TJB
44482008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
4449
4450 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
4451 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
4452 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
4453 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
4454 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
4455 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
4456 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
4457 XML target descriptions.
4458 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
4459 when inferior is running on an ISA 2.05 or later processor. Add
4460 special case to return offset for full 64-bit slot of FPSCR when
4461 in 32-bits.
4462
dfb64f85
DJ
44632008-11-14 Daniel Gutson <dgutson@codesourcery.com>
4464
4465 * Makefile.in (SFILES, clean): Added sparc64 files.
4466 (reg-sparc64.o, reg-sparc64.c): New.
4467 * configure.srv (sparc*-*-linux*): New configuration.
4468 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
4469 syscall arguments for SPARC.
4470 (regsets_store_inferior_registers): Likewise.
4471 * linux-sparc-low.c: New file.
4472
66b6e1dd
DE
44732008-10-21 Doug Evans <dje@google.com>
4474
4475 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
4476 (READLINE_DIR,READLINE_DEP): Delete.
4477 (INTERNAL_CFLAGS): Update.
4478 (LINTFLAGS): Update.
4479
9b710a42
PA
44802008-10-10 Pedro Alves <pedro@codesourcery.com>
4481
4482 * server.c (handle_v_run): If GDB didn't specify an argv, use the
4483 whole argv from the last run, not just argv[0].
4484
5822d809
PA
44852008-09-08 Pedro Alves <pedro@codesourcery.com>
4486
4487 * regcache.c (new_register_cache): Return NULL if the register
4488 cache size isn't known yet.
4489 (free_register_cache): Avoid dereferencing a NULL regcache.
4490
74aac56f
DJ
44912008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
4492
4493 * configure.srv: Merge MIPS and MIPS64.
4494
400b20f5
MR
44952008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
4496
4497 * Makefile.in (uninstall): Apply $(EXEEXT) too.
4498
677c5bb1
LM
44992008-08-18 Luis Machado <luisgpm@br.ibm.com>
4500
4501 * Makefile.in: Add required vsx dependencies.
4502
4503 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
4504 Declare init_registers_powerpc_vsx32l.
4505 Declare init_registers_powerpc_vsx64l.
4506 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
4507 (ppc_arch_setup): Check for VSX in hwcap.
4508 (ppc_fill_vsxregset): New function.
4509 (ppc_store_vsxregset): New function.
4510 Add new VSX entry in regset_info target_regsets.
4511
4512 * configure.srv: Add new VSX dependencies.
4513
a6f3e723
SL
45142008-08-12 Pedro Alves <pedro@codesourcery.com>
4515
4516 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
4517 (remote_open): Set or clear transport_is_reliable.
4518 (putpkt_binary): Don't expect acks in noack mode.
4519 (getpkt): Don't send ack/nac in noack mode.
4520 * server.c (handle_general_set): Handle QStartNoAckMode.
4521 (handle_query): If connected by tcp pass QStartNoAckMode+ in
4522 qSupported.
4523 (main): Reset noack_mode on every connection.
4524 * server.h (noack_mode): Declare.
4525
a417dc56
RW
45262008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
4527
4528 * Makefile.in (GDBREPLAY_OBS): New variable.
4529 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
4530
3221518c
UW
45312008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
4532 Daniel Jacobowitz <dan@codesourcery.com>
4533
4534 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
4535 (usr_store_inferior_registers): Likewise.
4536 (regsets_store_inferior_registers): Likewise.
4537
ec56be1b
PA
45382008-07-31 Rolf Jansen <rj@surtec.com>
4539 Pedro Alves <pedro@codesourcery.com>
4540
4541 * configure.ac: Check for memmem declaration.
4542 * server.c [HAVE_MALLOC_H]: Include malloc.h.
4543 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
4544 (disable_packet_qfThreadInfo): Unconditionally compile.
4545 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
4546 * configure, config.in: Regenerate.
4547
2fe5e3ff
DE
45482008-07-28 Doug Kwan <dougkwan@google.com>
4549
4550 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
4551 (linux_write_memory): Remove declaration of errno.
4552
836acd6d
UW
45532008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
4554
4555 * linux-low.c (handle_extended_wait): Do not use "status"
4556 variable uninitialized.
4557
aeba519e
PA
45582008-07-07 Pedro Alves <pedro@codesourcery.com>
4559
4560 * server.c (handle_v_attach): Inhibit reporting dll changes.
4561
db42f210
PA
45622008-06-27 Pedro Alves <pedro@codesourcery.com>
4563
4564 * remote-utils.c (prepare_resume_reply): If requested, don't
4565 output "thread:TID" in the T stop reply.
4566
4567 * server.c (disable_packet_vCont, disable_packet_Tthread)
4568 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
4569 (handle_query): If requested, disable support for qC, qfThreadInfo
4570 and qsThreadInfo.
4571 (handle_v_requests): If requested, disable support for vCont.
4572 (gdbserver_show_disableable): New.
4573 (main): Handle --disable-packet and --disable-packet=LIST.
4574
4575 * server.h (disable_packet_vCont, disable_packet_Tthread)
4576 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
4577
8e4c5421
CD
45782008-06-20 Carlos O'Donell <carlos@codesourcery.com>
4579
4580 * server.c (gdbserver_usage): Mention --version.
4581
6e23a804
DJ
45822008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
4583
4584 * Makefile.in (gdbreplay.o): New rule.
4585
90aa6a40
JM
45862008-06-06 Joseph Myers <joseph@codesourcery.com>
4587
4588 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
4589 message, not gdbserver.
4590
c16158bc 45912008-06-05 Vladimir Prus <vladimir@codesourcery.com>
889bf7c5
PA
4592 Nathan Sidwell <nathan@codesourcery.com>
4593 Joseph Myers <joseph@codesourcery.com>
c16158bc
JM
4594
4595 * acinclude.m4: Include ../../config/acx.m4.
4596 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
4597 * configure, config.in: Regenerate.
4598 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
4599 * server.c (gdbserver_version): Print PKGVERSION.
4600 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
4601 (main): Adjust gdbserver_usage calls.
4602 * gdbreplay.c (version, host_name): Add declarations.
4603 (gdbreplay_version, gdbreplay_usage): New.
4604 (main): Accept --version and --help options.
4605
aeb75bf5
DJ
46062008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
4607
4608 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
4609 (arm_breakpoint_at): Handle Thumb.
4610 (the_low_target): Add comment.
4611
76b233dd
UW
46122008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
4613
4614 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
4615
08388c79
DE
46162008-05-09 Doug Evans <dje@google.com>
4617
a3c83fae
DE
4618 * server.h (decode_search_memory_packet): Declare.
4619 * remote-utils.c (decode_search_memory_packet): New fn.
4620 * server.c (handle_search_memory_1): New fn.
08388c79
DE
4621 (handle_search_memory): New fn.
4622 (handle_query): Process qSearch:memory packets.
4623
bb9c3d36
UW
46242008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
4625
4626 * regcache.c (registers_length): Remove.
4627 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
4628 full register packet.
4629 * regcache.h (registers_length): Remove prototype.
4630 * server.h (PBUFSIZ): Define to 16384.
4631
7284e1be
UW
46322008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
4633
4634 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
4635 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
4636 powerpc-64l.o, and powerpc-altivec64l.o.
4637 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
4638 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
4639 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
4640 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
4641 rs6000/power-linux.xml, and rs6000/power64-linux.xml
4642 to srv_xmlfiles.
4643
4644 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
4645 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
4646 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
4647 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
4648 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
4649 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
4650 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
4651 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
4652 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
4653 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
4654 (clean): Update.
4655
4656 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
4657 (init_registers_powerpc_32l): ... this new prototype.
4658 (init_registers_powerpc_32): Remove, replace by ...
4659 (init_registers_powerpc_altivec32l): ... this new prototype.
4660 (init_registers_powerpc_e500): Remove, replace by ...
4661 (init_registers_powerpc_e500l): ... this new prototype.
4662 (init_registers_ppc64): Remove, replace by ...
4663 (init_registers_powerpc_64l): ... this new prototype.
4664 (init_registers_powerpc_64): Remove, replace by ...
4665 (init_registers_powerpc_altivec64l): ... this new prototype.
4666 (ppc_num_regs): Set to 73.
4667 (PT_ORIG_R3, PT_TRAP): Define if necessary.
4668 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
4669 (ppc_cannot_store_register): Handle orig_r3 and trap.
4670 (ppc_arch_setup): Update init_registers_... calls.
4671 (ppc_fill_gregset): Handle orig_r3 and trap.
4672
4673 * inferiors.c (clear_inferiors): Reset current_inferior.
4674
fdc59709
PB
46752008-04-23 Paolo Bonzini <bonzini@gnu.org>
4676
889bf7c5
PA
4677 * acinclude.m4: Add override.m4.
4678 * configure: Regenerate.
fdc59709 4679
c9b2f845
UW
46802008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
4681
4682 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
4683 initial call to init_register_ppc64.
4684
550512b8
UW
46852008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
4686
4687 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into single
4688 powerpc*-*-linux* case.
4689 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
4690
b6430ec3
UW
46912008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
4692
4693 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
889bf7c5 4694 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
b6430ec3
UW
4695 from reg_xmlfiles.
4696 * linux-ppc-low.c: Include <elf.h>.
4697 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
4698 (ppc_hwcap): New global variable.
4699 (ppc_regmap): Remove __SPE__ #ifdef sections.
4700 (ppc_regmap_e500): New global variable.
4701 (ppc_cannot_store_register): Update __SPE__ special case.
4702 (ppc_get_hwcap): New function.
4703 (ppc_arch_setup): Use it to determine whether inferior supports
4704 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
4705 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
4706 Do not access registers if target does not support AltiVec.
4707 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
4708 Do not access registers if target does not support SPE.
4709 (target_regsets): Unconditionally include AltiVec and SPE regsets.
4710
52fa2412
UW
47112008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
4712
4713 * linux-low.c (disabled_regsets, num_regsets): New.
4714 (use_regsets_p): Delete.
4715 (linux_wait_for_process): Clear disabled_regsets.
4716 (regsets_fetch_inferior_registers): Check and set it.
4717 (regsets_store_inferior_registers): Likewise.
4718 (linux_fetch_registers, linux_store_registers): Do not use
4719 use_regsets_p.
4720 (initialize_low): Allocate disabled_regsets.
4721
e28b3332
DJ
47222008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
4723
4724 * Makefile.in (LIBOBJS): New.
4725 (OBS): Use LIBOBJS.
4726 (memmem.o): New rule.
4727 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
4728 * configure: Regenerated.
4729
4536995d
UW
47302008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
4731
4732 * server.c (handle_query): Never return "unsupported" for
4733 qXfer:features:read queries.
4734
221c031f
UW
47352008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
4736
4737 * server.c (get_features_xml): Fix inverted condition.
4738 (handle_query): Always support qXfer:feature:read.
4739
ccd213ac
DJ
47402008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
4741
4742 * server.c (wrapper_argv): New.
4743 (start_inferior): Handle wrapper_argv. If set, expect an extra
4744 trap.
4745 (gdbserver_usage): Document --wrapper.
4746 (main): Parse --wrapper.
4747
6fe305f7
UW
47482008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
4749
4750 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
4751 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
4752 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
4753 (ppc_set_pc): Likewise.
4754 (ppc_arch_setup): New function.
4755 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
4756 of collect_register.
889bf7c5 4757 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
6fe305f7 4758
5b0a002e
UW
47592008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
4760
4761 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
4762 instead of linux-ppc64-low.o.
4763 * linux-ppc64-low.c: Remove file.
4764 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
4765 (linux-ppc64-low.o): Remove rule.
4766
4767 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
4768 (init_registers_powerpc_64): Likewise.
4769 (ppc_regmap): Conditionally define depending on __powerpc64__.
4770 (ppc_cannot_store_register): Do not special-case "fpscr" when
4771 compiled on __powerpc64__.
4772 (ppc_collect_ptrace_register): New function.
4773 (ppc_supply_ptrace_register): New function.
4774 (ppc_breakpoint): Change type to "unsigned int".
4775 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
4776 (the_low_target): Conditionally provide initializers for the
889bf7c5 4777 arch_setup member depending on __powerpc64__. Install
5b0a002e
UW
4778 collect_ptrace_register and supply_ptrace_register members.
4779
9b4b61c8
UW
47802008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
4781
4782 * regcache.h (gdbserver_xmltarget): Add extern declaration.
4783 * server.c (gdbserver_xmltarget): Define.
4784 (get_features_xml): Use it to replace "target.xml" and arch_string.
4785
4786 * configure.srv: Remove srv_xmltarget. Add XML files that were
4787 mentioned there to srv_xmlfiles instead. Remove conditional tests
4788 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
4789 srv_xmlfiles and srv_regobj to include all possible choices.
4790 * configure.ac (srv_xmltarget): Remove.
4791 (srv_xmlfiles): Do not add "target.xml".
4792 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
4793 checks for supplementary target information.
4794 * configure: Regenerate.
4795 * Makefile.in (XML_TARGET): Remove.
4796 (target.xml): Remove rule.
4797 (clean): Do not clean up target.xml.
4798 (.PRECIOUS): Do not mention target.xml.
4799
4800 * target.h (struct target_ops): Remove arch_string member.
4801 * linux-low.c (linux_arch_string): Remove.
4802 (linux_target_ops): Remove arch_string initializer.
4803 * linux-low.h (struct linux_target_ops): Remove arch_string member.
4804 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
4805 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
4806 * spu-low.c (spu_arch_string): Remove.
4807 (spu_target_ops): Remove arch_string initializer.
4808 * win32-low.c (win32_arch_string): Remove.
4809 (win32_target_ops): Remove arch_string initializer.
4810 * win32-low.h (struct win32_target_ops): Remove arch_string member.
4811 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
4812 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
4813
ee1a7ae4
UW
48142008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
4815
4816 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
4817 by collect_ptrace_register and supply_ptrace_register hooks.
4818 * linux-low.c (fetch_register): Use supply_ptrace_register callback
4819 instead of checking for the_low_target.left_pad_xfer.
4820 (usr_store_inferior_registers): Use collect_ptrace_register callback
4821 instead of checking for the_low_target.left_pad_xfer.
4822
4823 * linux-s390-low.c (s390_collect_ptrace_register): New function.
4824 (s390_supply_ptrace_register): Likewise.
4825 (s390_fill_gregset): Call s390_collect_ptrace_register.
4826 (the_low_target): Update.
4827
4828 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
4829 (ppc_supply_ptrace_register): Likewise.
4830 (the_low_target): Update.
4831
4832 * linux-i386-low.c (the_low_target): Update.
4833 * linux-x86-64-low.c (the_low_target): Update.
4834
d61ddec4
UW
48352008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
4836
4837 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
4838 reg-s390.o and reg-s390x.o.
4839
4840 * linux-low.c (new_inferior): New global variable.
4841 (linux_create_inferior, linux_attach): Set it.
4842 (linux_wait_for_process): Call the_low_target.arch_setup after the
4843 target has stopped for the first time.
4844 (initialize_low): Do not call the_low_target.arch_setup.
4845
4846 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
4847 (s390_set_pc): Likewise.
4848 (s390_arch_setup): New function.
4849 (the_low_target): Use s390_arch_setup as arch_setup routine.
4850
4851 * regcache.c (realloc_register_cache): New function.
4852 (set_register_cache): Call it for each existing regcache.
4853
d05b4ac3
UW
48542008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
4855
4856 * server.h (init_registers): Remove prototype.
4857
4858 * linux-low.h (struct linux_target_ops): Add arch_setup field.
4859 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
4860 instead of init_registers ().
4861 * linux-arm-low.c (init_registers_arm): Add prototype.
4862 (init_registers_arm_with_iwmmxt): Likewise.
4863 (the_low_target): Add initializer for arch_setup field.
4864 * linux-cris-low.c (init_registers_cris): Add prototype.
4865 (the_low_target): Add initializer for arch_setup field.
4866 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
4867 (the_low_target): Add initializer for arch_setup field.
4868 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
4869 (the_low_target): Add initializer for arch_setup field.
4870 * linux-ia64-low.c (init_registers_ia64): Add prototype.
4871 (the_low_target): Add initializer for arch_setup field.
4872 * linux-m32r-low.c (init_registers_m32r): Add prototype.
4873 (the_low_target): Add initializer for arch_setup field.
4874 * linux-m68k-low.c (init_registers_m68k): Add prototype.
4875 (the_low_target): Add initializer for arch_setup field.
4876 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
4877 (init_registers_mips64_linux): Likewise.
4878 (the_low_target): Add initializer for arch_setup field.
4879 * linux-ppc-low.c (init_registers_ppc): Add prototype.
4880 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
4881 (the_low_target): Add initializer for arch_setup field.
4882 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
4883 (init_registers_powerpc_64): Likewise.
4884 (the_low_target): Add initializer for arch_setup field.
4885 * linux-s390-low.c (init_registers_s390): Add prototype.
4886 (init_registers_s390x): Likewise.
4887 (the_low_target): Add initializer for arch_setup field.
4888 * linux-sh-low.c (init_registers_sh): Add prototype.
4889 (the_low_target): Add initializer for arch_setup field.
4890 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
4891 (the_low_target): Add initializer for arch_setup field.
4892 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
4893 (the_low_target): Add initializer for arch_setup field.
4894
4895 * win32-low.h (struct win32_target_ops): Add arch_setup field.
4896 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
4897 instead of init_registers ().
4898 * win32-arm-low.c (init_registers_arm): Add prototype.
4899 (the_low_target): Add initializer for arch_setup field.
4900 * win32-i386-low.c (init_registers_i386): Add prototype.
4901 (the_low_target): Add initializer for arch_setup field.
4902
4903 * spu-low.c (init_registers_spu): Add prototype.
4904 (initialize_low): Call initialie_registers_spu () instead of
4905 initialize_registers ().
4906
fd96d250
PA
49072008-02-19 Pedro Alves <pedro@codesourcery.com>
4908
4909 * server.c (handle_v_requests): When handling the vRun and vAttach
4910 packets, if already debugging a process, don't kill it. Return an
4911 error instead.
4912
d41b6bb4
DJ
49132008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
4914
4915 * server.c (handle_query): Correct length check.
4916
5ac588cf
PA
49172008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
4918
4919 * win32-low.c (do_initial_child_stuff): Add process handle
4920 parameter. Set current_process_handle and current_process_id from the
4921 parameters. Clear globals.
4922 (win32_create_inferior): Don't set current_process_handle and
4923 current_process_id here. Instead pass them on the call to
4924 do_initial_child_stuff.
4925 (win32_attach): Likewise.
4926 (win32_clear_inferiors): New.
4927 (win32_kill): Don't close the current process handle or the
4928 current thread handle here. Instead call win32_clear_inferiors.
4929 (win32_detach): Don't open a new handle to the process. Call
4930 win32_clear_inferiors.
4931 (win32_join): Don't rely on current_process_handle; open a new
4932 handle using the process id.
4933 (win32_wait): Call win32_clear_inferiors when the inferior process
4934 has exited.
4935
ecd7ecbc
DJ
49362008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
4937
4938 * server.c (monitor_show_help): Add "exit".
4939
1525d545
MG
49402008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
4941
ecd7ecbc 4942 * Makefile.in (SFILES): Add linux-xtensa-low.c.
1525d545
MG
4943 (clean): Add reg-xtensa.c.
4944 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
ecd7ecbc
DJ
4945 * configure.srv (xtensa*-*-linux*) New target.
4946 * linux-xtensa-low.c: New.
4947 * xtensa-xtregs.c: New.
1525d545 4948
59a016f0
PA
49492008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
4950
4951 * hostio.c: Don't include errno.h.
4952 (errno_to_fileio_errno): Move to hostio-errno.
4953 * hostio.c: (hostio_error): Remove the error parameter. Defer the
4954 error number outputting to the target->hostio_last_error callback.
4955 (hostio_packet_error): Use FILEIO_EINVAL directly.
4956 (handle_open, handle_pread, hostio_error, handle_unlink): Update
4957 calls to hostio_error.
4958 * hostio-errno.c: New.
4959 * server.h (hostio_last_error_from_errno): Declare.
4960 * target.h (target_ops): Add hostio_last_error member.
4961 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
4962 as hostio_last_error handler.
889bf7c5 4963 * spu-low.c (spu_target_ops): Likewise.
59a016f0
PA
4964 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
4965 (wince_hostio_last_error): New functions.
4966 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
4967 as hostio_last_error handler.
4968 (win32_target_ops) [!_WIN32_WCE]: Register
4969 hostio_last_error_from_errno as hostio_last_error handler.
4970 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
4971 (hostio-errno.o): New rule.
4972 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
4973 * configure.srv (srv_hostio_err_objs): New variable. Default to
4974 hostio-errno.o.
4975 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
4976 * configure: Regenerate.
4977
2d717e4f
DJ
49782008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
4979
4980 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
4981 (linux_kill, linux_detach): Clean up the process list.
4982 * remote-utils.c (remote_open): Improve port number parsing.
4983 (putpkt_binary, input_interrupt): Only send interrupts if the target
4984 is running.
4985 * server.c (extended_protocol): Make static.
4986 (attached): Define earlier.
4987 (exit_requested, response_needed, program_argv): New variables.
4988 (target_running): New.
4989 (start_inferior): Clear attached here.
4990 (attach_inferior): Set attached here.
4991 (require_running): Define.
4992 (handle_query): Use require_running and target_running. Implement
4993 "monitor exit".
4994 (handle_v_attach, handle_v_run): New.
4995 (handle_v_requests): Use require_running. Handle vAttach and vRun.
4996 (gdbserver_usage): Update.
4997 (main): Redo argument parsing. Handle --debug and --multi. Handle
4998 --attach along with other options or after the port. Save
4999 program_argv. Support no initial program. Resynchronize
5000 communication with GDB after an error. Handle "monitor exit".
5001 Use require_running and target_running. Always allow the extended
5002 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
5003 restart in extended mode.
5004 * README: Refer to the GDB manual. Update --attach usage.
5005
7407e2de
AS
50062007-12-20 Andreas Schwab <schwab@suse.de>
5007
5008 * linux-low.c (STACK_SIZE): Define.
5009 (linux_tracefork_child): Use it. Use __clone2 on ia64.
5010 (linux_test_for_tracefork): Likewise.
5011
b65d95c5
DJ
50122007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
5013
5014 * linux-low.c (linux_wait_for_event): Update messages. Do not
5015 reinsert auto-delete breakpoints.
5016 * mem-break.c (struct breakpoint): Change return type of handler to
5017 int.
5018 (set_breakpoint_at): Update handler type.
5019 (reinsert_breakpoint_handler): Return 1 instead of calling
5020 delete_breakpoint.
5021 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
5022 setting a new one.
5023 (check_breakpoints): Delete auto-delete breakpoints and return 2.
5024 * mem-break.h (set_breakpoint_at): Update handler type.
5025 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
5026 * win32-low.c (auto_delete_breakpoint): New.
5027 (get_child_debug_event): Use it.
5028
4e799345
DJ
50292007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
5030
5031 * configure.ac: Check for pread and pwrite.
5032 * hostio.c (handle_pread): Fall back to lseek and read.
5033 (handle_pwrite): Fall back to lseek and write.
5034 * config.in, configure: Regenerated.
5035
27524b67
DJ
50362007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
5037
5038 * server.c (myresume): Add own_buf argument.
5039 (main): Update calls.
5040
a20d5e98
DJ
50412007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
5042
5043 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
5044 * remote-utils.c (remote_open): Do not call disable_async_io.
5045 (block_async_io): Delete.
5046 (unblock_async_io): Make static.
5047 (initialize_async_io): New.
5048 * server.c (handle_v_cont): Handle async I/O here.
5049 (myresume): Likewise. Move other common resume tasks here...
5050 (main): ... from here. Call initialize_async_io. Disable async
5051 I/O before the main loop.
5052 * server.h (initialize_async_io): Declare.
5053 (block_async_io, unblock_async_io): Delete prototypes.
5054 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
5055
b79d787e
DJ
50562007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
5057
5058 * remote-utils.c (readchar): Allow binary data in received messages.
5059
d97903b2
PA
50602007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
5061
5062 * win32-low.c (attaching): New global.
5063 (win32_create_inferior): Clear the `attaching' global.
5064 (win32_attach): Set the `attaching' global.
5065 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
5066 attaching. Only set a breakpoint at the entry point if not
5067 attaching.
5068
311de423
PA
50692007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
5070
5071 * server.c (main): Don't report dll events on the initial
5072 connection on attaches.
5073
6c2d16d2
PA
50742007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
5075
5076 * server.c (main): Relax numerical bases supported for the pid of
5077 the --attach command line argument.
5078
5ca906e6
PA
50792007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
5080
5081 * win32-low.c (win32_attach): Call OpenProcess before
5082 DebugActiveProcess, not after. Add last error output to error
5083 call.
5084
9c6c8194
PA
50852007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
5086
5087 * win32-low.c (win32_get_thread_context)
5088 (win32_set_thread_context): New functions.
5089 (thread_rec): Use win32_get_thread_context.
5090 (continue_one_thread, win32_resume): Use win32_set_thread_context.
5091 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
5092 field.
5093
4d5d1aaa
PA
50942007-12-03 Leo Zayas
5095 Pedro Alves <pedro_alves@portugalmail.pt>
5096
5097 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
5098 global variables.
5099 (child_add_thread): Minor cleanup.
5100 (child_continue): Resume artificially suspended threads before
5101 calling ContinueDebugEvent.
5102 (suspend_one_thread): New.
5103 (fake_breakpoint_event): New.
5104 (get_child_debug_event): Change return type to int. Check here if
5105 gdb sent an interrupt request. If a soft interrupt was requested,
5106 fake a breakpoint event. Return 0 if there is no event to handle,
5107 and 1 otherwise.
5108 (win32_wait): Don't check here if gdb sent an interrupt request.
5109 Ensure there is a valid event to handle.
5110 (win32_request_interrupt): Add soft interruption method as last
5111 resort.
5112
c436e841
PA
51132007-12-03 Leo Zayas
5114 Pedro Alves <pedro_alves@portugalmail.pt>
5115
5116 * win32-low.h (win32_thread_info): Add descriptions to the
5117 structure members. Replace `suspend_count' counter by a
5118 `suspended' flag.
5119 * win32-low.c (thread_rec): Update condition of when to get the
5120 context from the inferior. Rely on ContextFlags being set if it
5121 has already been retrieved. Only suspend the inferior thread if
5122 we haven't already. Warn if that fails.
5123 (continue_one_thread): s/suspend_count/suspended/. Only call
5124 ResumeThread once. Warn if that fails.
5125
e7b5fa67
PA
51262007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
5127
5128 * win32-low.c (win32_wait): Don't read from the inferior when it
5129 has already exited.
5130
a385171d
PA
51312007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
5132
5133 * Makefile.in (win32_low_h): New variable.
5134 (win32-low.o): Add dependency on $(win32_low_h).
5135 (win32-arm-low.o, win32-i386-low.o): New rules.
5136
f80c84b3
DJ
51372007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
5138
5139 * hostio.c: Correct copyright year.
5140
a6b151f1
DJ
51412007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
5142
5143 * Makefile.in (OBS): Add hostio.o.
5144 (hostio.o): New rule.
5145 * server.h (handle_vFile): Declare.
5146 * hostio.c: New file.
5147 * server.c (handle_v_requests): Take packet_len and new_packet_len
5148 for binary packets. Call handle_vFile.
5149 (main): Update call to handle_v_requests.
5150
f9387fc3
DJ
51512007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
5152
5153 * linux-low.c: Include <sched.h>.
5154
51c2684e
DJ
51552007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
5156
5157 * linux-low.c (linux_tracefork_grandchild): New.
5158 (linux_tracefork_child): Use clone.
5159 (linux_test_for_tracefork): Use clone; allocate and free a stack.
5160
75f83163
JB
51612007-10-31 Joel Brobecker <brobecker@adacore.com>
5162
5163 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
5164
da5898ce
DJ
51652007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
5166
5167 * linux-low.c (handle_extended_wait): Handle unexpected signals.
5168
24a09b5f
DJ
51692007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
5170
5171 * inferiors.c (change_inferior_id): Delete.
5172 (add_pid_to_list, pull_pid_from_list): New.
5173 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
5174 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
5175 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
5176 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
5177 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
5178 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
5179 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
5180 (using_threads): Always set to 1.
5181 (handle_extended_wait): New.
5182 (add_process): Do not set TID.
5183 (linux_create_inferior): Set must_set_ptrace_flags.
5184 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
5185 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
5186 (linux_thread_alive): Rename TID argument to LWPID.
5187 (linux_wait_for_process): Handle unknown processes. Do not use TID.
5188 (linux_wait_for_event): Do not use TID or check using_threads. Update
5189 call to dead_thread_notify. Call handle_extended_wait.
5190 (linux_create_inferior): Use PTRACE_SETOPTIONS.
5191 (send_sigstop): Delete sigstop_sent.
5192 (wait_for_sigstop): Avoid TID.
5193 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
5194 (linux_test_for_tracefork): New.
5195 (linux_lookup_signals): Use thread_db_active and
5196 linux_supports_tracefork_flag.
5197 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
5198 * linux-low.h (get_process_thread): Avoid TID.
5199 (struct process_ifo): Move thread_known and tid to the end. Remove
5200 sigstop_sent.
5201 (linux_attach_lwp, thread_db_init): Update prototypes.
5202 * server.h (change_inferior_id): Delete prototype.
5203 (add_pid_to_list, pull_pid_from_list): New prototypes.
5204 * thread-db.c (thread_db_use_events): New.
5205 (find_first_thread): Rename to...
5206 (find_one_thread): ...this. Update callers and messages. Do not
5207 call fatal. Check thread_db_use_events. Do not call
5208 change_inferior_id or new_thread_notify.
5209 (maybe_attach_thread): Update. Do not call new_thread_notify.
5210 (thread_db_init): Set thread_db_use_events. Check use_events.
5211 * utils.c (fatal, warning): Correct message prefix.
5212
30ed0a8f
DJ
52132007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
5214
5215 * Makefile.in (clean): Remove new files.
5216 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
5217 (powerpc-64.o, powerpc-64.c): New rules.
5218 * configure.srv: Use alternate register sets for powerpc64-*-linux*
5219 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
5220 with SPE.
5221 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
5222 SPE targets.
5223 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
5224 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
5225 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
5226 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
5227 (target_regsets): Add AltiVec and SPE register sets.
5228 * configure.ac: Check for AltiVec and SPE.
5229 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
5230 (ppc_fill_vrregset, ppc_store_vrregset): New.
5231 (target_regsets): Add AltiVec register set.
5232 * configure: Regenerated.
5233
fd462a61
DJ
52342007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
5235
5236 * linux-low.c (O_LARGEFILE): Define.
5237 (linux_read_memory): Use /proc/PID/mem.
5238 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
5239 * configure, config.in: Regenerated.
5240
69f223ed
DJ
52412007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
5242
5243 * linux-low.c (linux_wait_for_event): Do not pass signals while
5244 single-stepping.
5245
aec18585
PA
52462007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
5247
5248 * win32-low.c (create_process): New.
5249 (win32_create_inferior): Use create_process instead of
5250 CreateProcess. If create_process failed retry appending an ".exe"
5251 suffix. Store the GetLastError result immediatelly after
5252 create_process calls and use it on the call to error.
5253
34d86ddd
PA
52542007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
5255
5256 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
5257
5a0e3bd0
JB
52582007-08-23 Joel Brobecker <brobecker@adacore.com>
5259
5260 * configure.ac: Switch license to GPLv3.
5261
f88c79e6
MS
52622007-08-01 Michael Snyder <msnyder@access-company.com>
5263
5264 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
5265
6b3d9b83
PA
52662007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
5267
5268 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
5269 typedef.
5270 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
5271 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
5272 CloseToolhelp32Snapshot.
5273 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
5274 CloseToolhelp32Snapshot.
5275
c588c53c
MS
52762007-07-27 Michael Snyder <michael.snyder@access-company.com>
5277
5278 * server.c (main): Check for inferior exit before main loop.
5279
aa0403d9
PA
52802007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
5281
5282 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
5283 instead of on tmp_desc.
5284
255e7678
DJ
52852007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
5286 Daniel Jacobowitz <dan@codesourcery.com>
5287
5288 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
5289 (add_thread): Minor cleanups.
5290 (clear_inferiors): Move lower in the file. Clear the DLL
5291 list.
5292 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
5293 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
5294 (xml_escape_text): New.
5295 * server.c (handle_query): Handle qXfer:libraries:read. Report it
5296 for qSupported.
5297 (handle_v_cont): Report errors.
5298 (gdbserver_version): Update.
5299 (main): Correct size of own_buf. Do not report initial DLL events.
5300 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
5301 (unloaded_dll, xml_escape_text): New.
5302 * win32-low.c (enum target_waitkind): Update comments.
5303 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
5304 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
5305 (win32_EnumProcessModules, win32_GetModuleInformation)
5306 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
5307 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
5308 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
5309 (win32_Module32First, win32_Module32Next, load_toolhelp)
5310 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
5311 (get_child_debug_event): Handle DLL events.
5312 (win32_wait): Likewise.
5313
0d37add9
DJ
53142007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
5315
5316 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
5317 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
5318
45e2715e
PA
53192007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
5320
5321 * win32-low.c (handle_output_debug_string): Ignore event if not
5322 waiting.
5323
c5674cf1
PA
53242007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
5325
5326 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
5327
2bbe3cc1
DJ
53282007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
5329
5330 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
5331
ae13219e
DJ
53322007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
5333
5334 * inferiors.c (change_inferior_id): Add comment.
5335 * linux-low.c (check_removed_breakpoint): Add an early
5336 prototype. Improve debug output.
5337 (linux_attach): Doc update.
5338 (linux_detach_one_process, linux_detach): Clean up before releasing
5339 each process.
5340 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
5341 * linux-low.h (struct process_info): Doc improvement.
5342 * mem-break.c (delete_all_breakpoints): New.
5343 * mem-break.h (delete_all_breakpoints): New prototype.
5344 * thread-db.c (find_first_thread): New.
5345 (thread_db_create_event): Call it instead of
5346 thread_db_find_new_threads. Clean up unused variables.
5347 (maybe_attach_thread): Remove first thread handling.
5348 (thread_db_find_new_threads): Use find_first_thread.
5349 (thread_db_get_tls_address): Likewise.
5350
4105de34
DJ
53512007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
5352
5353 * thread-db.c (thread_db_find_new_threads): Add prototype.
5354 (thread_db_create_event): Check for the main thread before adding
5355 a new thread.
5356 (maybe_attach_thread): Only enable event reporting if TID == 0.
5357 (thread_db_get_tls_address): Check for new threads.
5358
2b876972
DJ
53592007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
5360
5361 * linux-low.c (linux_create_inferior): Try execv before execvp.
5362 * spu-low.c (spu_create_inferior): Likewise.
5363
7a245884
DJ
53642007-06-13 Mike Frysinger <vapier@gentoo.org>
5365
5366 * linux-low.c (linux_create_inferior): Change execv to execvp.
5367 * spu-low.c (spu_create_inferior): Likewies.
5368
117ce543
DJ
53692007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
5370
5371 * Makefile.in (clean): Clean new files instead of deleted ones.
5372 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
5373 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
5374 rules.
5375 * configure.srv: Specify XML files and new regformats for MIPS and
5376 MIPS64 GNU/Linux.
5377 * linux-mips-low.c (mips_num_regs): Set to only used registers.
5378 (mips_regmap): Do not fetch $0. Remove unused registers. Add
5379 an entry for the restart register.
5380 (mips_cannot_fetch_register, mips_cannot_store_register)
5381 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
5382 register names to match the XML descriptions.
5383 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
5384 restart register instead of $0.
5385
0e7f50da
UW
53862007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
5387 Markus Deuling <deuling@de.ibm.com>
5388
5389 * remote-utils.c (decode_xfer_write): New function.
5390 * server.h (decode_xfer_write): Add prototype.
5391 * server.c (handle_query): Add PACKET_LEN argument. Support
5392 qXfer:spu:read and qXfer:spu:write packets.
5393 (main): Pass packet_len to handle_query.
5394 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
5395 * target.h (target_ops): Add qxfer_spu.
5396
374c1d38
UW
53972007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
5398
5399 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
5400 accessing non-seekable spufs files.
5401
bb63802a
UW
54022007-05-16 Markus Deuling <deuling@de.ibm.com>
5403
889bf7c5 5404 * server.c (handle_query): Add reply for qC packet.
bb63802a 5405
7390519e
PA
54062007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
5407 Leo Zayas <lerele@champenstudios@com>
5408
5409 * server.h (check_remote_input_interrupt_request): New function.
5410 * remote_utils.c (INVALID_DESCRIPTOR): New define.
5411 (remote_desc): Initialize with INVALID_DESCRIPTOR.
5412 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
5413 (check_remote_input_interrupt_request): New function.
5414 * server.h (check_remote_input_interrupt_request): Declare.
3ecf0694 5415 * win32-low.c (winapi_DebugBreakProcess,
7390519e
PA
5416 winapi_GenerateConsoleCtrlEvent): New typedefs.
5417 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
5418 to 250 ms.
5419 (win32_wait): Check for remote interrupt request
5420 with check_remote_input_interrupt_request.
5421 (win32_request_interrupt): New function.
5422 (win32_target_op): Set request_interrupt to win32_request_interrupt.
5423
34b34921
PA
54242007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
5425
5426 * win32-low.c (debug_registers_changed,
5427 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
5428 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
5429 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
5430 (thread_rec): Get context using the low target.
5431 (child_add_thread): Call thread_added on the low target,
5432 which does the same thing.
5433 (regptr): Delete.
5434 (do_initial_child_stuff): Remove debug registers references.
5435 Set context using the low target. Resume threads after
5436 setting the contexts.
5437 (child_continue): Remove dead variable. Remove debug
5438 registers references.
5439 (child_fetch_inferior_registers): Go through the low target.
5440 (do_child_store_inferior_registers): Remove.
5441 (child_store_inferior_registers): Go through the low target.
5442 (win32_resume): Remove debug registers references.
5443 Set context using the low target.
5444 (handle_exception): Change return type to void. Don't record
5445 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
5446 first chance exception.
889bf7c5 5447 (get_child_debug_event): Change return type to void. Remove
34b34921
PA
5448 goto loop. Always return after waiting for debug event.
5449 (win32_wait): Convert to switch statement. Handle spurious
5450 events.
5451
5452 * win32-i386-low.c (debug_registers_changed,
5453 debug_registers_used): New.
5454 (initial_stuff): Rename to ...
5455 (i386_initial_stuff): ... this. Clear debug registers
5456 state variables.
5457 (store_debug_registers): Delete.
5458 (i386_get_thread_context): New.
5459 (load_debug_registers): Delete.
5460 (i386_set_thread_context): New.
5461 (i386_thread_added): New.
5462 (single_step): Rename to ...
5463 (i386_single_step): ... this.
5464 (do_fetch_inferior_registers): Rename to ...
5465 (i386_fetch_inferior_register): ... this.
5466 (i386_store_inferior_register): New.
5467 (the_low_target): Adapt to new interface.
5468
5469 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
5470 (arm_get_thread_context): New.
5471 (arm_set_thread_context): New.
5472 (regptr): New.
5473 (do_fetch_inferior_registers): Rename to ...
5474 (arm_fetch_inferior_register): ... this.
5475 (arm_store_inferior_register): New.
5476 (arm_wince_breakpoint): Reimplement as unsigned long.
5477 (arm_wince_breakpoint_len): Define.
5478 (the_low_target): Adapt to new interface.
5479
5480 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
5481 load_debug_registers. Add get_thread_context, set_thread_context,
5482 thread_added and store_inferior_register. Rename
5483 fetch_inferior_registers to fetch_inferior_register.
5484 (regptr): Remove declaration.
5485
dd6953e1
PA
54862007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
5487
5488 * linux-low.c (linux_detach): Change return type to int. Return 0.
5489 * spu-low.c (spu_detach): Likewise.
5490
444d6139
PA
54912007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
5492
5493 * target.h (target_ops): Change return type of detach to int.
5494 Add join.
5495 (join_inferior): New.
5496 * server.c (main): Don't skip detach support on mingw32.
5497 If the inferior doesn't support detaching return error.
5498 Call join_inferior instead of using waitpid.
5499 * linux-low.c (linux_join): New.
5500 (linux_target_op): Add linux_join.
5501 * spu-low.c (spu_join): New.
5502 (spu_target_ops): Add spu_join.
5503 * win32-low.c (win32_detach): Adapt to new interface.
5504 Reopen current_process_handle before detaching. Issue a child
5505 resume before detaching.
5506 (win32_join): New.
5507 (win32_target_op): Add win32_join.
5508
1d5315fe
PA
55092007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
5510
5511 * win32-low.c (win32-attach): Fix return value.
5512 * target.h (target_ops): Describe ATTACH return values.
5513
bf914831
PA
55142007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
5515
5516 * win32-low.c (GETPROCADDRESS): Define.
5517 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
5518 (winapi_DebugSetProcessKillOnExit): Likewise.
5519 (win32_create_inferior): Force usage of ansi CreateProcessA.
5520 (win32_attach): Use GETPROCADDRESS.
5521 (win32_detach): Likewise.
5522
f72f3e60
PA
55232007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
5524
5525 * win32-low.c (win32_wait): Don't use WSTOPSIG.
5526
ed50f18f
PA
55272007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
5528
5529 * win32-low.c: Commit leftover changes from 2007-03-29.
5530
0c2ead7e
DJ
55312007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
5532
5533 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
5534 fields short instead of int. Add explicit padding.
5535 (i387_cache_to_fsave): Remove unnecessary casts.
5536 (i387_fsave_to_cache): Doc fix.
5537 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
5538
73725ff3
DJ
55392007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
5540
5541 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
5542 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
5543
d99f33d8
PA
55442007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
5545
5546 * configure.srv (arm*-*-mingw32ce*): Move near the other
5547 arm targets.
5548
68070c10
PA
55492007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
5550
2482afc6 5551 * configure.ac: Add errno checking.
68070c10
PA
5552 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
5553 sys/file.h and malloc.h.
5554 (AC_CHECK_DECLS): Add perror.
5555 (srv_mingwce): Handle.
2482afc6 5556 * configure.srv (i[34567]86-*-cygwin*): Add
68070c10
PA
5557 win32-i386-low.o to srv_tgtobj.
5558 (i[34567]86-*-mingw*): Likewise.
5559 (arm*-*-mingw32ce*): Add case.
5560 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
5561 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
5562 [__MINGW32CE__] (strerror): New function.
5563 [__MINGW32CE__] (errno): Define to GetLastError.
5564 [__MINGW32CE__] (COUNTOF): New macro.
5565 (remote_open): Remove extra close call.
5566 * mem-break.c (delete_breakpoint_at): New function.
5567 * mem-break.h (delete_breakpoint_at): Declare.
5568 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
5569 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
5570 [USE_WIN32API] (read, write): Add char* casts.
5571 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
5572 * server.h: Include wincecompat.h on Windows CE.
5573 [HAVE_ERRNO_H]: Check.
5574 (perror): Declare if not declared.
5575 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
5576 (perror_with_name): Remove errno declaration.
5577 * wincecompat.h: New.
5578 * wincecompat.c: New.
5579 * win32-low.h: New.
5580 * win32-arm-low.c: New.
5581 * win32-i386-low.c: New.
5582 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
5583 (OUTMSG2): Make it safe.
5584 (_T): New macro.
5585 (COUNTOF): New macro.
5586 (NUM_REGS): Get it from the low target.
5587 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
5588 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
5589 (thread_rec): Let low target handle debug registers.
5590 (child_add_thread): Likewise.
5591 (child_init_thread_list): Likewise.
5592 (continue_one_thread): Likewise.
5593 (regptr): New.
5594 (do_child_fetch_inferior_registers): Move to ...
5595 * win32-i386-low.c: ... here, and rename to ...
5596 (do_fetch_inferior_registers): ... this.
889bf7c5 5597 * win32-low.c (child_fetch_inferior_registers):
68070c10
PA
5598 Go through the low target.
5599 (do_child_store_inferior_registers): Use regptr.
5600 (strwinerror): New function.
5601 (win32_create_inferior): Handle Windows CE.
5602 Use strwinerror instead of strerror on Windows error
5603 codes. Add program to the error output.
5604 Don't close the main thread handle on Windows CE.
5605 (win32_attach): Use coredll.dll on Windows CE.
5606 (win32_kill): Close current process and current
5607 thread handles.
5608 (win32_detach): Use coredll.dll on Windows CE.
5609 (win32_resume): Let low target handle debug registers, and
5610 step request.
5611 (handle_exception): Add/Remove initial breakpoint. Avoid
5612 non-existant WSTOPSIG on Windows CE.
5613 (win32_read_inferior_memory): Cast to remove warning.
5614 (win32_arch_string): Go through the low target.
5615 (initialize_low): Call set_breakpoint_data with the low
5616 target's breakpoint.
5617 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
5618 FOP_REGNUM, mappings): Move to ...
5619 * win32-i386-low.c: ... here.
5620 * win32-low.c (win32_thread_info): Move to ...
5621 * win32-low.h: ... here.
5622 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
5623 win32-arm-low.c and wincecompat.c.
5624 (all:): Add $EXEEXT.
5625 (install-only:): Likewise.
5626 (gdbserver:): Likewise.
5627 (gdbreplay:): Likewise.
5628 * config.in: Regenerate.
5629 * configure: Regenerate.
5630
41093d81
PA
56312007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
5632
5633 * win32-low.c: Rename typedef thread_info to
5634 win32_thread_info throughout.
5635
544afa54
PA
56362007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
5637
5638 * win32-i386-low.c: Rename to ...
5639 * win32-low.c: ... this.
5640 * configure.srv: Replace win32-i386-low.o with win32-low.o.
5641 * Makefile.in: Likewise.
5642
bce7165d
PA
56432007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
5644
5645 * remote-utils.c (monitor_output): Constify msg parameter.
5646 * server.h (monitor_output): Likewise.
5647 * win32-i386-low.c (handle_output_debug_string): New.
5648 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
5649 handle_output_debug_string.
5650 (get_child_debug_event): Likewise.
5651
506c7aa0
DJ
56522007-03-27 Mat Hostetter <mat@lcs.mit.edu>
5653
5654 * server.c (main): Correct strtoul check.
5655
42c81e2a
DJ
56562007-03-27 Jon Ringle <jon@ringle.org>
5657
5658 * linux-low.c: Check __ARCH_HAS_MMU__ also.
5659
9453113a
DJ
56602007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
5661
5662 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
5663
64a69107
DJ
56642007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
5665
5666 * terminal.h: Check HAVE_SGTTY_H.
5667
56682007-02-27 Mat Hostetter <mat@lcs.mit.edu>
6f8486da
DJ
5669
5670 * remote-utils.c (remote_open): Print out the assigned port number.
5671
c74d0ad8
DJ
56722007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
5673
5674 * remote-utils.c (monitor_output): New function.
5675 * server.c (debug_threads): Define here.
5676 (monitor_show_help): New function.
5677 (handle_query): Handle qRcmd.
5678 (main): Do not handle 'd' packet.
5679 * server.h (debug_threads, remote_debug, monitor_output): Declare.
5680 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
5681 of debug_threads.
5682
de7c3b4a
PA
56832007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
5684
5685 * Makefile.in (EXEEXT): New.
5686 (clean): Use $(EXEEXT).
5687
ef57601b
PA
56882007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
5689
5690 * target.h (target_ops): Rename send_signal to request_interrupt,
5691 and remove enum target_signal parameter.
5692 * linux-low.c (linux_request_interrupt): Rename from
5693 linux_send_signal, and always send SIGINT.
5694 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
5695 and always send SIGINT.
5696 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
5697 of send_signal.
5698 (input_interrupt): Likewise.
5699
820f2bda
PA
57002007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
5701
5702 * server.c (get_features_xml): Check if target implemented
5703 arch_string.
5704 * win32-i386-low.c (win32_arch_string): New.
5705 (win32_target_ops): Add win32_arch_string as arch_string member.
5706
ab39bf24
UW
57072007-02-22 Markus Deuling <deuling@de.ibm.com>
5708
5709 * spu-low.c (spu_arch_string): New.
5710 (spu_target_ops): Add spu_arch_string.
5711
61ff6e04
DJ
57122007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
5713
5714 * remote-utils.c: Remove HAVE_TERMINAL_H check.
5715 * configure.ac: Do not check for terminal.h.
5716 * configure, config.in: Regenerated.
5717
fb1e4ffc
DJ
57182007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
5719
5720 * Makefile.in (OBS): Add $(XML_BUILTIN).
5721 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
5722 (clean): Update.
5723 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
5724 (arm-with-iwmmxt.c): New.
5725 * config.in, configure: Regenerate.
5726 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
5727 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
5728 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
5729 (arm*-*-linux*): Add iWMMXt and regset support.
5730 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
5731 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
5732 (arm_store_wmmxregset, target_regsets): New.
5733 * server.c (get_features_xml): Take annex argument. Check builtin
5734 XML documents.
5735 (handle_query): Handle multiple annexes.
5736
0f48aa01
DJ
57372007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
5738
5739 * remote-utils.c [USE_WIN32API] (read, write): Define.
5740 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
5741 write.
5742
23181151
DJ
57432007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
5744
5745 * linux-i386-low.c (the_low_target): Set arch_string.
5746 * linux-x86-64-low.c (the_low_target): Likewise.
5747 * linux-low.c (linux_arch_string): New.
5748 (linux_target_ops): Add it.
5749 * linux-low.h (struct linux_target_ops): Add arch_string.
5750 * server.c (write_qxfer_response): Use const void * for DATA.
5751 (get_features_xml): New.
5752 (handle_query): Handle qXfer:features:read. Report it for qSupported.
5753 * target.h (struct target_ops): Add arch_string method.
5754
9d606399
DJ
57552007-01-03 Denis Pilat <denis.pilat@st.com>
5756 Daniel Jacobowitz <dan@codesourcery.com>
5757
5758 * linux-low.c (linux_kill): Handle being called with no threads.
5759 * win32-i386-low.c (win32_kill): Likewise.
5760 (get_child_debug_event): Clear current_process_handle.
5761
57622006-12-30 Denis PILAT <denis.pilat@st.com>
8264bb58
DJ
5763 Daniel Jacobowitz <dan@codesourcery.com>
5764
5765 * remote-utils.c (remote_open): Check the type of specified
5766 serial port devices before opening them.
5767 * server.c (main): Kill the inferior if an error occurs during
5768 the first remote_open.
5769
a5e13d24
DJ
57702006-12-05 Markus Deuling <deuling@de.ibm.com>
5771
5772 * README: Update supported targets.
5773
186947f7
DJ
57742006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
5775
5776 * Makefile.in (clean): Remove reg-mips64.c.
5777 (reg-mips64.c, reg-mips64.o): New rules.
5778 * configure.srv: Handle mips64. Include regset support for mips.
5779 * linux-mips-low.c (union mips_register): New.
5780 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
5781 (mips_breakpoint, mips_breakpoint_at): Use int.
5782 (mips_collect_register, mips_supply_register)
5783 (mips_collect_register_32bit, mips_supply_register_32bit)
5784 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
5785 (mips_store_fpregset, target_regsets): New.
5786 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
5787
a13e2c95
UW
57882006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
5789
5790 * configure.srv: Add target "spu*-*-*".
5791 * Makefile.in (clean): Remove reg-spu.c.
5792 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
5793 * spu-low.c: New file.
5794
cb7283db
DJ
57952006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
5796
5797 * configure.ac: Correct td_thr_tls_get_addr test.
5798 * configure: Regenerated.
5799
89be2091
DJ
58002006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
5801
5802 * linux-low.c (linux_wait_for_event): Reformat. Use the
5803 pass_signals array.
5804 * remote-utils.c (decode_address_to_semicolon): New.
5805 * server.c (pass_signals, handle_general_set): New.
5806 (handle_query): Mention QPassSignals for qSupported.
5807 (main): Call handle_general_set.
5808 * server.h (pass_signals, decode_address_to_semicolon): New.
5809
000ef4f0
DJ
58102006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
5811
5812 * server.c (handle_query): Correct error handling for read_auxv.
5813
b7149293
UW
58142005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
5815
5816 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
5817 and srv_linux_thread_db to yes.
5818 * linux-s390-low.c (s390_fill_gregset): New function.
5819 (target_regsets): Define data structure.
5820
dae5f5cf
DJ
58212006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
5822
5823 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
5824 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
5825 * config.in, configure: Regenerated.
5826 * inferiors.c (gdb_id_to_thread): New function.
5827 (gdb_id_to_thread_id): Use it.
5828 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
5829 * linux-low.h (struct process_info): Add th member.
5830 (thread_db_get_tls_address): New prototype.
5831 * remote-utils.c (decode_address): Make non-static.
5832 * server.c (handle_query): Handle qGetTLSAddr.
5833 * server.h (gdb_id_to_thread, decode_address): New prototypes.
5834 * target.h (struct target_ops): Add get_tls_address.
5835 * thread-db.c (maybe_attach_thread): Save the thread handle.
5836 (thread_db_get_tls_address): New.
5837
32ca6d61
DJ
58382006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
5839
5840 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
5841 (linux_resume_one_process): Take a siginfo_t *. Update all
5842 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
5843 (struct pending_signals): Add a siginfo_t.
5844 (linux_wait_for_process): Always set last_status.
5845 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
5846 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
5847 * linux-low.h (struct process_info): Add last_status.
5848
5ffff7c1
DJ
58492006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
5850
5851 * remote-utils.c (try_rle): New function.
5852 (putpkt_binary): Use it.
5853
8695c747
DJ
58542006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
5855
5856 * Makefile.in (clean): Clean reg-x86-64-linux.c.
5857 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
5858 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
5859 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
5860 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
5861 point registers.
5862
290fadea
RS
58632006-08-08 Richard Sandiford <richard@codesourcery.com>
5864
5865 * server.c (terminal_fd): New variable.
5866 (old_foreground_pgrp): Likewise.
5867 (restore_old_foreground_pgrp): New function.
5868 (start_inferior): Record the terminal file descriptor in terminal_fd
5869 and its original foreground group in old_foreground_pgrp. Register
5870 restore_old_foreground_pgrp with atexit().
5871
9f2e1e63
DJ
58722006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
5873
5874 * server.c (handle_query): Correct qPart to qXfer.
5875
b80864fb
DJ
58762006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
5877
5878 * configure.ac: Check for more headers which are missing on
5879 Windows. Automatically supply -lwsock32 and USE_WIN32API.
5880 * configure.srv: Add Cygwin and mingw32.
5881 * remote-utils.c: Don't include headers unconditionally which
5882 are missing on mingw32. Include <winsock.h> for mingw32.
5883 (remote_open): Adjust for mingw32 support. Flush
5884 standard error after writing to it.
5885 (remote_close, putpkt_binary, input_interrupt, block_async_io)
5886 (unblock_async_io, enable_async_io, disable_async_io)
5887 (readchar, getpkt): Update for Winsock support.
5888 (prepare_resume_reply): Expect a protocol signal number.
5889 * server.c: Disable <sys/wait.h> on mingw32.
5890 (start_inferior): Adjust for mingw32 support. Flush
5891 standard error after writing to it.
5892 (attach_inferior): Likewise. Use protocol signal
5893 numbers.
5894 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
5895 and names.
5896 * win32-i386-low.c: New file.
5897 * Makefile.in (XM_CLIBS): Set.
5898 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
5899 (win32-i386-low.o): New dependency rule.
5900 * linux-low.c (linux_wait): Use target signal numbers.
5901 * target.h (struct target_ops): Doc fix.
5902 * server.h (target_signal_to_name): New prototype.
5903 * gdbreplay.c: Don't include headers unconditionally which
5904 are missing on mingw32. Include <winsock.h> for mingw32.
5905 (remote_close, remote_open): Adjust for Winsock support.
5906 * configure, config.in: Regenerated.
5907
0876f84a
DJ
59082006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
5909
5910 * server.c (decode_xfer_read, write_qxfer_response): New.
5911 (handle_query): Take a packet length argument. Handle
5912 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
5913 the qSupported response.
5914 (main): Update call to handle_query.
5915
01f9e8fa
DJ
59162006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
5917
5918 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
5919 (putpkt_binary): Renamed from putpkt and adjusted for binary
5920 data.
5921 (putpkt): New wrapper for putpkt_binary.
5922 (readchar): Don't mask off the high bit.
5923 (decode_X_packet): New function.
5924 * server.c (main): Call putpkt_binary if a handler sets the packet
5925 length. Save the length of the incoming packet. Handle 'X'.
5926 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
5927
be2a5f71
DJ
59282006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
5929
5930 * server.c (handle_query): Handle qSupported.
5931
ea025f5f
DJ
59322006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
5933
5934 * remote-utils.c (all_symbols_looked_up): New variable.
5935 (look_up_one_symbol): Check it.
5936 * server.h (look_up_one_symbol): New declaration.
5937 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
5938
9308fc88
DJ
59392006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
5940
5941 * Makefile.in (linux-arm-low.o): Update dependencies.
66f338c7 5942 * linux-arm-low.c: Include "gdb_proc_service.h".
9308fc88
DJ
5943 (PTRACE_GET_THREAD_AREA): Define.
5944 (ps_get_thread_area): New function.
5945
52fb6437
NS
59462006-05-09 Nathan Sidwell <nathan@codesourcery.com>
5947
5948 * configure.srv (m68k*-*-uclinux*): New target.
5949 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
5950 (linux_resume_one_process): Remove extraneous cast.
5951 (linux_read_offsets): New.
5952 (linux_target_op): Add linux_read_offsets on mmuless systems.
5953 * server.c (handle_query): Add qOffsets logic.
5954 * target.h (struct target_ops): Add read_offsets.
5955
21b0f40c
DJ
59562006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
5957
5958 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
5959 (PTRACE_GET_THREAD_AREA): Define.
5960 (ps_get_thread_area): New function.
5961 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
5962 (linux-x86-64-low.o): Update.
5963
0050a760
DJ
59642006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
5965
5966 * configure.ac: Remove checks for prfpregset_t.
5967 * gdb_proc_service.h: New file.
5968 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
5969 new "gdb_proc_service.h".
5970 * proc-service.c: Likewise.
5971 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
5972 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
5973 * Makefile.in (gdb_proc_service_h): Updated.
5974 * configure, config.in: Regenerated.
5975
b92a518e
DJ
59762006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
5977
5978 * remote-utils.c (prepare_resume_reply): Move declaration
5979 of gdb_id_from_wait to the top of the block.
5980
545587ee
DJ
59812006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
5982
5983 * linux-low.c (regsets_store_inferior_registers): Read the regset
5984 from the target before filling it.
5985
9db87ebd
DJ
59862006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
5987
5988 * server.c (attach_inferior): Return SIGTRAP for a successful
5989 attach.
5990
dd24457d
DJ
59912006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
5992
5993 * Makefile.in (OBS): Add version.o.
5994 (STAGESTUFF): Delete.
5995 (version.o): Add dependencies.
5996 (version.c): Replace rule.
5997 (clean): Remove version.c.
5998 * server.c (gdbserver_version): New.
5999 (gdbserver_usage): Use printf.
6000 (main): Handle --version and --help.
6001 * server.h (version, host_name): Add declarations.
6002
6f0f660e
EZ
60032005-12-23 Eli Zaretskii <eliz@gnu.org>
6004
889bf7c5
PA
6005 * linux-arm-low.c:
6006 * linux-arm-low.c:
6007 * inferiors.c:
6008 * i387-fp.h:
6009 * i387-fp.c:
6010 * gdbreplay.c:
6011 * regcache.c:
6012 * proc-service.c:
6013 * mem-break.h:
6014 * mem-break.c:
6015 * linux-x86-64-low.c:
6016 * linux-sh-low.c:
6017 * linux-s390-low.c:
6018 * linux-ppc64-low.c:
6019 * linux-ppc-low.c:
6020 * linux-mips-low.c:
6021 * linux-m68k-low.c:
6022 * linux-m32r-low.c:
6023 * linux-low.h:
6024 * linux-low.c:
6025 * linux-ia64-low.c:
6026 * linux-i386-low.c:
6027 * linux-crisv32-low.c:
6028 * thread-db.c:
6029 * terminal.h:
6030 * target.h:
6031 * target.c:
6032 * server.h:
6033 * server.c:
6034 * remote-utils.c:
6035 * regcache.h:
6036 * utils.c:
6037 * Makefile.in:
6038 * configure.ac:
6f0f660e
EZ
6039 * gdbserver.1: Add (C) after Copyright. Update the FSF
6040 address.
6041
9d1fb177
DJ
60422005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
6043
6044 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
6045 (arm_breakpoint_at): Recognize both breakpoints.
6046 (the_low_target): Use the correct breakpoint instruction.
6047
011a70c2
DJ
60482005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
6049
6050 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
6051 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
6052 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
6053 (the_low_target): Update.
6054
7fb85e41
AS
60552005-10-25 Andreas Schwab <schwab@suse.de>
6056
6057 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
6058
6059 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
6060 (ia64_num_regs): Reduce to 462.
6061
3db0444b
DJ
60622005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
6063
6064 * acinclude.m4: Correct quoting.
6065 * aclocal.m4: Regenerated.
6066
6067 Suggested by SZOKOVACS Robert <szo@ies.hu>:
6068 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
6069 (thread_db_init): Call thread_db_err_str.
6070 * configure.ac: Check for TD_VERSION.
6071 * config.in, configure: Regenerated.
6072
bee0189a
DJ
60732005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6074
6075 * server.h (error, fatal, warning): Add ATTR_FORMAT.
6076
e9d25b98
DJ
60772005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
6078
6079 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
6080 is not available. Define HAVE_PTRACE_GETREGS if it is.
6081 * config.in, configure: Regenerated.
6082 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
6083 * linux-i386-low.c, linux-m68k-low.c: Update to use
6084 HAVE_PTRACE_GETREGS.
6085 * linux-low.c (regsets_fetch_inferior_registers)
6086 (regsets_store_inferior_registers): Only return 0 if we processed
6087 GENERAL_REGS.
6088 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
6089 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
6090
a06660f7
DJ
60912005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
6092
6093 * inferiors.c (struct thread_info): Add gdb_id.
6094 (add_thread): Add gdb_id argument.
6095 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
6096 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
6097 calls to add_thread.
6098 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
6099 * server.c (handle_query): Use thread_to_gdb_id.
6100 (handle_v_cont, main): Use gdb_id_to_thread_id.
6101 * server.h (add_thread): Update prototype.
6102 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
6103 prototypes.
6104
5a1f5858
DJ
61052005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
6106
6107 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
6108 left-padded registers.
6109 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
6110 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
6111
e122f1f5
SE
61122005-07-01 Steve Ellcey <sje@cup.hp.com>
6113
6114 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
6115 * configure: Regenerate.
6116 * config.in: Regenerate.
6117 * server.h (NEED_DECLARATION_STRERROR):
6118 Replace with !HAVE_DECL_STRERROR.
6119
d592fa2f
DJ
61202005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
6121
6122 * linux-low.c (linux_wait, linux_send_signal): Don't test
6123 an unsigned long variable for > 0 if it could be MAX_ULONG.
6124 * server.c (myresume): Likewise.
6125 * target.c (set_desired_inferior): Likewise.
6126
ccbd4912
MK
61272005-06-13 Mark Kettenis <kettenis@gnu.org>
6128
6129 * configure.ac: Simplify and improve check for socklen_t.
6130 * configure, config.in: Regenerate.
6131
f450004a
DJ
61322005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
6133
6134 * acconfig.h: Remove.
6135 * configure.ac: Add a test for socklen_t. Use three-argument
6136 AC_DEFINE throughout.
6137 * config.in: Regenerated using autoheader 2.59.
6138 * configure: Regenerated.
6139
6140 * gdbreplay.c (socklen_t): Provide a default.
6141 (remote_open): Use socklen_t.
6142 * remote-utils.c (socklen_t): Provide a default.
6143 (remote_open): Use socklen_t.
6144 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
6145 unsigned char.
6146
6147 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
6148 char for buffers.
6149 * linux-low.c (linux_read_memory, linux_write_memory)
6150 (linux_read_auxv): Likewise.
6151 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
6152 (check_mem_write): Likewise.
6153 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
6154 Likewise.
6155 * regcache.c (struct inferior_rgcache_data, registers_to_string)
6156 (registers_from_string, register_data): Likewise.
6157 * server.c (handle_query, main): Likewise.
6158 * server.h (convert_ascii_to_int, convert_int_to_ascii)
6159 (decode_M_packet): Likewise.
6160 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
6161 * target.h (struct target_ops): Update read_memory, write_memory,
6162 and read_auxv.
6163 (read_inferior_memory, write_inferior_memory): Update.
6164 * linux-low.h (struct linux_target_ops): Change type of breakpoint
6165 to unsigned char *.
6166 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
6167 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
6168 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
6169 linux-s390-low.c, linux-sh-low.c: Update for changes in
6170 read_inferior_memory and the_low_target->breakpoint.
6171
eee84df1
DJ
61722005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
6173
6174 * Makefile.in (SFILES): Add linux-ppc64-low.c.
6175 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
6176 * configure.srv: Add powerpc64-*-linux*.
6177 * linux-ppc64-low.c: New file.
6178
45b134e5
OF
61792005-05-23 Orjan Friberg <orjanf@axis.com>
6180
6181 * linux-cris-low.c: New file with support for CRIS.
6182 * linux-crisv32-low.c: Ditto for CRISv32.
6183 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
6184 (clean): Add reg-cris.c and reg-crisv32.c.
889bf7c5 6185 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
45b134e5
OF
6186 reg-crisv32.o, and reg-crisv32.c to make rules.
6187 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
6188 recognized targets.
6189
48d93c75
UW
61902005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
6191
6192 * linux-low.c (fetch_register): Ensure buffer size is a multiple
6193 of sizeof (PTRACE_XFER_TYPE).
6194 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
6195
e013ee27
OF
61962005-05-12 Orjan Friberg <orjanf@axis.com>
6197
889bf7c5 6198 * target.h (struct target_ops): Add insert_watchpoint,
e013ee27
OF
6199 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
6200 pointers for hardware watchpoint support.
6201 * linux-low.h (struct linux_target_ops): Ditto.
6202 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
6203 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
6204 to linux_target_ops.
6205 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
6206 reply packet.
6207 * server.c (main): Recognize 'Z' and 'z' packets.
6208
b0ded00b
UW
62092005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
6210
6211 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
6212 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
6213 (the_low_target): Add new members.
6214
8643e2ad
DJ
62152005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
6216
6217 * proc-service.c (ps_lgetregs): Search all_processes instead of
6218 all_threads.
6219
fc620387
DJ
62202005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
6221
6222 * server.c (start_inferior): Change return type to int.
6223 (attach_inferior): Change sigptr to int *.
6224 (handle_v_cont, handle_v_requests): Change signal to int *.
6225 (main): Change signal to int.
6226
62272005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
7cfbc4a0
KI
6228
6229 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
6230 * configure.srv: Add m32r*-*-linux*.
6231 * linux-m32r-low.c: New file.
6232
e0e76420
DJ
62332005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
6234
6235 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
6236
a1928bad
DJ
62372005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
6238
6239 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
6240 Take unsigned long arguments for PIDs.
6241 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
6242 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
6243 (wait_for_sigstop, linux_resume_one_process)
6244 (regsets_fetch_inferior_registers, linux_send_signal)
6245 (linux_read_auxv): Likewise. Update the types of variables holding
6246 PIDs. Update format string specifiers.
6247 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
6248 * remote-utils.c (prepare_resume_reply): Likewise.
6249 * server.c (cont_thread, general_thread, step_thread)
6250 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
6251 unsigned long.
6252 (handle_query): Update format specifiers.
6253 (handle_v_cont, main): Use strtoul for thread IDs.
6254 * server.h (struct inferior_list_entry): Use unsigned long for ID.
6255 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
6256 (general_thread, step_thread, thread_from_wait)
6257 (old_thread_from_wait): Update.
6258 * target.h (struct thread_resume): Use unsigned long for THREAD.
6259 (struct target_ops): Use unsigned long for arguments to attach and
6260 thread_alive.
6261
dcdb98d2
DJ
62622005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
6263
6264 * acinclude.m4: Include bfd/bfd.m4 directly.
6265 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
6266 <agriffis@toolchain.org>.
6267 * aclocal.m4, configure: Regenerated.
6268
bec39cab
AC
62692005-01-07 Andrew Cagney <cagney@gnu.org>
6270
6271 * configure.ac: Rename configure.in, require autoconf 2.59.
6272 * configure: Re-generate.
6273
434c4c77
DJ
62742004-12-08 Daniel Jacobowitz <dan@debian.org>
6275
6276 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
6277 LIBS when finished.
6278 * aclocal.m4: Regenerated.
6279 * configure: Regenerated.
6280
db1d3e1b
AS
62812004-11-21 Andreas Schwab <schwab@suse.de>
6282
6283 * linux-m68k-low.c (m68k_num_gregs): Define.
6284 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
6285 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
6286 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
6287 (m68k_breakpoint_at): New. Add to the_low_target.
6288
6289 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
6290 srv_linux_thread_db to yes.
6291
43360365
JB
62922004-10-20 Joel Brobecker <brobecker@gnat.com>
6293
6294 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
6295 (ARCH_SET_FS): Likewise.
6296 (ARCH_GET_FS): Likewise.
6297 (ARCH_GET_GS): Likewise.
6298
fd500816
DJ
62992004-10-16 Daniel Jacobowitz <dan@debian.org>
6300
6301 * linux-i386-low.c (ps_get_thread_area): New.
6302 * linux-x86-64-low.c (ps_get_thread_area): New.
6303 * linux-low.c: Include <sys/syscall.h>.
6304 (linux_kill_one_process): Don't kill the first thread here.
6305 (linux_kill): Kill the first thread here.
6306 (kill_lwp): New function.
6307 (send_sigstop, linux_send_signal): Use it.
6308 * proc-service.c: Clean up #ifdefs.
6309 (fpregset_info): Delete.
6310 (ps_lgetregs): Update and enable implementation.
6311 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
6312 implementations.
6313 * remote-utils.c (struct sym_cache, symbol_cache): New.
6314 (input_interrupt): Print a clearer message.
6315 (async_io_enabled): New variable.
6316 (enable_async_io, disable_async_io): Use it. Update comments.
6317 (look_up_one_symbol): Use the symbol cache.
6318 * thread-db.c (thread_db_look_up_symbols): New function.
6319 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
6320
f6de3c42
DJ
63212004-10-16 Daniel Jacobowitz <dan@debian.org>
6322
6323 * configure.in: Test for -rdynamic.
6324 * configure: Regenerated.
6325 * Makefile (INTERNAL_LDFLAGS): New.
6326 (gdbserver, gdbreplay): Use it.
6327
2c0fc042
AC
63282004-09-02 Andrew Cagney <cagney@gnu.org>
6329
6330 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
6331
075b3282
DJ
63322004-03-23 Daniel Jacobowitz <drow@mvista.com>
6333
6334 * linux-low.c (linux_wait): Clear all_processes list also.
6335
fa6a77dc
DJ
63362004-03-12 Daniel Jacobowitz <drow@mvista.com>
6337
6338 * linux-low.c: Include <errno.h>. Remove extern declaration of
6339 errno.
6340
6d782a97
DJ
63412004-03-12 Daniel Jacobowitz <drow@mvista.com>
6342
6343 * gdbreplay.c, server.h, utils.c: Update copyright years.
6344
3a7fb99b
DJ
63452004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
6346
6347 * server.c (main): Print child status or termination signal from
6348 variable 'signal', not 'sig'.
6349
c3e735a6
DJ
63502004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
6351
6352 * linux-low.c (linux_read_memory): Change return type to
6353 int. Check for and return error from ptrace().
6354 * target.c (read_inferior_memory): Change return type to int. Pass
6355 back return status from the_target->read_memory().
6356 * target.h (struct target_ops): Adapt *read_memory() prototype.
6357 Update comment.
6358 (read_inferior_memory): Adapt prototype.
6359 * server.c (main): Return an error packet if
6360 read_inferior_memory() returns an error.
6361
a59d1c82
DJ
63622004-03-04 Daniel Jacobowitz <drow@mvista.com>
6363
6364 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
6365 Unify with other clean targets.
6366
dc3f8883
DJ
63672004-02-29 Daniel Jacobowitz <drow@mvista.com>
6368
6369 * server.c (handle_v_cont): Call set_desired_inferior.
6370
89a208da
DJ
63712004-02-29 Daniel Jacobowitz <drow@mvista.com>
6372
6373 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
6374
62ea82f5
DJ
63752004-02-29 Daniel Jacobowitz <drow@mvista.com>
6376
6377 * linux-low.c (linux_wait): Unblock async I/O.
6378 (linux_resume): Block and enable async I/O.
6379 * remote-utils.c (block_async_io, unblock_async_io): New functions.
6380 * server.h (block_async_io, unblock_async_io): Add prototypes.
6381
6910d122
DJ
63822004-02-29 Daniel Jacobowitz <drow@mvista.com>
6383
6384 * remote-utils.c (remote_open): Print a status notice after
6385 opening a TCP port.
6386 * server.c (attach_inferior): Print a status notice after
6387 attaching.
6388
63892004-02-29 Daniel Jacobowitz <drow@mvista.com>
d677d77d
DJ
6390
6391 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
6392
c89dc5d4
DJ
63932004-02-26 Daniel Jacobowitz <drow@mvista.com>
6394
6395 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
6396 error packet.
6397 * server.c, target.h: Update copyright years.
6398
4b8dad4a
RM
63992004-02-25 Roland McGrath <roland@redhat.com>
6400
6401 * target.h (struct target_ops): New member `read_auxv'.
6402 * server.c (handle_query): Handle qPart:auxv:read: query using that.
6403 * linux-low.c (linux_read_auxv): New function.
6404 (linux_target_ops): Initialize `read_auxv' member to that.
6405
d7446758
JB
64062004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
6407
6408 Committed by Jim Blandy <jimb@redhat.com>.
6409
6410 * linux-s390-low.c (s390_num_regs): Update.
4b8dad4a 6411 (s390_regmap): Remove control registers. Use __s390x__ predefine
d7446758
JB
6412 instead of GPR_SIZE to distiguish s390 and s390x targets.
6413
5544ad89
DJ
64142004-01-31 Daniel Jacobowitz <drow@mvista.com>
6415
6416 * linux-low.c: Update copyright year.
6417 (check_removed_breakpoint): Clear pending_is_breakpoint.
6418 (linux_set_resume_request, linux_queue_one_thread)
6419 (resume_status_pending_p): New functions.
6420 (linux_continue_one_thread): Use process->resume.
6421 (linux_resume): Only resume threads if there are no pending events.
6422 * linux-low.h (struct process_info): Add resume request
6423 pointer.
6424
2a68b70e
DJ
64252004-01-30 Daniel Jacobowitz <drow@mvista.com>
6426
6427 * regcache.c (new_register_cache): Clear the allocated register
6428 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
6429
64386c31
DJ
64302003-10-13 Daniel Jacobowitz <drow@mvista.com>
6431
6432 * linux-low.c (linux_resume): Take a struct thread_resume *
6433 argument.
6434 (linux_wait): Update call.
6435 (resume_ptr): New static variable.
6436 (linux_continue_one_thread): Renamed from
6437 linux_continue_one_process. Use resume_ptr.
6438 (linux_resume): Use linux_continue_one_thread.
6439 * server.c (handle_v_cont, handle_v_requests): New functions.
6440 (myresume): New function.
6441 (main): Handle 'v' case.
6442 * target.h (struct thread_resume): New type.
6443 (struct target_ops): Change argument of "resume" to struct
6444 thread_resume *.
6445 (myresume): Delete macro.
6446
c938e9b0
L
64472003-08-08 H.J. Lu <hongjiu.lu@intel.com>
6448
6449 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
6450 (uninstall): Support DESTDIR.
6451
7f313d07
BC
6452Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
6453
6454 * configure.srv: Add xscale*linux copy of arm*linux entry.
6455
3b2fc2ea
DJ
64562003-07-24 Daniel Jacobowitz <drow@mvista.com>
6457
6458 * linux-arm-low.c (arm_reinsert_addr): New function.
6459 (the_low_target): Add arm_reinsert_addr.
6460
1c0a559e
MK
64612003-07-08 Mark Kettenis <kettenis@gnu.org>
6462
6463 * mem-break.c: Remove whitespace at end of file.
6464
43d5792c
DJ
64652003-06-28 Daniel Jacobowitz <drow@mvista.com>
6466
6467 * configure.in: Check whether we need to prototype strerror.
6468 * server.h: Optionally prototype strerror.
6469 * gdbreplay.c (perror_with_name): Use strerror.
6470 * linux-low.c (linux_attach_lwp): Use strerror.
6471 * utils.c (perror_with_name): Use strerror.
6472 * config.in, configure: Regenerated.
6473
c8a86edf
DJ
64742003-06-28 Daniel Jacobowitz <drow@mvista.com>
6475
6476 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
6477 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
6478
73d37363
DJ
64792003-06-20 Daniel Jacobowitz <drow@mvista.com>
6480
6481 * Makefile.in (SFILES): Update.
6482 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
6483 low-sun3.c: Remove files.
6484
6ad8ae5c
DJ
64852003-06-17 Daniel Jacobowitz <drow@mvista.com>
6486
6487 * linux-low.c: Move comment to linux_thread_alive where it belonged.
6488 (linux_detach_one_process, linux_detach): New functions.
6489 (linux_target_ops): Add linux_detach.
6490 * server.c (main): Handle 'D' packet.
6491 * target.h (struct target_ops): Add "detach" member.
6492 (detach_inferior): Define.
6493
1581182a
MK
64942003-06-13 Mark Kettenis <kettenis@gnu.org>
6495
6496 From Kelley Cook <kelleycook@wideopenwest.com>:
6497 * configure.srv: Accept i[34567]86 variants.
6498
e5379b03
DJ
64992003-06-05 Daniel Jacobowitz <drow@mvista.com>
6500
6501 * linux-low.c (linux_wait_for_event): Correct comment typos.
6502 (linux_resume_one_process): Call check_removed_breakpoint.
6503 (linux_send_signal): New function.
6504 (linux_target_ops): Add linux_send_signal.
6505 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
6506 of kill.
6507 * target.h (struct target_ops): Add send_signal.
6508
2ff29de4
JB
65092003-05-29 Jim Blandy <jimb@redhat.com>
6510
6511 * linux-low.c (usr_store_inferior_registers): Transfer buf in
6512 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
6513 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
6514 away part of the register's value.
6515
254787d4
DJ
65162003-03-26 Daniel Jacobowitz <drow@mvista.com>
6517
6518 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
6519 (linux_wait_for_event, linux_init_signals): Likewise.
6520
94e10508
DJ
65212003-03-17 Daniel Jacobowitz <drow@mvista.com>
6522
6523 * configure.in: Check for stdlib.h.
6524 * configure: Regenerated.
6525 * config.in: Regenerated.
6526
4c0711e0
DJ
65272003-01-04 Andreas Schwab <schwab@suse.de>
6528
6529 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
6530
ef66e766
AC
65312003-01-02 Andrew Cagney <ac131313@redhat.com>
6532
6533 * Makefile.in: Remove obsolete code.
6534
a1358604
DJ
65352002-11-20 Daniel Jacobowitz <drow@mvista.com>
6536
6537 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
6538 defined(PT_FPR0_HI).
6539
23ce3b1c
DJ
65402002-11-17 Stuart Hughes <seh@zee2.com>
6541
6542 * linux-arm-low.c (arm_num_regs): Increase.
6543 (arm_regmap): Include status register.
6544
65452002-11-17 Daniel Jacobowitz <drow@mvista.com>
6546
6547 * linux-low.c (register_addr): Remove incorrect -1 check.
6548
a9fa9f7d
DJ
65492002-08-29 Daniel Jacobowitz <drow@mvista.com>
6550
6551 * linux-low.c (linux_create_inferior): Call setpgid. Return
6552 the new PID.
6553 (unstopped_p, linux_signal_pid): Remove.
6554 (linux_target_ops): Remove linux_signal_pid.
6555 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
6556 global instead of target method.
6557 * target.h (struct target_ops): Remove signal_pid. Update comment
6558 for create_inferior.
6559 * server.c (signal_pid): New variable.
6560 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
4b8dad4a 6561 gdbserver. Set the child to be the foreground process group.
a9fa9f7d
DJ
6562 (attach_inferior): Set signal_pid.
6563
17574093
DJ
65642002-08-23 Daniel Jacobowitz <drow@mvista.com>
6565
6566 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
6567
65682002-08-20 Jim Blandy <jimb@redhat.com>
6569
6570 * Makefile.in (LDFLAGS): Allow the configure script to establish a
6571 default for this.
6572
65732002-08-01 Andrew Cagney <cagney@redhat.com>
6574
6575 * Makefile.in: Make chill references obsolete.
6576
65772002-07-24 Kevin Buettner <kevinb@redhat.com>
6578
6579 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
6580 * configure: Regenerate.
6581 * config.in: Regenerate.
6582
65832002-07-09 David O'Brien <obrien@FreeBSD.org>
6584
6585 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
6586 (perror_with_name, remote_close, remote_open, expect, play): Static.
6587
65882002-07-04 Michal Ludvig <mludvig@suse.cz>
6589
4b8dad4a 6590 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17574093
DJ
6591 byte offsets instead of an array of indexes.
6592 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
6593
65942002-06-13 Daniel Jacobowitz <drow@mvista.com>
6595
6596 * regcache.c: Add comment.
6597
65982002-06-11 Daniel Jacobowitz <drow@mvista.com>
6599
6600 * thread-db.c: New file.
6601 * proc-service.c: New file.
6602 * acinclude.m4: New file.
6603 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
6604 proc-service.o, and thread-db.o.
6605 (linux-low.o): Add USE_THREAD_DB.
6606 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
6607 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
6608 * aclocal.m4: Regenerated.
6609 * config.in: Regenerated.
6610 * configure: Regenerated.
6611 * configure.in: Check for proc_service.h, sys/procfs.h,
6612 thread_db.h, and linux/elf.h headrs.
6613 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
6614 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
6615 Check for -lthread_db and thread support.
6616 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
6617 PowerPC, and SuperH.
6618 * i387-fp.c: Constify arguments.
6619 * i387-fp.h: Likewise.
6620 * inferiors.c: (struct thread_info): Renamed from
6621 `struct inferior_info'. Remove PID member. Use generic inferior
6622 list header. All uses updated.
6623 (inferiors, signal_pid): Removed.
6624 (all_threads): New variable.
6625 (get_thread): Define.
6626 (add_inferior_to_list): New function.
6627 (for_each_inferior): New function.
6628 (change_inferior_id): New function.
6629 (add_inferior): Removed.
6630 (remove_inferior): New function.
6631 (add_thread): New function.
6632 (free_one_thread): New function.
6633 (remove_thread): New function.
6634 (clear_inferiors): Use for_each_inferior and free_one_thread.
6635 (find_inferior): New function.
6636 (find_inferior_id): New function.
6637 (inferior_target_data): Update argument type.
6638 (set_inferior_target_data): Likewise.
6639 (inferior_regcache_data): Likewise.
6640 (set_inferior_regcache_data): Likewise.
6641 * linux-low.c (linux_bp_reinsert): Remove.
6642 (all_processes, stopping_threads, using_thrads)
6643 (struct pending_signals, debug_threads, pid_of): New.
6644 (inferior_pid): Replace with macro.
6645 (struct inferior_linux_data): Remove.
6646 (get_stop_pc, add_process): New functions.
6647 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
6648 Use add_process and add_thread.
6649 (linux_attach_lwp): New function, based on old linux_attach. Use
6650 add_process and add_thread. Set stop_expected for new threads.
6651 (linux_attach): New function.
6652 (linux_kill_one_process): New function.
6653 (linux_kill): Kill all LWPs.
6654 (linux_thread_alive): Use find_inferior_id.
6655 (check_removed_breakpoints, status_pending_p): New functions.
6656 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
6657 Update. Use WNOHANG. Wait for cloned processes also. Update process
6658 struct for the found process.
6659 (linux_wait_for_event): New function.
6660 (linux_wait): Use it. Support LWPs.
6661 (send_sigstop, wait_for_sigstop, stop_all_processes)
6662 (linux_resume_one_process, linux_continue_one_process): New functions.
6663 (linux_resume): Support LWPs.
6664 (REGISTER_RAW_SIZE): Remove.
6665 (fetch_register): Use register_size instead. Call supply_register.
6666 (usr_store_inferior_registers): Likewise. Call collect_register.
6667 Fix recursive case.
6668 (regsets_fetch_inferior_registers): Improve error message.
6669 (regsets_store_inferior_registers): Add debugging.
6670 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
6671 (unstopped_p, linux_signal_pid): New functions.
6672 (linux_target_ops): Add linux_signal_pid.
6673 (linux_init_signals): New function.
6674 (initialize_low): Call it. Initialize using_threads.
6675 * regcache.c (inferior_regcache_data): Add valid
6676 flag.
6677 (get_regcache): Fetch registers lazily. Add fetch argument
6678 and update all callers.
6679 (regcache_invalidate_one, regcache_invalidate): New
6680 functions.
6681 (new_register_cache): Renamed from create_register_cache.
6682 Return the new regcache.
6683 (free_register_cache): Change argument to a void *.
6684 (registers_to_string, registers_from_string): Call get_regcache
6685 with fetch flag set.
6686 (register_data): Make static. Pass fetch flag to get_regcache.
6687 (supply_register): Call get_regcache with fetch flag clear.
6688 (collect_register): Call get_regcache with fetch flag set.
6689 (collect_register_as_string): New function.
6690 * regcache.h: Update.
6691 * remote-utils.c (putpkt): Flush after debug output and use
6692 stderr.
6693 Handle input interrupts while waiting for an ACK.
6694 (input_interrupt): Use signal_pid method.
6695 (getpkt): Flush after debug output and use stderr.
6696 (outreg): Use collect_register_as_string.
6697 (new_thread_notify, dead_thread_notify): New functions.
6698 (prepare_resume_reply): Check using_threads. Set thread_from_wait
6699 and general_thread.
6700 (look_up_one_symbol): Flush after debug output.
6701 * server.c (step_thread, server_waiting): New variables.
6702 (start_inferior): Don't use signal_pid. Update call to mywait.
6703 (attach_inferior): Update call to mywait.
6704 (handle_query): Handle qfThreadInfo and qsThreadInfo.
6705 (main): Don't fetch/store registers explicitly. Use
6706 set_desired_inferior. Support proposed ``Hs'' packet. Update
6707 calls to mywait.
6708 * server.h: Update.
6709 (struct inferior_list, struct_inferior_list_entry): New.
6710 * target.c (set_desired_inferior): New.
6711 (write_inferior_memory): Constify.
6712 (mywait): New function.
6713 * target.h: Update.
6714 (struct target_ops): New signal_pid method.
6715 (mywait): Removed macro, added prototype.
6716
6717 * linux-low.h (regset_func): Removed.
6718 (regset_fill_func, regset_store_func): New.
6719 (enum regset_type): New.
6720 (struct regset_info): Add type field. Use new operation types.
6721 (struct linux_target_ops): stop_pc renamed to get_pc.
6722 Add decr_pc_after_break and breakpoint_at.
6723 (get_process, get_thread_proess, get_process_thread)
6724 (strut process_info, all_processes, linux_attach_lwp)
6725 (thread_db_init): New.
6726
6727 * linux-arm-low.c (arm_get_pc, arm_set_pc,
6728 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
6729 (the_low_target): Add new members.
6730 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
6731 (i386_store_fpxregset): Constify.
6732 (target_regsets): Add new kind identifier.
6733 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
6734 (i386_set_pc): Add debugging.
6735 (i386_breakpoint_at): New function.
6736 (the_low_target): Add new members.
6737 * linux-mips-low.c (mips_get_pc, mips_set_pc)
6738 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
6739 (mips_breakpoint_at): New.
6740 (the_low_target): Add new members.
6741 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
6742 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
6743 (the_low_target): Add new members.
6744 * linux-sh-low.c (sh_get_pc, sh_set_pc)
6745 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
6746 (the_low_target): Add new members.
6747 * linux-x86-64-low.c (target_regsets): Add new kind
6748 identifier.
6749
67502002-05-15 Daniel Jacobowitz <drow@mvista.com>
6751
6752 From Martin Pool <mbp@samba.org>:
6753 * server.c (gdbserver_usage): New function.
6754 (main): Call it.
6755
67562002-05-14 Daniel Jacobowitz <drow@mvista.com>
6757
6758 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
6759 stop_at -> stop_pc.
6760
67612002-05-04 Andrew Cagney <ac131313@redhat.com>
6762
6763 * Makefile.in: Remove obsolete code.
6764
67652002-04-24 Michal Ludvig <mludvig@suse.cz>
6766
6767 * linux-low.c (regsets_fetch_inferior_registers),
6768 (regsets_store_inferior_registers): Removed cast to int from
6769 ptrace() calls.
6770 * regcache.h: Added declaration of struct inferior_info.
6771
67722002-04-20 Daniel Jacobowitz <drow@mvista.com>
6773
6774 * inferiors.c (struct inferior_info): Add regcache_data.
6775 (add_inferior): Call create_register_cache.
6776 (clear_inferiors): Call free_register_cache.
6777 (inferior_regcache_data, set_inferior_regcache_data): New functions.
6778 * regcache.c (struct inferior_regcache_data): New.
6779 (registers): Remove.
6780 (get_regcache): New function.
6781 (create_register_cache, free_register_cache): New functions.
6782 (set_register_cache): Don't initialize the register cache here.
6783 (registers_to_string, registers_from_string, register_data): Call
6784 get_regcache.
6785 * regcache.h: Add prototypes.
6786 * server.h: Likewise.
6787
67882002-04-20 Daniel Jacobowitz <drow@mvista.com>
6789
6790 * mem-break.c: New file.
6791 * mem-break.h: New file.
6792 * Makefile.in: Add mem-break.o rule; update server.h
6793 dependencies.
6794 * inferiors.c (struct inferior_info): Add target_data
6795 member.
6796 (clear_inferiors): Free target_data member if set.
6797 (inferior_target_data, set_inferior_target_data): New functions.
6798 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
6799 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
6800 * linux-low.c (linux_bp_reinsert): New variable.
6801 (struct inferior_linux_data): New.
6802 (linux_create_inferior): Use set_inferior_target_data.
6803 (linux_attach): Likewise. Call add_inferior.
6804 (linux_wait_for_one_inferior): New function.
6805 (linux_wait): Call it.
6806 (linux_write_memory): Add const.
6807 (initialize_low): Call set_breakpoint_data.
6808 * linux-low.h (struct linux_target_ops): Add breakpoint
6809 handling members.
6810 * server.c (attach_inferior): Remove extra add_inferior
6811 call.
6812 * server.h: Include mem-break.h. Update inferior.c
6813 prototypes.
6814 * target.c (read_inferior_memory)
6815 (write_inferior_memory): New functions.
6816 * target.h (read_inferior_memory)
6817 (write_inferior_memory): Change macros to prototypes.
6818 (struct target_ops): Update comments. Add const to write_memory
6819 definition.
6820
68212002-04-11 Daniel Jacobowitz <drow@mvista.com>
6822
6823 * linux-low.c (usr_store_inferior_registers): Support
6824 registers which are allowed to fail to store.
6825 * linux-low.h (linux_target_ops): Likewise.
6826 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
6827 (ppc_cannot_store_register): FPSCR may not be storable.
6828
68292002-04-09 Daniel Jacobowitz <drow@mvista.com>
6830
6831 * server.h: Include <string.h> if HAVE_STRING_H.
6832 * ChangeLog: Correct paths in last ChangeLog entry.
6833
68342002-04-09 Daniel Jacobowitz <drow@mvista.com>
6835
6836 * linux-low.h: Remove obsolete prototypes.
6837 (struct linux_target_ops): New.
6838 (extern the_low_target): New.
6839 * linux-low.c (num_regs, regmap): Remove declarations.
6840 (register_addr): Use the_low_target explicitly.
6841 (fetch_register): Likewise.
6842 (usr_fetch_inferior_registers): Likewise.
6843 (usr_store_inferior_registers): Likewise.
6844 * linux-arm-low.c (num_regs): Remove.
6845 (arm_num_regs): Define.
6846 (arm_regmap): Renamed from regmap, made static.
6847 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
6848 made static.
6849 (arm_cannot_store_register): Renamed from cannot_store_register,
6850 made static.
6851 (the_low_target): New.
6852 * linux-i386-low.c (num_regs): Remove.
6853 (i386_num_regs): Define.
6854 (i386_regmap): Renamed from regmap, made static.
6855 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
6856 made static.
6857 (i386_cannot_store_register): Renamed from cannot_store_register,
6858 made static.
6859 (the_low_target): New.
6860 * linux-ia64-low.c (num_regs): Remove.
6861 (ia64_num_regs): Define.
6862 (ia64_regmap): Renamed from regmap, made static.
6863 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
6864 made static.
6865 (ia64_cannot_store_register): Renamed from cannot_store_register,
6866 made static.
6867 (the_low_target): New.
6868 * linux-m68k-low.c (num_regs): Remove.
6869 (m68k_num_regs): Define.
6870 (m68k_regmap): Renamed from regmap, made static.
6871 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
6872 made static.
6873 (m68k_cannot_store_register): Renamed from cannot_store_register,
6874 made static.
6875 (the_low_target): New.
6876 * linux-mips-low.c (num_regs): Remove.
6877 (mips_num_regs): Define.
6878 (mips_regmap): Renamed from regmap, made static.
6879 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
6880 made static.
6881 (mips_cannot_store_register): Renamed from cannot_store_register,
6882 made static.
6883 (the_low_target): New.
6884 * linux-ppc-low.c (num_regs): Remove.
6885 (ppc_num_regs): Define.
6886 (ppc_regmap): Renamed from regmap, made static.
6887 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
6888 made static.
6889 (ppc_cannot_store_register): Renamed from cannot_store_register,
6890 made static.
6891 (the_low_target): New.
6892 * linux-s390-low.c (num_regs): Remove.
6893 (s390_num_regs): Define.
6894 (s390_regmap): Renamed from regmap, made static.
6895 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
6896 made static.
6897 (s390_cannot_store_register): Renamed from cannot_store_register,
6898 made static.
6899 (the_low_target): New.
6900 * linux-sh-low.c (num_regs): Remove.
6901 (sh_num_regs): Define.
6902 (sh_regmap): Renamed from regmap, made static.
6903 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
6904 made static.
6905 (sh_cannot_store_register): Renamed from cannot_store_register,
6906 made static.
6907 (the_low_target): New.
6908 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
6909 (the_low_target): New.
6910
69112002-04-09 Daniel Jacobowitz <drow@mvista.com>
6912
6913 * Makefile.in: Add stamp-h target.
6914 * configure.in: Create stamp-h.
6915 * configure: Regenerated.
6916
69172002-04-09 Daniel Jacobowitz <drow@mvista.com>
6918
6919 * inferiors.c: New file.
6920 * target.c: New file.
6921 * target.h: New file.
6922 * Makefile.in: Add target.o and inferiors.o. Update
6923 dependencies.
6924 * linux-low.c (inferior_pid): New static variable,
6925 moved from server.c.
6926 (linux_create_inferior): Renamed from create_inferior.
6927 Call add_inferior. Return 0 on success instead of a PID.
6928 (linux_attach): Renamed from myattach.
6929 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
6930 (linux_thread_alive): Renamed from mythread_alive.
6931 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
6932 child dies.
6933 (linux_resume): Renamed from myresume. Add missing ``return 0''.
6934 (regsets_store_inferior_registers): Correct error message.
6935 Add missing ``return 0''.
6936 (linux_fetch_registers): Renamed from fetch_inferior_registers.
6937 (linux_store_registers): Renamed from store_inferior_registers.
6938 (linux_read_memory): Renamed from read_inferior_memory.
6939 (linux_write_memory): Renamed from write_inferior_memory.
6940 (linux_target_ops): New structure.
6941 (initialize_low): Call set_target_ops ().
6942 * remote-utils.c (unhexify): New function.
6943 (hexify): New function.
6944 (input_interrupt): Send signals to ``signal_pid''.
6945 * server.c (inferior_pid): Remove.
6946 (start_inferior): Update create_inferior call.
6947 (attach_inferior): Call add_inferior.
6948 (handle_query): New function.
6949 (main): Call handle_query for `q' packets.
6950 * server.h: Include "target.h". Remove obsolete prototypes.
6951 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
6952
69532002-04-09 Daniel Jacobowitz <drow@mvista.com>
6954
6955 * Makefile.in: Add WARN_CFLAGS. Update configury
6956 dependencies.
6957 * configure.in: Check for <string.h>
6958 * configure: Regenerate.
6959 * config.in: Regenerate.
6960 * gdbreplay.c: Include needed system headers.
6961 (remote_open): Remove strchr prototype.
6962 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
6963 * regcache.c (supply_register): Change buf argument to const void *.
6964 (supply_register_by_name): Likewise.
6965 (collect_register): Change buf argument to void *.
6966 (collect_register_by_name): Likewise.
6967 * regcache.h: Add missing prototypes.
6968 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
6969 * server.c (handle_query): New function.
6970 (attached): New static variable, moved out of main.
6971 (main): Quiet longjmp clobber warnings.
6972 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
6973 * utils.c (error): Remove NORETURN.
6974 (fatal): Likewise.
This page took 1.071747 seconds and 4 git commands to generate.