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