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