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