]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - gdb/gdbserver/ChangeLog
Automatic date update in version.in
[thirdparty/binutils-gdb.git] / gdb / gdbserver / ChangeLog
CommitLineData
2512d7ef
JK
12018-06-28 Jan Kratochvil <jan.kratochvil@redhat.com>
2
3 * x86-tdesc.h: Remove executable permission flag.
4
d0ac1c44
SM
52018-06-19 Simon Marchi <simon.marchi@ericsson.com>
6
7 * configure.ac: Remove AC_PREREQ, add missing quoting.
8 * configure: Re-generate.
9 * config.in: Re-generate.
10 * aclocal.m4: Re-generate.
11
c4eb05ff
SM
122018-06-18 Simon Marchi <simon.marchi@ericsson.com>
13
14 * tracepoint.h (current_traceframe): Remove declaration.
15
02895270
AH
162018-06-18 Alan Hayward <alan.hayward@arm.com>
17
18 * linux-aarch64-low.c (is_sve_tdesc): New function.
19 (aarch64_sve_regs_copy_to_regcache): Likewise.
20 (aarch64_sve_regs_copy_from_regcache): Likewise.
21 (aarch64_regs_info): Add SVE checks.
22 (initialize_low_arch): Initialize SVE.
23
e9902bfc
AH
242018-06-18 Alan Hayward <alan.hayward@arm.com>
25
26 * Makefile.in: Add aarch64-sve-linux-ptrace.c.
27
fefa175e
AH
282018-06-11 Alan Hayward <alan.hayward@arm.com>
29
30 * linux-aarch64-ipa.c (get_ipa_tdesc): Add null VQ param.
31 (initialize_low_tracepoint): Likewise
32 * linux-aarch64-low.c (aarch64_arch_setup): Get VQ.
33 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Add null VQ
34 param.
35 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add VQ
36 checks.
37 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Add VQ.
38
b91ad3ff
AH
392018-06-11 Alan Hayward <alan.hayward@arm.com>
40
41 * server.h (PBUFSIZ): Increase size
42
f868386e
AH
432018-06-11 Alan Hayward <alan.hayward@arm.com>
44
45 * regcache.c (regcache::raw_compare): New function.
46 * regcache.h (regcache::raw_compare): New declaration.
47
9c861883
AH
482018-06-11 Alan Hayward <alan.hayward@arm.com>
49
50 * regcache.c (new_register_cache): Use new.
51 (free_register_cache): Use delete.
52 (register_data): Use const.
53 (supply_register): Move body inside regcache.
54 (regcache::raw_supply): New override function.
55 (collect_register): Move body inside regcache.
56 (regcache::raw_collect): New override function.
57 (regcache::get_register_status): New override function.
58 * regcache.h (struct regcache): Inherit from reg_buffer_common.
59
40591844
TT
602018-06-09 Tom Tromey <tom@tromey.com>
61
62 * event-loop.c (gdb_event, gdb_event_p): Remove typedefs. Don't
63 declare queue.
64 (event_queue): Use std::queue.
65 (gdb_event_xfree): Remove.
66 (initialize_event_loop, process_event, wait_for_event): Update.
67
6341380d
SC
682018-06-08 Stan Cox <scox@redhat.com>
69
70 * win32-low.c (win32_create_inferior): last_ptid and last_status
71 moved to client_state.
72
03349c93
PA
732018-06-08 Pedro Alves <palves@redhat.com>
74
75 * Makefile.in (GDBREPLAY_OBS): Add common/cleanups.o,
76 common/common-exceptions.o, common/common-utils.o,
77 common/errors.o, common/print-utils.o and utils.o.
78 * gdbreplay.c: Include "common-defs.h" instead of the two
79 'config.h's here. Don't include stdio.h, errno.h, stdlib.h,
80 string.h or alloca.h.
81 (perror_with_name): Delete.
82 (remote_open): Use xstrdup instead of strdup.
83 (main): Rename to ...
84 (captured_main): ... this.
85 (main): New.
86
8dcc53b3
TT
872018-06-08 Tom Tromey <tom@tromey.com>
88
89 * linux-low.c (linux_low_read_btrace): Update.
90
c12a5089
SC
912018-06-04 Stan Cox <scox@redhat.com>
92
93 * server.h (struct client_state): New.
94 * server.c (cont_thread, general_thread, multi_process)
95 (report_fork_events, report_vfork_events, report_exec_events)
96 (report_thread_events, swbreak_feature, hwbreak_feature)
97 (vCont_supported, disable_randomization, pass_signals)
98 (program_signals, program_signals_p, last_status, last_ptid, own_buf):
99 Moved to client_state.
100 * remote-utils.c (remote_debug, noack_mode)
101 (transport_is_reliable): Moved to client_state.
102 * tracepoint.c (current_traceframe): Moved to client_state.
103
104 Update all callers.
105 * server.c, remote-utils.c, tracepoint.c, fork-child.c,
106 linux-low.c, remote-utils.h, target.c: Use client_state.
107
122394f1
AH
1082018-05-31 Alan Hayward <alan.hayward@arm.com>
109
110 * configure.srv: Add new c/h file.
111
95228a0d
AH
1122018-05-31 Alan Hayward <alan.hayward@arm.com>
113
114 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add
115 null VQ.
116
d8dab6c3
MR
1172018-05-25 Maciej W. Rozycki <macro@mips.com>
118
119 * gdb.arch/mips-fpregset-core.exp: New test.
120 * gdb.arch/mips-fpregset-core.c: New test source.
121
81e25b7c
EK
1222018-05-23 Erik Kurzinger <ekurzinger@nvidia.com>
123
124 PR server/23198
125 * hostio.c (require_int): Do not report overflow for integers
126 between 0xfffffff and 0x7fffffff.
127
7e947ad3
MR
1282018-05-22 Maciej W. Rozycki <macro@mips.com>
129
130 * linux-mips-low.c [HAVE_PTRACE_GETREGS] (mips_collect_register)
131 (mips_supply_register): Move outside HAVE_PTRACE_GETREGS.
132 (mips_collect_ptrace_register, mips_supply_ptrace_register): New
133 functions.
134 (the_low_target): Wire them.
135
1d75a658
PFC
1362018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
137
138 * linux-ppc-low.c (ppc_fill_vrregset): Add vscr_offset variable.
139 Set vscr_offset to 0 in little-endian mode and 12 in big-endian
140 mode. Call collect_register_by_name with vscr using
141 vscr_offset. Zero-pad vscr and vrsave fields in collector buffer.
142 (ppc_store_vrregset): Add and set vscr_offset variable as in
143 ppc_fill_vrregset. Call supply_register_by_name with vscr using
144 vscr_offset.
145
d078308a
PFC
1462018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
147
148 * linux-ppc-low.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
149 (ppc_arch_setup): Change SIZEOF_VRREGS and SIZEOF_VSXREGS to
150 PPC_LINUX_SIZEOF_VRREGSET and PPC_LINUX_SIZEOF_VSXREGSET.
151
7273b5fc
PFC
1522018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
153
154 * linux-ppc-low.c (ppc_fill_vsxregset): Remove ppc_hwcap check.
155 (ppc_store_vsxregset): Likewise.
156 (ppc_fill_vrregset): Likewise.
157 (ppc_store_vrregset): Likewise.
158 (ppc_fill_evrregset): Likewise.
159 (ppc_store_evrregset): Likewise.
160 (ppc_regsets): Set VSX/VR/EVR regset sizes to 0.
161 (ppc_arch_setup): Iterate through ppc_regsets and set sizes when
162 needed.
163
2e077f5e
PFC
1642018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
165
166 * linux-ppc-low.c (ppc_arch_setup): Remove code for getting the
167 wordsize of the inferior. Call ppc_linux_target_wordsize.
168
bd64614e
PFC
1692018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
170
171 * configure.srv (srv_tgtobj): Add arch/ppc-linux-common.o.
172 * Makefile.in (SFILES): Add arch/ppc-linux-common.c.
173 * linux-ppc-tdesc.h: Rename to linux-ppc-tdesc-init.h.
174 * linux-ppc-tdesc-init.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
175 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
176 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
177 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
178 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
179 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
180 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
181 (tdesc_powerpc_e500l): Remove.
182 * linux-ppc-ipa.c: Include arch/ppc-linux-tdesc.h and
183 linux-ppc-tdesc-init.h. Don't include linux-ppc-tdesc.h.
184 * linux-ppc-low.c: Include arch/ppc-linux-common.h,
185 arch/ppc-linux-tdesc.h, and linux-ppc-tdesc-init.h. Don't include
186 linux-ppc-tdesc.h.
187 (ppc_arch_setup): Remove target description matching code. Fill a
188 ppc_linux_features struct and call ppc_linux_match_description
189 with it.
190
75d74cca
MR
1912018-05-22 Maciej W. Rozycki <macro@mips.com>
192
193 * linux-mips-low.c (mips_cannot_fetch_register): Return 1 if the
194 width of the requested register exceeds the width of the
195 `ptrace' data type.
196 (mips_cannot_store_register): Likewise.
197
e4439e43
MR
1982018-05-21 Maciej W. Rozycki <macro@mips.com>
199
200 * linux-mips-low.c (mips_fetch_register): New function. Update
201 preceding comment.
202 (mips_store_gregset): Supply 0 rather than $restart for $zero.
203 (the_low_target): Wire `mips_fetch_register'.
204
55271bf9
JB
2052018-05-10 Joel Brobecker <brobecker@adacore.com>
206
207 * lynx-i386-low.c (LYNXOS_178): New macro.
208 [LYNXOS_178] (usr_fcontext_t): Provide a definition that matches
209 the layout on LynxOS-178.
210 (lynx_i386_fill_fpregset, lynx_i386_store_fpregset): Do not
211 handle floating point registers that are not supported by
212 LynxOS-178.
213
1a34f210
TT
2142018-05-10 Tom Tromey <tom@tromey.com>
215
216 * configure: Rebuild.
217
190852c8
JB
2182018-05-10 Joel Brobecker <brobecker@adacore.com>
219
220 PR server/23158:
221 * tdesc.h (init_target_desc) <expedite_regs>: New parameter.
222 * tdesc.c (init_target_desc) <expedite_regs>: New parameter.
223 Use it to set the expedite_regs field in the given tdesc.
224 * x86-tdesc.h: New file.
225 * linux-aarch64-tdesc.c (aarch64_linux_read_description):
226 Adjust following the addition of the new expedite_regs parameter
227 to init_target_desc.
228 * linux-tic6x-low.c (tic6x_read_description): Likewise.
229 * linux-x86-tdesc.c: #include "x86-tdesc.h".
230 (i386_linux_read_description, amd64_linux_read_description):
231 Adjust following the addition of the new expedite_regs parameter
232 to init_target_desc.
233 * lynx-i386-low.c: #include "x86-tdesc.h".
234 (lynx_i386_arch_setup): Adjust following the addition of the new
235 expedite_regs parameter to init_target_desc.
236 * nto-x86-low.c: #include "x86-tdesc.h".
237 (nto_x86_arch_setup): Adjust following the addition of the new
238 expedite_regs parameter to init_target_desc.
239 * win32-i386-low.c: #include "x86-tdesc.h".
240 (i386_arch_setup): Adjust following the addition of the new
241 expedite_regs parameter to init_target_desc.
242
7dbac825
JB
2432018-05-10 Joel Brobecker <brobecker@adacore.com>
244
245 PR server/23158:
246 * win32-low.c (win32_create_inferior): Add call to my_wait
247 setting last_status global.
248
906994d9
JB
2492018-05-10 Joel Brobecker <brobecker@adacore.com>
250
251 PR server/23158:
252 * win32-low.c (create_process): Only call gdb_tilde_expand if
253 inferior_cwd is not NULL.
254
8ee22052
AB
2552018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
256
257 * i387-fp.c (i387_cache_to_xsave): Only write x87 control
258 registers to the cache if their values have changed.
259 (i387_xsave_to_cache): Provide default values for x87 control
260 registers when these features are available, but disabled.
261 * regcache.c (supply_register_by_name_zeroed): New function.
262 * regcache.h (supply_register_by_name_zeroed): Declare new
263 function.
264
aff689d3
TT
2652018-05-07 Tom Tromey <tom@tromey.com>
266
267 * configure: Rebuild.
268
85e26832
TT
2692018-05-04 Tom Tromey <tom@tromey.com>
270
271 * configure: Rebuild.
272
a3b60e45
JK
2732018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
274 Pedro Alves <palves@redhat.com>
275
276 * linux-aarch64-low.c (aarch64_stopped_data_address):
277 Likewise.
278
632e107b
TT
2792018-04-27 Tom Tromey <tom@tromey.com>
280
281 * configure: Rebuild.
282
458412c3
TT
2832018-04-23 Tom Tromey <tom@tromey.com>
284
285 * configure: Rebuild.
286
f31c089e
SM
2872018-04-19 Simon Marchi <simon.marchi@ericsson.com>
288
289 * Makefile.in (depcomp): Add "..".
290 (all_deps_files): New and use it.
291
b319b098
AH
2922018-04-18 Alan Hayward <alan.hayward@arm.com>
293
294 * configure.srv (aarch64*-*-linux*): Don't include xml.
295 (i[34567]86-*-cygwin*): Likewise.
296 (i[34567]86-*-linux*): Likewise.
297 (i[34567]86-*-lynxos*): Likewise.
298 (i[34567]86-*-mingw32ce*): Likewise.
299 (i[34567]86-*-mingw*): Likewise.
300 (i[34567]86-*-nto*): Likewise.
301 (tic6x-*-uclinux): Likewise.
302 (x86_64-*-linux*): Likewise.
303 (x86_64-*-mingw*): Likewise.
304 (x86_64-*-cygwin*): Likewise.
305
3b74854b
AH
3062018-04-18 Alan Hayward <alan.hayward@arm.com>
307
308 * tdesc.c: Remove xml parameter.
309
e98577a9
AH
3102018-04-18 Alan Hayward <alan.hayward@arm.com>
311
312 * server.c (get_features_xml): Remove cast.
313 * tdesc.c (void target_desc::accept): Fill in function.
314 (tdesc_get_features_xml): Remove old xml creation.
315 (print_xml_feature::visit_pre): Add xml vistor.
316 * tdesc.h (struct target_desc): Make xmltarget mutable.
317 (tdesc_get_features_xml): Remove declaration.
318
d278f585
AH
3192018-04-18 Alan Hayward <alan.hayward@arm.com>
320
321 * tdesc.c (tdesc_architecture_name): Add new function.
322 (tdesc_osabi_name): Likewise.
323 (tdesc_get_features_xml): Use new functions.
324
eee8a18d
AH
3252018-04-18 Alan Hayward <alan.hayward@arm.com>
326
327 * tdesc.c (tdesc_create_flags): Remove.
328 (tdesc_add_flag): Likewise.
329 (tdesc_named_type): Likewise.
330 (tdesc_create_union): Likewise.
331 (tdesc_create_struct): Likewise.
332 (tdesc_create_vector): Likewise.
333 (tdesc_add_bitfield): Likewise.
334 (tdesc_add_field): Likewise.
335 (tdesc_set_struct_size): Likewise.
336
82ec9bc7
AH
3372018-04-18 Alan Hayward <alan.hayward@arm.com>
338
339 * tdesc.c (~target_desc): Remove implictly deleted items.
340 (init_target_desc): Iterate all features.
341 (tdesc_get_features_xml): Use vector.
342 (tdesc_create_feature): Create feature.
343 * tdesc.h (tdesc_feature) Remove
344 (target_desc): Add features.
345
ea3e7d71
AH
3462018-04-18 Alan Hayward <alan.hayward@arm.com>
347
348 * Makefile.in: Add common/tdesc.c
349 * tdesc.c (init_target_desc): init all reg_defs from register
350 vector.
351 (tdesc_create_reg): Create tdesc_reg.
352 * tdesc.h (tdesc_feature): Add register vector.
353
17d08cd4
SM
3542018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
355
356 * tdesc.h (struct target_desc) <features>: Change type to
357 std::vector<std::string>.
358 * tdesc.c (target_desc::~target_desc): Adjust to std::vector
359 changes.
360 (tdesc_get_features_xml): Likewise.
361 (tdesc_create_feature): Likewise.
362
5cd3e386
AH
3632018-03-26 Alan Hayward <alan.hayward@arm.com>
364
365 * regcache.c (find_register_by_number): Return a ref.
366 (find_regno): Use references.
367 (register_size): Likewise.
368 (register_data): Likewise.
369 * tdesc.c (target_desc::~target_desc): Remove free calls.
370 (target_desc::operator==): Use std::vector compare.
371 (init_target_desc): Use reference.
372 (tdesc_create_reg): Use reg constructors.
373 * tdesc.h (struct target_desc): Replace pointer with object.
374
dff7492c
AH
3752018-03-23 Alan Hayward <alan.hayward@arm.com>
376
377 * regcache.c (find_register_by_number): Make static.
378 (find_regno): Use find_register_by_number
379 * regcache.h (struct reg): Remove declaration.
380
d80e5242
AH
3812018-03-23 Alan Hayward <alan.hayward@arm.com>
382
383 * tdesc.c (target_desc::~target_desc): Move to here.
384 (target_desc::operator==): Likewise.
385 * tdesc.h (target_desc::~target_desc): Move from here.
386 (target_desc::operator==): Likewise.
387
f69c5afb
AA
3882018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
389
390 * linux-s390-low.c (s390_get_wordsize): Correct brace style.
391
ce29f843
AA
3922018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
393
394 * linux-s390-ipa.c (get_ipa_tdesc): Add handling for
395 S390_TDESC_GS.
396 * linux-s390-low.c (s390_get_ipa_tdesc_idx): Likewise.
397 (initialize_low_tracepoint): Call init_registers_s390x_gs_linux64
398 and init_registers_s390_gs_linux64.
399
c49bd90b
AA
4002018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
401
402 * linux-s390-low.c (s390_fill_gs): Remove function.
403 (s390_fill_gsbc): Remove function.
404 (s390_regsets): Set fill functions for the guarded storage regsets
405 to NULL.
406
7edb9bd3
AA
4072018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
408
409 * linux-s390-low.c (s390_get_hwcap): Replace tdesc parameter by
410 the word size. Add comment.
411 (s390_get_wordsize): New function.
412 (s390_arch_setup): No longer select a temporary tdesc to fetch the
413 pswm with it. Instead, use s390_get_wordsize to determine the
414 word size first and derive the correct tdesc from that directly.
415
39be3c7e
SM
4162018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
417
418 * Makefile.in: Include silent-rules.mk.
419 (srcdir, abs_top_srcdir, abs_srcdir, VPATH): Move up.
420 (COMPILE): Add ECHO_CXX.
421 (gdbserver$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
422 (gdbreplay$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
423 ($(IPA_LIB)): Add SILENCE and ECHO_CXXLD.
424 (version-generated.c): Add ECHO_GEN.
425 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN_GENERATED.
426 (IPAGENT_COMPILE): Add ECHO_CXX.
427 (%-generated.c): Add ECHO_REGDAT.
428
3ae9ce5d
TT
4292018-03-14 Tom Tromey <tom@tromey.com>
430
431 PR cli/14977:
432 * ax.c (ax_printf): Special case for NULL.
433
e6a58aa8
SM
4342018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
435
436 * linux-low.c (linux_qxfer_libraries_svr4): Use
437 xml_escape_text_append.
438
f6e8a41e
SM
4392018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
440
441 * linux-low.c (linux_qxfer_libraries_svr4): Use std::string.
442
b9671caf
SM
4432018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
444
445 * server.c (handle_general_set): Remove unnecessary xstrdup.
446
e80aaf61
SM
4472018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
448
449 * server.c (parse_debug_format_options): Adjust to
450 delim_string_to_char_ptr_vec changes.
451 * thread-db.c (thread_db_load_search): Adjust to
452 dirnames_to_char_ptr_vec changes.
453
b1223e78
MM
4542018-03-01 Markus Metzger <markus.t.metzger@intel.com>
455
456 * target.h (target_enable_btrace, target_disable_btrace)
457 (target_read_btrace, target_read_btrace_conf): Turn macro into
458 inline function. Throw error if target method is not defined.
459 * server.c (handle_qxfer_btrace handle_qxfer_btrace_conf): Remove
460 check for btrace target method. Be prepared to handle exceptions
461 from btrace target methods.
462
81561546
SDJ
4632018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
464
465 * server.c (captured_main): Change order of error message printed
466 when the current working directory cannot be found.
467
25e3c82c
SDJ
4682018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
469
470 * server.c: Include "filenames.h" and "pathstuff.h".
471 (program_name): Delete variable.
472 (program_path): New anonymous class.
473 (get_exec_wrapper): Use "program_path" instead of
474 "program_name".
475 (handle_v_run): Likewise.
476 (captured_main): Likewise.
477 (process_serial_event): Likewise.
478
b4987c95
SDJ
4792018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
480
481 * Makefile.in (SFILES): Add "$(srcdir)/common/pathstuff.c".
482 (OBJS): Add "pathstuff.o".
483 * server.c (current_directory): New global variable.
484 (captured_main): Initialize "current_directory".
485
f46cd62a
AH
4862018-02-26 Alan Hayward <alan.hayward@arm.com>
487
488 * tdesc.c: Use common/tdesc.h.
489 * tdesc.h: Likewise.
490
a543c5ca
AH
4912018-02-20 Alan Hayward <alan.hayward@arm.com>
492 Simon Marchi <simon.marchi@ericsson.com>
493
494 * Makefile.in: Switch order of make rules.
495
b5884fa7
AH
4962018-02-19 Alan Hayward <alan.hayward@arm.com>
497
498 * Makefile.in: Add common directory in build.
499 * configure.ac: Add common reference.
500 * configure: Regenerate.
501
de6242d3
MM
5022018-02-09 Markus Metzger <markus.t.metzger@intel.com>
503
504 * linux-low.c (linux_target_ops): Remove linux_supports_btrace.
505 * nto-low.c (nto_target_ops): Remove NULL for supports_btrace.
506 * spu-low.c (spu_target_ops): Likewise.
507 * win32-low.c (win32_target_ops): Likewise.
508 * server.c (supported_btrace_packets): Report packets unconditionally.
509 * target.h (target_ops) <supports_btrace>: Remove.
510 (target_supports_btrace): Remove.
511
9ee23a85
MM
5122018-02-09 Markus Metzger <markus.t.metzger@intel.com>
513
514 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt)
515 (handle_btrace_disable): Change return type to void. Use exceptions
516 to report errors.
517 (handle_btrace_general_set): Catch exception and copy message to
518 return message.
519
8ce47547
TT
5202018-02-08 Tom Tromey <tom@tromey.com>
521
522 * linux-low.c (install_software_single_step_breakpoints): Use
523 make_scoped_restore.
524 * inferiors.c (make_cleanup_restore_current_thread): Remove.
525 (do_restore_current_thread_cleanup): Remove.
526 * gdbthread.h (make_cleanup_restore_current_thread): Don't
527 declare.
528
45dd3607
TT
5292018-02-08 Tom Tromey <tom@tromey.com>
530
531 * mem-break.c (set_raw_breakpoint_at): Use
532 gdb::unique_xmalloc_ptr.
533
e671cd59
PA
5342018-01-30 Pedro Alves <palves@redhat.com>
535
536 PR gdb/13211
537 * target.c (target_terminal::terminal_state): Rename to ...
538 (target_terminal::m_terminal_state): ... this.
539
a0aad537
JC
5402018-01-19 James Clarke <jrtc27@jrtc27.com>
541
542 * linux-low.c (handle_extended_wait): Surround call to
543 thread_db_notice_clone with #ifdef USE_THREAD_DB.
544
4d9b86e1
SM
5452018-01-17 Simon Marchi <simon.marchi@ericsson.com>
546
547 * linux-low.c (attach_proc_task_lwp_callback): Adjust to
548 linux_ptrace_attach_fail_reason_string now returning an
549 std::string.
550 (linux_attach): Likewise.
551 * thread-db.c (attach_thread): Likewise.
552
f517c180
EA
5532018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
554
555 PR gdb/21559
556 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
557 checking for fs_base/gs_base fields in struct user_regs_struct.
558 * configure: Regenerate.
559
9a70f35c
YQ
5602018-01-16 Yao Qi <yao.qi@linaro.org>
561
562 PR gdb/18749
563 * linux-low.c (fetch_register): Call supply_register instead of
564 error.
565
605fd3c6
YQ
5662018-01-08 Yao Qi <yao.qi@linaro.org>
567 Simon Marchi <simon.marchi@ericsson.com>
568
569 * Makefile.in (OBS): Remove selftest.o.
570 * configure.ac: Set srv_selftest_objs if $development is true.
571 (GDBSERVER_DEPFILES): Append $srv_selftest_objs.
572 * configure: Re-generated.
573 * server.c (captured_main): Wrap variable selftest_filter with
574 GDB_SELF_TEST.
575
2cc05030
SM
5762018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
577
578 * server.c (parse_debug_format_options): Return std::string.
579 (handle_monitor_command, captured_main): Adjust.
580
e379cee6
PA
5812018-01-05 Pedro Alves <palves@redhat.com>
582
583 PR gdb/18653
584 * server.c (captured_main): Pass quiet=false to
585 save_original_signals_state.
586
82e1e79a
JB
5872018-01-01 Joel Brobecker <brobecker@adacore.com>
588
589 * gdbreplay.c (gdbreplay_version): Update copyright year in
590 version message.
591 * server.c (gdbserver_version): Likewise.
592
8e481c3b
TT
5932017-12-08 Tom Tromey <tom@tromey.com>
594
595 * ax.c (ax_printf): Update.
596
a8806230
YQ
5972017-12-07 Yao Qi <yao.qi@linaro.org>
598
599 * linux-aarch64-ipa.c (initialize_low_tracepoint): Call
600 aarch64_linux_read_description.
601 * linux-amd64-ipa.c (idx2mask): New array.
602 (get_ipa_tdesc): Move idx2mask out.
603 (initialize_low_tracepoint): Initialize target descriptions.
604 * linux-i386-ipa.c (idx2mask): New array.
605 (get_ipa_tdesc): Move idx2mask out.
606 (initialize_low_tracepoint): Initialize target descriptions.
607
d4a0e8b5
SM
6082017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
609
610 * tdesc.c (struct tdesc_type): Change return type.
611 (tdesc_add_flag): Change parameter type.
612 (tdesc_add_bitfield): Likewise.
613 (tdesc_add_field): Likewise.
614 (tdesc_set_struct_size): Likewise.
615
798a7429
SM
6162017-12-05 Simon Marchi <simon.marchi@ericsson.com>
617
618 * regcache.c (registers_to_string): Remove unused variable.
619
c0e15c9b
SM
6202017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
621
622 * inferiors.c (for_each_inferior_with_data): Remove.
623 * inferiors.h (for_each_inferior_with_data): Remove.
624 * server.c (handle_qxfer_threads_worker): Change parameter type.
625 (handle_qxfer_threads_proper): Use for_each_thread.
626
f0045347
SM
6272017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
628
629 * inferiors.c (for_each_inferior): Remove.
630 (clear_inferiors): Use for_each_thread.
631 * inferiors.h (for_each_inferior): Remove.
632 * linux-low.c (linux_wait_for_event_filtered): Use
633 for_each_thread.
634 (linux_stabilize_threads): Likewise.
635 * regcache.c (regcache_release): Likewise.
636 * server.c (gdb_wants_all_threads_stopped): Likewise.
637 (clear_pending_status_callback): Remove.
638 (handle_status): Use for_each_thread.
639 (captured_main): Likewise.
640 * win32-low.c (child_init_thread_list): Likewise.
641 (win32_clear_inferiors): Likewise.
642 (fake_breakpoint_event): Likewise.
643
9521758b
SM
6442017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
645
646 * inferiors.h (find_inferior): Remove.
647 * inferiors.c (find_inferior): Remove.
648
8f86d7aa
SM
6492017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
650
651 * linux-low.c (resume_status_pending_p): Update comment.
652 (need_step_over_p): Update comment.
653
e2b44075
SM
6542017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
655
656 * linux-low.c (proceed_one_lwp): Return void, change parameter
657 type.
658 (unsuspend_and_proceed_one_lwp): Likewise.
659 (proceed_all_lwps): Use for_each_thread.
660 (unstop_all_lwps): Likewise.
661
c80825ff
SM
6622017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
663
664 * linux-low.c (linux_resume_one_thread): Return void, take
665 parameter directly.
666 (linux_resume): Use for_each_thread.
667
df3e4dbe
SM
6682017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
669
670 * linux-low.c (send_sigstop_callback): Return void, change
671 parameter type. Rename to...
672 (send_sigstop): ... this.
673 (suspend_and_send_sigstop_callback): Return void, change parameter
674 type. Rename to...
675 (suspend_and_send_sigstop): ... this.
676 (stop_all_lwps): Use for_each_thread.
677
5a6b0a41
SM
6782017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
679
680 * linux-low.c (lwp_running): Return bool, remove unused
681 argument.
682 (linux_stabilize_threads): Use find_thread.
683
39a64da5
SM
6842017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
685
686 * linux-low.c (select_singlestep_lwp_callback): Remove.
687 (count_events_callback): Remove.
688 (select_event_lwp_callback): Remove.
689 (select_event_lwp): Use find_thread/for_each_thread.
690
a1385b7b
SM
6912017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
692
693 * linux-low.c (not_stopped_callback): Return bool, take filter
694 argument directly.
695 (linux_wait_for_event_filtered): Use find_thread.
696 (linux_wait_1): Likewise.
697
454296a2
SM
6982017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
699
700 * linux-low.c (same_lwp): Remove.
701 (find_lwp_pid): Use find_thread.
702
6b2a85da
SM
7032017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
704
705 * linux-low.c (delete_lwp_callback): Remove.
706 (linux_mourn): Use for_each_thread.
707
798a38e8
SM
7082017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
709
710 * linux-low.c (linux_detach_lwp_callback): Return void, remove
711 args parameter, don't check for pid.
712 (linux_detach): Use for_each_thread.
713
e4eb0dec
SM
7142017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
715
716 * linux-low.c (struct counter): Remove.
717 (second_thread_of_pid_p): Remove.
718 (last_thread_of_process_p): Use find_thread.
719
83e1b6c1
SM
7202017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
721
722 * inferiors.c (find_inferior_in_random): Remove.
723 * inferiors.h (find_inferior_in_random): Remove.
724 * linux-low.c (status_pending_p_callback): Return bool, accept
725 parameter ptid directly.
726 (linux_wait_for_event_filtered): Use find_thread_in_random.
727 (linux_wait_1): Likewise.
728
8dc7b443
SM
7292017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
730
731 * inferiors.c (find_inferior_id): Remove.
732 (find_thread_ptid): Move implemention from find_inferior_id to
733 here.
734 * inferiors.h (find_inferior_id): Remove.
735 * server.c (handle_status): Use find_thread_ptid.
736 (process_serial_event): Likewise.
737 * thread-db.c (find_one_thread): Likewise.
738 (thread_db_thread_handle): Likewise.
739 * win32-low.c (thread_rec): Likewise.
740 (child_delete_thread): Likewise.
741 (win32_thread_alive): Likewise.
742 (get_child_debug_event): Likewise.
743
da25033c
SM
7442017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
745
746 * linux-mips-low.c (update_watch_registers_callback): Return
747 void, remove pid_p parameter, don't check for pid.
748 (mips_insert_point, mips_remove_point): Use for_each_thread.
749
c91bb56b
SM
7502017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
751
752 * lynx.low (lynx_delete_thread_callback): Remove.
753 (lynx_mourn): Use for_each_thread.
754
634a3254
SM
7552017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
756
757 * regcache.c (regcache_invalidate_one): Remove.
758 (regcache_invalidate_pid): use for_each_thread.
759
41272101
TT
7602017-11-26 Tom Tromey <tom@tromey.com>
761
762 * linux-low.c (linux_create_inferior): Update.
763
f5291a6f
UW
7642017-11-24 Ulrich Weigand <uweigand@de.ibm.com>
765
766 * spu-low.c (spu_create_inferior): Fix typo in argument name.
767
6654d750
AH
7682017-11-24 Alan Hayward <alan.hayward@arm.com>
769
770 * configure.srv: Add linux-aarch64-tdesc-selftest.o.
771 * linux-aarch64-low.c (initialize_low_arch): Call init func.
772 * linux-aarch64-tdesc-selftest.c: New file.
773 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
774
7752017-11-24 Alan Hayward <alan.hayward@arm.com>
776
777 * configure.srv: Add new file.
778 * linux-aarch64-low.c (initialize_low_arch): Call init func.
779 * linux-aarch64-tdesc-selftest.c: New file.
780 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
781
49bdb7ee
AH
7822017-11-24 Alan Hayward <alan.hayward@arm.com>
783
784 * linux-aarch64-ipa.c (initialize_low_tracepoint): Remove init.
785 * linux-aarch64-low.c (initialize_low_arch): Remove init.
786 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add init.
787
d6d7ce56
AH
7882017-11-24 Alan Hayward <alan.hayward@arm.com>
789
790 * configure.srv: Add new files.
791 * linux-aarch64-ipa.c (get_ipa_tdesc): Call
792 aarch64_linux_read_description.
793 * linux-aarch64-low.c (aarch64_linux_read_description):
794 Merge with aarch64_arch_setup.
795 (aarch64_arch_setup): Call aarch64_linux_read_description.
796 * linux-aarch64-tdesc.c: New file.
797 * linux-aarch64-tdesc.h: New file.
798
506fe5f4
YQ
7992017-11-24 Yao Qi <yao.qi@linaro.org>
800
801 * configure.srv: Set $srv_regobj for tic6x-linux.
802 * linux-tic6x-low.c: Include "arch/tic6x.h" and "tdesc.h".
803 (tic6x_read_description): Move some code to tic6x_arch_setup.
804 (tic6x_tdesc_test): New function.
805 (initialize_low_arch): Call selftests::register_test.
806
29f9a567
YQ
8072017-11-22 Yao Qi <yao.qi@linaro.org>
808
809 * remote-utils.c (prepare_resume_reply): Use memcpy.
810
578290ec
SM
8112017-11-19 Simon Marchi <simon.marchi@ericsson.com>
812
813 * linux-low.c (kill_one_lwp_callback): Return void, take
814 argument directly, don't filter on pid.
815 (linux_kill): Use for_each_thread.
816
eca55aec
SM
8172017-11-19 Simon Marchi <simon.marchi@ericsson.com>
818
819 * linux-low.c (need_step_over_p): Return bool, remove dummy
820 argument.
821 (linux_resume, proceed_all_lwps): Use find_thread.
822
25c28b4d
SM
8232017-11-19 Simon Marchi <simon.marchi@ericsson.com>
824
825 * linux-low.c (resume_status_pending_p): Return bool, remove
826 flag_p argument.
827 (linux_resume): Use find_thread.
828
5fdda392
SM
8292017-11-19 Simon Marchi <simon.marchi@ericsson.com>
830
831 * linux-low.c (struct thread_resume_array): Remove.
832 (linux_set_resume_request): Return void, take arguments
833 directly.
834 (linux_resume): Use for_each_thread.
835
fcb056a5
SM
8362017-11-19 Simon Marchi <simon.marchi@ericsson.com>
837
838 * linux-low.c (stuck_in_jump_pad_callback): Change prototype,
839 return bool, remove data argument.
840 (linux_stabilize_threads): Use find_thread.
841
139720c5
SM
8422017-11-19 Simon Marchi <simon.marchi@ericsson.com>
843
844 * linux-low.c (unsuspend_one_lwp): Remove.
845 (unsuspend_all_lwps): Use for_each_thread, inline code from
846 unsuspend_one_lwp.
847
6d1e5673
SM
8482017-11-19 Simon Marchi <simon.marchi@ericsson.com>
849
850 * gdbthread.h (find_thread): Add overload with ptid_t filter.
851 * linux-low.c (struct iterate_over_lwps_args): Remove.
852 (iterate_over_lwps_filter): Remove.
853 (iterate_over_lwps): Use find_thread.
854
bbf550d5
SM
8552017-11-19 Simon Marchi <simon.marchi@ericsson.com>
856
857 * linux-low.c (reset_lwp_ptrace_options_callback): Remove.
858 (linux_handle_new_gdb_connection): Use for_each_thread, inline
859 code from reset_lwp_ptrace_options_callback.
860
00192f77
SM
8612017-11-19 Simon Marchi <simon.marchi@ericsson.com>
862
863 * linux-arm-low.c (struct update_registers_data): Remove.
864 (update_registers_callback): Return void, take arguments
865 directly, don't check thread's pid.
866 (arm_insert_point, arm_remove_point): Use for_each_thread.
867
2bee2b6c
SM
8682017-11-19 Simon Marchi <simon.marchi@ericsson.com>
869
870 * win32-low.c (continue_one_thread): Return void, take argument
871 directly.
872 (child_continue): Use for_each_thread.
873
0b360f19
SM
8742017-11-19 Simon Marchi <simon.marchi@ericsson.com>
875
876 * win32-i386-low.c (update_debug_registers_callback): Rename
877 to ...
878 (update_debug_registers): ... this, return void, remove pid_p arg.
879 (x86_dr_low_set_addr, x86_dr_low_set_control): Use for_each_thread.
880
f27866ba
SM
8812017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
882
883 * inferiors.h (struct process_info): Add constructor, initialize
884 fields..
885 <syscalls_to_catch>: Change type to std::vector<int>.
886 * inferiors.c (add_process): Allocate process_info with new.
887 (remove_process): Free process_info with delete.
888 * linux-low.c (handle_extended_wait): Adjust.
889 (gdb_catching_syscalls_p, gdb_catch_this_syscall_p): Adjust.
890 * server.c (handle_general_set): Adjust.
891
e849ea89
PA
8922017-11-16 Pedro Alves <palves@redhat.com>
893
894 * remote-utils.c (remote_close): Block SIGIO signals instead of
895 uninstalling the SIGIO handler.
896
1d0aa65c
AH
8972017-11-16 Alan Hayward <alan.hayward@arm.com>
898
899 * tdesc.c (tdesc_get_features_xml): Allow null osabi.
900
3491a34c
YQ
9012017-11-16 Yao Qi <yao.qi@linaro.org>
902
903 * linux-tic6x-low.c (tic6x_fill_gregset): Cast buf.
904 (tic6x_store_gregset): Likewise.
905 (tic6x_usrregs_info): Move it up.
906
a602f924
AH
9072017-11-15 Alan Hayward <alan.hayward@arm.com>
908
909 * Makefile.in: Update arch rules.
910 * configure.srv: Explicitly mark arch/ files.
911
5616b6c3
AS
9122017-11-13 Andreas Schwab <schwab@suse.de>
913
914 * linux-m68k-low.c (m68k_supports_hardware_single_step): New
915 function.
916 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
917
d1928160
PA
9182017-11-06 Pedro Alves <palves@redhat.com>
919
920 * config.in, configure: Regenerate.
921
bac608e7
SM
9222017-10-27 Simon Marchi <simon.marchi@ericsson.com>
923
924 * target.c (struct thread_search): Remove.
925 (thread_search_callback): Remove.
926 (prepare_to_access_memory): Use for_each_thread instead of
927 find_inferior. Inline code from thread_search_callback.
928
eaddb425
SM
9292017-10-27 Simon Marchi <simon.marchi@ericsson.com>
930
931 * server.c (struct visit_actioned_threads_data): Remove.
932 (visit_actioned_threads): Change prototype to take arguments
933 directly.
934 (resume): Use find_thread instead of find_inferior.
935
99078d34
SM
9362017-10-27 Simon Marchi <simon.marchi@ericsson.com>
937
938 * server.c (queue_stop_reply_callback): Change prototype, return
939 void.
940 (find_status_pending_thread_callback): Remove.
941 (handle_status): Replace find_inferior with find_thread and
942 for_each_thread.
943
cc628f3d
AH
9442017-10-25 Alan Hayward <alan.hayward@arm.com>
945
946 * linux-aarch64-low.c (aarch64_fill_gregset): Replace defines
947 with REGNO.
948 (aarch64_store_gregset): Likewise.
949 (aarch64_fill_fpregset): Likewise.
950 (aarch64_store_fpregset): Likewise.
951
4d3bb80e
SM
9522017-10-21 Simon Marchi <simon.marchi@ericsson.com>
953
954 * gdbthread.h (find_thread, for_each_thread): New functions.
955 * inferiors.c (thread_of_pid): Remove.
956 (find_any_thread_of_pid): Use find_thread.
957 * linux-low.c (num_lwps): Use for_each_thread.
958
7a7cdfa0
YQ
9592017-10-17 Yao Qi <yao.qi@linaro.org>
960
961 * Makefile.in: Remove one rule.
962 * configure.srv: Rename aarch64-insn.o with arch/aarch64-insn.o.
963
e675d170
YQ
9642017-10-17 Yao Qi <yao.qi@linaro.org>
965
966 * configure.srv: Rename arm-linux.o with arch/arm-linux.o.
967 Rename arm-get-next-pcs.o with arch/arm-get-next-pcs.o.
968
7eb4e0f9
YQ
9692017-10-17 Yao Qi <yao.qi@linaro.org>
970
971 * configure.srv: Rename arm.o with arch/arm.o.
972
60d6cfc9
YQ
9732017-10-17 Yao Qi <yao.qi@linaro.org>
974
975 * Makefile.in (CONFIG_SRC_SUBDIR): New variable.
976 (clean): Remove .o files in CONFIG_SRC_SUBDIR.
977 (distclean): Remove DEPDIR in CONFIG_SRC_SUBDIR.
978 (arch-i386.o, arch-amd64.o): Remove rules.
979 (arch/%.o): New rule.
980 Update POSTCOMPILE and COMPILE.pre.
981 * configure.ac: Invoke AC_CONFIG_COMMANDS.
982 * configure: Re-generated.
983 * configure.srv: Replace arch-i386.o with arch/i386.o.
984 Replace arch-amd64.o with arch/amd64.o.
985
5bfda255
YQ
9862017-10-16 Yao Qi <yao.qi@linaro.org>
987
988 * configure: Regenerated.
989
9c80ecd6
SM
9902017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
991
992 * inferiors.h: (struct inferior_list): Remove.
993 (struct inferior_list_entry); Remove.
994 (add_inferior_to_list, clear_inferior_list, one_inferior_p,
995 A_I_NEXT, ALL_INFERIORS_TYPE, ALL_INFERIORS, remove_inferior,
996 get_first_inferior): Remove.
997 (for_each_inferior, for_each_inferior_with_data, find_inferior,
998 find_inferior_id, find_inferior_in_random): Change signature.
999 * inferiors.c (all_threads): Change type to
1000 std::list<thread_info *>.
1001 (get_thread): Remove macro.
1002 (find_inferior, find_inferior_id): Change signature, implement
1003 using find_thread.
1004 (find_inferior_in_random): Change signature, implement using
1005 find_thread_in_random.
1006 (for_each_inferior, for_each_inferior_with_data): Change
1007 signature, implement using for_each_thread.
1008 (add_inferior_to_list, remove_inferior): Remove.
1009 (add_thread, get_first_thread, thread_of_pid,
1010 find_any_thread_of_pid, free_one_thread, remove_thread): Update.
1011 (get_first_inferior, one_inferior_p, clear_inferior_list):
1012 Remove.
1013 (clear_inferiors, get_thread_process): Update.
1014 * gdbthread.h: Include <list>.
1015 (struct thread_info) <entry>: Remove field.
1016 <id>: New field.
1017 (all_threads): Change type to std::list<thread_info *>.
1018 (get_first_inferior): Add doc.
1019 (find_thread, for_each_thread, find_thread_in_random): New
1020 functions.
1021 (current_ptid, pid_of, ptid_of, lwpid_of): Update.
1022 * linux-arm-low.c (update_registers_callback): Update.
1023 * linux-low.c (second_thread_of_pid_p): Update.
1024 (kill_one_lwp_callback, linux_detach_lwp_callback,
1025 delete_lwp_callback, status_pending_p_callback, same_lwp,
1026 find_lwp_pid, num_lwps, iterate_over_lwps_filter,
1027 iterate_over_lwps, not_stopped_callback,
1028 resume_stopped_resumed_lwps, count_events_callback,
1029 select_singlestep_lwp_callback, select_event_lwp_callback,
1030 unsuspend_one_lwp, linux_wait_1, send_sigstop_callback,
1031 suspend_and_send_sigstop_callback, wait_for_sigstop,
1032 stuck_in_jump_pad_callback, move_out_of_jump_pad_callback,
1033 lwp_running, linux_set_resume_request, resume_status_pending_p,
1034 need_step_over_p, start_step_over, linux_resume_one_thread,
1035 proceed_one_lwp, unsuspend_and_proceed_one_lwp,
1036 reset_lwp_ptrace_options_callback): Update.
1037 * linux-mips-low.c (update_watch_registers_callback): Update.
1038 * regcache.c (regcache_invalidate_one, regcache_invalidate):
1039 Update.
1040 (free_register_cache_thread_one): Remove.
1041 (regcache_release): Update.
1042 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt,
1043 handle_qxfer_threads_worker): Update.
1044 (handle_query): Update, use list iterator.
1045 (visit_actioned_threads, handle_pending_status,
1046 queue_stop_reply_callback, gdb_wants_all_threads_stopped,
1047 clear_pending_status_callback, set_pending_status_callback,
1048 find_status_pending_thread_callback, handle_status,
1049 process_serial_event): Update.
1050 * target.c (thread_search_callback): Update.
1051 * thread-db.c (thread_db_get_tls_address): Update.
1052 * tracepoint.c (tracepoint_finished_step, tracepoint_was_hit):
1053 Update.
1054 * win32-i386-low.c (update_debug_registers_callback): Update.
1055 * win32-low.c (delete_thread_info, child_delete_thread,
1056 continue_one_thread, suspend_one_thread,
1057 get_child_debug_event): Adjust.
1058
9179355e
SM
10592017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
1060
1061 * gdbthread.h (ptid_of, pid_of, lwpid_of): New functions.
1062 * inferiors.h: Include <list>.
1063 (struct process_info) <entry>: Remove field.
1064 <pid>: New field.
1065 (pid_of): Change macro to function.
1066 (ptid_of, lwpid_of): Remove macro.
1067 (all_processes): Change type to std::list<process_info *>.
1068 (ALL_PROCESSES): Remove macro.
1069 (for_each_process, find_process): New function.
1070 * inferiors.c (all_processes): Change type to
1071 std::list<process_info *>.
1072 (find_thread_process): Adjust.
1073 (add_process): Likewise.
1074 (remove_process): Likewise.
1075 (find_process_pid): Likewise.
1076 (get_first_process): Likewise.
1077 (started_inferior_callback): Remove.
1078 (have_started_inferiors_p): Adjust.
1079 (attached_inferior_callback): Remove.
1080 (have_attached_inferiors_p): Adjust.
1081 * linux-low.c (check_zombie_leaders): Likewise.
1082 * linux-x86-low.c (x86_arch_setup_process_callback): Remove.
1083 (x86_linux_update_xmltarget): Adjust.
1084 * server.c (handle_query): Likewise.
1085 (gdb_reattached_process): Remove.
1086 (handle_status): Adjust.
1087 (kill_inferior_callback): Likewise.
1088 (detach_or_kill_inferior): Remove.
1089 (print_started_pid): Likewise.
1090 (print_attached_pid): Likewise.
1091 (detach_or_kill_for_exit): Update.
1092 (process_serial_event): Likewise.
1093 * linux-arm-low.c (arm_new_fork): Likewise.
1094
c9cb8905
SM
10952017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
1096
1097 * dll.h: Include <list>.
1098 (struct dll_info): Add constructor.
1099 <entry>: Remove field.
1100 (all_dlls): Change type to std::list<dll_info>.
1101 * dll.c: Include <algorithm>.
1102 (get_dll): Remove macro.
1103 (all_dlls): Change type to std::list<dll_info *>.
1104 (free_one_dll): Remove.
1105 (match_dll): Likewise.
1106 (loaded_dll): Adjust.
1107 (unloaded_dll): Adjust to all_dlls type change, use
1108 std::find_if. Inline code from match_dll.
1109 (clear_dlls): Adjust to all_dlls type change.
1110 * server.c (emit_dll_description): Remove.
1111 (handle_qxfer_libraries): Adjust to all_dlls type change,
1112 integrate emit_dll_description's functionality.
1113
04ec7890
SM
11142017-10-12 Simon Marchi <simon.marchi@ericsson.com>
1115
1116 * linux-low.h (struct linux_target_ops) <delete_process>: New
1117 field.
1118 * linux-low.c (linux_mourn): Call the_low_target.delete_process.
1119 * linux-aarch64-low.c (aarch64_linux_delete_process): New.
1120 (struct linux_target_ops): Add delete_process callback.
1121 * linux-arm-low.c (arm_delete_process): New.
1122 (struct linux_target_ops): Add delete_process callback.
1123 * linux-bfin-low.c (struct linux_target_ops): Likewise.
1124 * linux-crisv32-low.c (struct linux_target_ops): Likewise.
1125 * linux-m32r-low.c (struct linux_target_ops): Likewise.
1126 * linux-mips-low.c (mips_linux_delete_process): New.
1127 (struct linux_target_ops): Add delete_process callback.
1128 * linux-ppc-low.c (struct linux_target_ops): Likewise.
1129 * linux-s390-low.c (struct linux_target_ops): Likewise.
1130 * linux-sh-low.c (struct linux_target_ops): Likewise.
1131 * linux-tic6x-low.c (struct linux_target_ops): Likewise.
1132 * linux-tile-low.c (struct linux_target_ops): Likewise.
1133 * linux-x86-low.c (x86_linux_delete_process): New.
1134 (struct linux_target_ops): Add delete_process callback.
1135 * linux-xtensa-low.c (struct linux_target_ops): Likewise.
1136
466eecee
SM
11372017-10-12 Simon Marchi <simon.marchi@ericsson.com>
1138
1139 * linux-aarch64-low.c (the_low_target): Add thread delete
1140 callback.
1141 * linux-arm-low.c (arm_delete_thread): New function.
1142 (the_low_target): Add thread delete callback.
1143 * linux-bfin-low.c (the_low_target): Likewise.
1144 * linux-crisv32-low.c (the_low_target): Likewise.
1145 * linux-low.c (delete_lwp): Invoke delete_thread callback if
1146 set.
1147 * linux-low.h (struct linux_target_ops) <delete_thread>: New
1148 field.
1149 * linux-m32r-low.c (the_low_target): Add thread delete callback.
1150 * linux-mips-low.c (mips_linux_delete_thread): New function.
1151 (the_low_target): Add thread delete callback.
1152 * linux-ppc-low.c (the_low_target): Likewise.
1153 * linux-s390-low.c (the_low_target): Likewise.
1154 * linux-sh-low.c (the_low_target): Likewise.
1155 * linux-tic6x-low.c (the_low_target): Likewise.
1156 * linux-tile-low.c (the_low_target): Likewise.
1157 * linux-x86-low.c (the_low_target): Likewise.
1158 * linux-xtensa-low.c (the_low_target): Likewise.
1159
b79f7801
YZ
11602017-10-06 Yuanhui Zhang <asmwarrior@gmail.com>
1161
1162 * win32-low.c: Include "common-inferior.h".
1163
bc3b087d
SDJ
11642017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
1165
1166 * inferiors.c (set_inferior_cwd): New function.
1167 * server.c (handle_general_set): Handle QSetWorkingDir packet.
1168 (handle_query): Inform that QSetWorkingDir is supported.
1169 * win32-low.c (create_process): Pass the inferior's cwd to
1170 CreateProcess.
1171
d092c5a2
SDJ
11722017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
1173
1174 * inferiors.c (current_inferior_cwd): New global variable.
1175 (get_inferior_cwd): New function.
1176 * inferiors.h (struct process_info) <cwd>: New field.
1177
7da0a886
SDJ
11782017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
1179
1180 * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
1181 (OBS): Add gdb_tilde_expand.o.
1182
289a6840
SM
11832017-10-02 Simon Marchi <simon.marchi@ericsson.com>
1184
1185 * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
1186 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
1187
256642e8
PA
11882017-09-29 Pedro Alves <palves@redhat.com>
1189
1190 * ax.c (gdb_parse_agent_expr): Constify.
1191 * ax.h (gdb_parse_agent_expr): Constify.
1192 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
1193 Constify.
1194 * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
1195 * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
1196 * remote-utils.h (read_ptid): Constify.
1197 * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
1198 (process_point_options, process_serial_event): Constify.
1199 * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
1200 (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
1201 (cmd_qtbuffer): Constify.
1202
5b9ca4d4
PA
12032017-09-29 Pedro Alves <palves@redhat.com>
1204
1205 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
1206 fails.
1207
94c207e0
PA
12082017-09-29 Pedro Alves <palves@redhat.com>
1209
1210 * linux-low.c (handle_extended_wait): Pass parent thread instead
1211 of process to thread_db_notice_clone.
1212 * linux-low.h (thread_db_notice_clone): Replace parent process
1213 parameter with parent thread parameter.
1214 * thread-db.c (find_one_thread): Add comment.
1215 (thread_db_notice_clone): Replace parent process parameter with
1216 parent thread parameter. Temporarily switch to the parent thread.
1217
75352e28
SDJ
12182017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
1219
1220 * gdbthread.h: Include "common-gdbthread.h".
1221 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
1222 "if" when validating the ptid.
1223 * remote-utils.c: Include "gdbthread.h".
1224 (prepare_resume_reply): Use "switch_to_thread".
1225 * target.c (done_accessing_memory): Likewise.
1226
ad339634
AA
12272017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
1228
1229 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
1230 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
1231 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
1232 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
1233 s390x-gs-linux64-ipa.o to ipa_obj.
1234 * linux-s390-low.c (HWCAP_S390_GS): New define.
1235 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
1236 New functions.
1237 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
1238 (s390_arch_setup): Check for guarded-storage support and choose
1239 appropriate tdesc.
1240 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
1241 init_registers_s390x_gs_linux64.
1242 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
1243 enum value.
1244 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
1245 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
1246
cc4d742f
SM
12472017-09-22 Simon Marchi <simon.marchi@ericsson.com>
1248
1249 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
1250
f6327dcb
KB
12512017-09-21 Kevin Buettner <kevinb@redhat.com>
1252
1253 * linux-low.h (struct lwp_info): Add new field, thread_handle.
1254 (thread_db_thread_handle): Declare.
1255 * linux-low.c (linux_target_ops): Initialize thread_handle.
1256 * server.c (handle_qxfer_threads_worker): Add support for
1257 "handle" attribute.
1258 * target.h (struct target_ops): Add new function pointer,
1259 thread_handle.
1260 (target_thread_handle): Define.
1261 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
1262 field in lwp.
1263 (thread_db_thread_handle): New function.
1264
86299109
KB
12652017-09-21 Kevin Buettner <kevinb@redhat.com>
1266
1267 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
1268 * linux-low.h (thread_db_notice_clone): Declare.
1269 * thread-db.c (thread_db_notice_clone): New function.
1270
f557a88a
PA
12712017-09-21 Pedro Alves <palves@redhat.com>
1272
1273 * server.c (gdb_read_memory, handle_status, process_serial_event)
1274 (handle_serial_event, handle_target_event): Adjust to
1275 set_desired_thread prototype change.
1276 * target.c (set_desired_thread): Remove 'use_general' parameter
1277 and adjust.
1278 * target.h (set_desired_thread): Remove 'use_general' parameter.
1279
223ffa71
TT
12802017-09-20 Tom Tromey <tom@tromey.com>
1281
1282 * target.c (target_terminal::terminal_state): Define.
1283 (target_terminal::init): Rename from target_terminal_init.
1284 (target_terminal::inferior): Rename from
1285 target_terminal_inferior.
1286 (target_terminal::ours): Rename from target_terminal_ours.
1287 (target_terminal::ours_for_output, target_terminal::info): New.
1288
04fd3ba9
SM
12892017-09-16 Simon Marchi <simon.marchi@ericsson.com>
1290
1291 * server.c (accumulate_file_name_length): Remove.
1292 (emit_dll_description): Adjust to std::string change.
1293 (handle_qxfer_libraries): Use std::string to hold document.
1294
5e187554
SM
12952017-09-16 Simon Marchi <simon.marchi@ericsson.com>
1296
1297 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
1298 return type of xml_escape_text.
1299 * server.c (emit_dll_description): Likewise.
1300
1526853e
SM
13012017-09-16 Simon Marchi <simon.marchi@ericsson.com>
1302
1303 * server.c (captured_main): Accept argument for --selftest.
1304 Update run_tests call.
1305 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
1306 when registering selftests.
1307
c4dfafab
SDJ
13082017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
1309
1310 * regcache.c (get_thread_regcache): Update code to use "std::vector"
1311 instead of "VEC" for "target_desc.reg_defs".
1312 (regcache_cpy): Likewise.
1313 (registers_to_string): Likewise.
1314 (registers_from_string): Likewise.
1315 (find_regno): Likewise.
1316 (supply_regblock): Likewise.
1317 (regcache_raw_read_unsigned): Likewise.
1318 * tdesc.c (init_target_desc): Likewise.
1319 (tdesc_create_reg): Likewise.
1320 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
1321 (struct target_desc) <reg_defs>: Convert to "std::vector".
1322 (target_desc): Do not initialize "reg_defs".
1323 (~target_desc): Update code to use "std::vector" instead of "VEC"
1324 for "target_desc.reg_defs".
1325 (operator==): Likewise.
1326
124aceb4
SM
13272017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1328
1329 * inferiors.h (thread_to_gdb_id): Remove.
1330 * inferiors.c (thread_to_gdb_id): Remove.
1331 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
1332 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
1333 lynx_store_registers, lynx_read_memory, lynx_write_memory):
1334 Likewise.
1335 * nto-low.c (nto_fetch_registers, nto_store_registers,
1336 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
1337
96cde54f
SM
13382017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1339
1340 * inferiors.h (gdb_id_to_thread_id): Remove.
1341 * inferiors.c (gdb_id_to_thread_id): Remove.
1342 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
1343 removal. Move pid declaration closer to where it's used.
1344
e8ca139e
SM
13452017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1346
1347 * server.c (handle_detach): New function.
1348 (process_serial_event): Move code out, call handle_detach.
1349
f8a4e119
SM
13502017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1351
1352 * server.c (require_running): Rename to ...
1353 (require_running_or_return): ... this ...
1354 (require_running_or_break): ... and this.
1355 (handle_query, process_serial_event): Adjust.
1356
0eb0a407
SM
13572017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1358
1359 * linux-low.c (linux_set_resume_request): Remove unused
1360 variables.
1361
785922a5
SM
13622017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1363
1364 * server.c (first_thread_of): Remove.
1365 (process_serial_event): Replace usage of first_thread_of with
1366 find_any_thread_of_pid.
1367 * tracepoint.c (same_process_p): Remove.
1368 (gdb_agent_about_to_close): Replace usage of same_process_p with
1369 find_any_thread_of_pid.
1370 * linux-x86-low.c (same_process_callback): Remove.
1371 (x86_arch_setup_process_callback): Replace usage of
1372 same_process_callback with find_any_thread_of_pid.
1373 * thread-db.c (any_thread_of): Remove.
1374 (switch_to_process): Replace usage of any_thread_of with
1375 find_any_thread_of_pid.
1376 * inferiors.c (thread_pid_matches_callback): Remove.
1377 (find_thread_process): Adjust to use find_any_thread_of_pid.
1378
a059f00c
SDJ
13792017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
1380
1381 * regcache.c (get_thread_regcache): Guard calls to "memset"
1382 with "!VEC_empty".
1383
cc397f3a
SDJ
13842017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
1385
1386 * linux-low.c (handle_extended_wait): Use
1387 "allocate_target_description" instead of "XNEW".
1388 * linux-x86-low.c (initialize_low_arch): Likewise.
1389
22916b07
YQ
13902017-09-05 Yao Qi <yao.qi@linaro.org>
1391
1392 * configure.srv (srv_i386_regobj): Remove.
1393 (srv_amd64_regobj): Remove.
1394 (srv_regobj): Set it to "" for x86 non-linux targets.
1395 * linux-x86-tdesc.c (i386_linux_read_description):
1396 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
1397 (init_registers_i386): Remove the declaration.
1398 (tdesc_i386): Remove the declaration.
1399 (lynx_i386_arch_setup): Call i386_create_target_description.
1400 * nto-x86-low.c: Likewise.
1401 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
1402 [!__x86_64__]: include arch/i386.h.
1403 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
1404
38602d55
YQ
14052017-09-05 Yao Qi <yao.qi@linaro.org>
1406
1407 * configure.srv (srv_amd64_linux_xmlfiles): Remove
1408 i386/amd64-XXX-linux from it.
1409
44b886ff
YQ
14102017-09-05 Yao Qi <yao.qi@linaro.org>
1411
1412 * configure.srv: Empty srv_amd64_linux_regobj if $development is
1413 false.
1414 (ipa_amd64_linux_regobj): Remove.
1415 (ipa_x32_linux_regobj): Remove.
1416
b4570e4b
YQ
14172017-09-05 Yao Qi <yao.qi@linaro.org>
1418
1419 * Makefile.in (arch-amd64.o): New rule.
1420 * configure.srv: Append arch-amd64.o.
1421 * linux-amd64-ipa.c: Include common/x86-xstate.h.
1422 (get_ipa_tdesc): Call amd64_linux_read_description.
1423 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
1424 and init_registers_amd64_XXX.
1425 * linux-x86-low.c (x86_linux_read_description): Call
1426 amd64_linux_read_description.
1427 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
1428 (initialize_low_arch): Don't call init_registers_x32_XXX and
1429 init_registers_amd64_XXX.
1430 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
1431 and tdesc_amd64_XXX.
1432 [__x86_64__] (amd64_tdesc_test): New function.
1433 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
1434 and init_registers_amd64_XXX.
1435 * linux-x86-tdesc.c: Include arch/amd64.h.
1436 (xcr0_to_tdesc_idx): New function.
1437 (i386_linux_read_description): New function.
1438 (amd64_get_ipa_tdesc_idx): New function.
1439 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
1440 (amd64_get_ipa_tdesc): Declare.
1441
d1f28ea2
YQ
14422017-09-05 Yao Qi <yao.qi@linaro.org>
1443
1444 * configure.srv (srv_i386_linux_xmlfiles): Remove
1445 i386/i386-XXX-linux.xml from it.
1446
25a93583
YQ
14472017-09-05 Yao Qi <yao.qi@linaro.org>
1448
1449 * configure.srv: Set srv_i386_linux_regobj empty if $development
1450 is false.
1451 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
1452 initialize_low_tdesc.
1453 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
1454 with #if initialize_low_tdesc.
1455 * linux-x86-tdesc-selftest.c: New file.
1456 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
1457
5f035c07
YQ
14582017-09-05 Yao Qi <yao.qi@linaro.org>
1459
1460 * Makefile.in (arch-i386.o): New rule.
1461 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
1462 (x86_64-*-linux*): Likewise.
1463 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
1464 include arch/i386.h.
1465 (i386_linux_read_description): Remove code and call
1466 i386_create_target_description.
1467 * tdesc.c (allocate_target_description): New function.
1468 * tdesc.h (set_tdesc_architecture): Remove declaration.
1469 (set_tdesc_osabi): Likewise.
1470
0abe8a89
YQ
14712017-09-05 Yao Qi <yao.qi@linaro.org>
1472
1473 * linux-x86-tdesc.c: Don't include <inttypes.h>.
1474 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
1475 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
1476 .xmltarget.
1477 * server.c (get_features_xml): Call tdesc_get_features_xml.
1478 * tdesc.c (set_tdesc_architecture): New function.
1479 (set_tdesc_osabi): New function.
1480 (tdesc_get_features_xml): New function.
1481 (tdesc_create_feature): Add an argument.
1482 * tdesc.h (struct target_desc) <features>: New field.
1483 <arch, osabi>: New field.
1484 (~target_desc): xfree features, arch, and osabi.
1485 (target_desc::oerator==): Don't compare .xmltarget.
1486 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
1487 (set_tdesc_osabi): Likewise.
1488 (tdesc_get_features_xml): Likewise.
1489
0a188386
YQ
14902017-09-05 Yao Qi <yao.qi@linaro.org>
1491
1492 * linux-x86-tdesc.c: Include selftest.h.
1493 (i386_tdesc_test): New function.
1494 (initialize_low_tdesc): Call selftests::register_test.
1495 * tdesc.h: Include regdef.h.
1496 (target_desc): Override operator == and !=.
1497
f49ff000
YQ
14982017-09-05 Yao Qi <yao.qi@linaro.org>
1499
1500 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
1501 (ipa_obj): Likewise.
1502 * linux-i386-ipa.c: Include common/x86-xstate.h
1503 (get_ipa_tdesc): Call i386_linux_read_description.
1504 (initialize_low_tracepoint): Don't call init_registers_XXX
1505 functions, call initialize_low_tdesc instead.
1506 * linux-x86-low.c (x86_linux_read_description): Call
1507 i386_linux_read_description.
1508 (initialize_low_arch): Don't call init_registers_i386_XXX
1509 functions, call initialize_low_tdesc.
1510 * linux-x86-tdesc.c: New file.
1511 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
1512 (i386_get_ipa_tdesc_idx): Declare.
1513 (i386_get_ipa_tdesc): Declare.
1514 (initialize_low_tdesc): Declare.
1515
2b68ef2f
YQ
15162017-09-05 Yao Qi <yao.qi@linaro.org>
1517
1518 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
1519 instead of 0.
1520
f7000548
YQ
15212017-09-05 Yao Qi <yao.qi@linaro.org>
1522
1523 * Makefile.in (IPA_OBJS): Add vec-ipa.o
1524 * regcache.c (get_thread_regcache): Use VEC_length.
1525 (init_register_cache): Likewise.
1526 (regcache_cpy): Likewise.
1527 (registers_to_string): Iterate reg_defs via VEC_iterate.
1528 (find_regno): Likewise.
1529 (find_register_by_number): Use VEC_index.
1530 (register_size): Call find_register_by_number.
1531 (register_data): Call find_register_by_number.
1532 (supply_regblock): Use VEC_length.
1533 (regcache_raw_read_unsigned): Likewise.
1534 * tdesc.c (init_target_desc): Iterate reg_defs via
1535 VEC_iterate.
1536 (default_description): Update initializer.
1537 (copy_target_description): Don't update field num_registers.
1538 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
1539 <num_registers>: Remove.
1540
50a421ac
SM
15412017-09-04 Simon Marchi <simon.marchi@ericsson.com>
1542
1543 * Makefile.in (.SECONDARY): Define target.
1544
23fdd69e
SM
15452017-09-03 Simon Marchi <simon.marchi@ericsson.com>
1546
1547 * linux-low.c (linux_wait_1): Adjust.
1548 * server.c (queue_stop_reply_callback): Adjust.
1549
0a2dde4a
SDJ
15502017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
1551
1552 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
1553 QEnvironmentUnset and QEnvironmentReset packets.
1554 (handle_query): Inform remote that QEnvironmentHexEncoded,
1555 QEnvironmentUnset and QEnvironmentReset are supported.
1556
6afd337d
SM
15572017-08-25 Simon Marchi <simon.marchi@ericsson.com>
1558
1559 * inferiors.h (inferior_target_data): Rename to ...
1560 (thread_target_data): ... this.
1561 (inferior_regcache_data): Rename to ...
1562 (thread_regcache_data): ... this.
1563 (set_inferior_regcache_data): Rename to ...
1564 (set_thread_regcache_data): ... this.
1565 * inferiors.c (inferior_target_data): Rename to ...
1566 (thread_target_data): ... this.
1567 (inferior_regcache_data): Rename to ...
1568 (thread_regcache_data): ... this.
1569 (set_inferior_regcache_data): Rename to ...
1570 (set_thread_regcache_data): ... this.
1571 (free_one_thread): Update.
1572 * linux-low.h (get_thread_lwp): Update.
1573 * regcache.c (get_thread_regcache): Update.
1574 (regcache_invalidate_thread): Update.
1575 (free_register_cache_thread): Update.
1576 * win32-i386-low.c (update_debug_registers_callback): Update.
1577 (win32_get_current_dr): Update.
1578 * win32-low.c (thread_rec): Update.
1579 (delete_thread_info): Update.
1580 (continue_one_thread): Update.
1581 (suspend_one_thread): Update.
1582
a160cc46
SM
15832017-08-24 Simon Marchi <simon.marchi@ericsson.com>
1584
1585 * inferiors.c (set_inferior_target_data): Remove.
1586 * inferiors.h (set_inferior_target_data): Remove.
1587
6d580b63
YQ
15882017-08-18 Yao Qi <yao.qi@linaro.org>
1589
1590 * Makefile.in (OBS): Add selftest.o.
1591 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
1592 * configure, config.in: Re-generated.
1593 * server.c: Include common/sefltest.h.
1594 (captured_main): Handle option --selftest.
1595
f5a29eb0
YQ
15962017-08-09 Yao Qi <yao.qi@linaro.org>
1597
1598 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
1599 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
1600 i386-avx-mpx.o and i386-mmx.o.
1601 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
1602 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
1603 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
1604 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
1605 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
1606 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
1607 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
1608 i386/amd64-avx-mpx.xml.
1609
57757c2f
YQ
16102017-08-09 Yao Qi <yao.qi@linaro.org>
1611
1612 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
1613 and x32-avx-avx512.o.
1614 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
1615 i386/x32-avx-avx512.xml.
1616
229d26fc
SM
16172017-07-26 Simon Marchi <simon.marchi@ericsson.com>
1618
1619 * tracepoint.h (enum class fast_tpoint_collect_result): New
1620 enumeration.
1621 (fast_tracepoint_collecting): Change return type to
1622 fast_tpoint_collect_result.
1623 * tracepoint.c (fast_tracepoint_collecting): Likewise.
1624 * linux-low.h: Include tracepoint.h.
1625 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
1626 fast_tpoint_collect_result.
1627 * linux-low.c (handle_tracepoints): Adjust.
1628 (linux_fast_tracepoint_collecting): Change return type to
1629 fast_tpoint_collect_result.
1630 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
1631 linux_wait_1, stuck_in_jump_pad_callback,
1632 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
1633 proceed_one_lwp): Adjust to type change.
1634
2e1e43e1
YQ
16352017-07-10 Yao Qi <yao.qi@linaro.org>
1636
1637 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
1638
adc764e7
YQ
16392017-06-29 Yao Qi <yao.qi@linaro.org>
1640
1641 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
1642 Remove.
1643 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
1644
a206891a
SM
16452017-06-20 Simon Marchi <simon.marchi@ericsson.com>
1646
1647 * Makefile.in (IPA_OBJS): Sort and format one item per line.
1648
9a6c7d9c
SDJ
16492017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
1650
1651 * linux-low.c (linux_create_inferior): Adjust code to access the
1652 environment information via 'gdb_environ' class.
1653 * lynx-low.c (lynx_create_inferior): Likewise.
1654 * server.c (our_environ): Make it an instance of 'gdb_environ'.
1655 (get_environ): Return a pointer to 'our_environ'.
1656 (captured_main): Initialize 'our_environ'.
1657 * server.h (get_environ): Adjust prototype.
1658 * spu-low.c (spu_create_inferior): Adjust code to access the
1659 environment information via 'gdb_environ' class.
1660
ae3e2ccf
SM
16612017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1662
1663 * linux-low.c (linux_read_memory, linux_write_memory): Remove
1664 usage of "register" keyword.
1665
3e019bdc
SM
16662017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1667
1668 * configure: Re-generate.
1669
8465943a
SM
16702017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1671
1672 * configure: Re-generate.
1673
cf0dd6f0
SM
16742017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1675
1676 * Makefile.in (COMPILE.pre): Add "-x c++".
1677
9845682b
SDJ
16782017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
1679
1680 * fork-child.c: Conditionally include <signal.h>.
1681
aefd8b33
SDJ
16822017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1683
1684 * server.c (handle_general_set): Handle new packet
1685 "QStartupWithShell".
1686 (handle_query): Add "QStartupWithShell" to the list of supported
1687 packets.
1688 (gdbserver_usage): Add help text explaining the
1689 new "--startup-with-shell" and "--no-startup-with-shell" CLI
1690 options.
1691 (captured_main): Recognize and act upon the presence of the new
1692 CLI options.
1693
2090129c
SDJ
16942017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1695 Pedro Alves <palves@redhat.com>
1696
1697 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
1698 * configure: Regenerate.
1699 * configure.srv (srv_linux_obj): Add "fork-child.o" and
1700 "fork-inferior.o".
1701 (i[34567]86-*-lynxos*): Likewise.
1702 (spu*-*-*): Likewise.
1703 * fork-child.c: New file.
1704 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
1705 and "environ.h".
1706 (linux_ptrace_fun): New function.
1707 (linux_create_inferior): Adjust function prototype to reflect
1708 change on "target.h". Adjust function code to use
1709 "fork_inferior".
1710 (linux_request_interrupt): Delete "signal_pid".
1711 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
1712 (lynx_ptrace_fun): New function.
1713 (lynx_create_inferior): Adjust function prototype to reflect
1714 change on "target.h". Adjust function code to use
1715 "fork_inferior".
1716 * nto-low.c (nto_create_inferior): Adjust function prototype and
1717 code to reflect change on "target.h". Update comments.
1718 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
1719 "common-terminal.h" and "environ.h".
1720 (terminal_fd): Moved to fork-child.c.
1721 (old_foreground_pgrp): Likewise.
1722 (restore_old_foreground_pgrp): Likewise.
1723 (last_status): Make it global.
1724 (last_ptid): Likewise.
1725 (our_environ): New variable.
1726 (startup_with_shell): Likewise.
1727 (program_name): Likewise.
1728 (program_argv): Rename to...
1729 (program_args): ...this.
1730 (wrapper_argv): New variable.
1731 (start_inferior): Delete function.
1732 (get_exec_wrapper): New function.
1733 (get_exec_file): Likewise.
1734 (get_environ): Likewise.
1735 (prefork_hook): Likewise.
1736 (post_fork_inferior): Likewise.
1737 (postfork_hook): Likewise.
1738 (postfork_child_hook): Likewise.
1739 (handle_v_run): Update code to deal with arguments coming from the
1740 remote host. Update calls from "start_inferior" to
1741 "create_inferior".
1742 (captured_main): Likewise. Initialize environment variable. Call
1743 "have_job_control".
1744 * server.h (post_fork_inferior): New prototype.
1745 (get_environ): Likewise.
1746 (last_status): Declare.
1747 (last_ptid): Likewise.
1748 (signal_pid): Likewise.
1749 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
1750 (spu_ptrace_fun): New function.
1751 (spu_create_inferior): Adjust function prototype to reflect change
1752 on "target.h". Adjust function code to use "fork_inferior".
1753 * target.c (target_terminal_init): New function.
1754 (target_terminal_inferior): Likewise.
1755 (target_terminal_ours): Likewise.
1756 * target.h: Include <vector>.
1757 (struct target_ops) <create_inferior>: Update prototype.
1758 (create_inferior): Update macro.
1759 * utils.c (gdb_flush_out_err): New function.
1760 * win32-low.c (win32_create_inferior): Adjust function prototype
1761 and code to reflect change on "target.h".
1762
043a4934
SDJ
17632017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1764
1765 * inferiors.c (switch_to_thread): New function.
1766
15652511
SDJ
17672017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1768
1769 * Makefile.in (SFILE): Add "common/job-control.c".
1770 (OBS): Add "job-control.o".
1771
21ea5acd
SDJ
17722017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
1773
1774 * Makefile: Remove "@host_makefile_frag@".
1775
e13cb306
PA
17762017-05-05 Pedro Alves <palves@redhat.com>
1777
1778 * configure: Regenerate.
1779
c94fee56
SDJ
17802017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
1781
1782 * configure: Regenerate.
1783
a0ff9e1a
SM
17842017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
1785
1786 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
1787 software_single_step change of return type to
1788 std::vector<CORE_ADDR>.
1789 * linux-low.c (install_software_single_step_breakpoints):
1790 Likewise.
1791 * linux-low.h (install_software_single_step_breakpoints):
1792 Likewise.
1793
be628ab8
SDJ
17942017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
1795
1796 * remote-utils.c: Include "gdb_termios.h" instead of
1797 "terminal.h".
1798 * terminal.h: Delete file.
1799
7c5ded6a
SDJ
18002017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
1801
1802 * server.c: Include <vector>.
1803 <program_argv, wrapper_argv>: Convert to std::vector.
1804 (start_inferior): Rewrite function to use C++.
1805 (handle_v_run): Likewise. Update code that calculates the argv
1806 based on the vRun packet; use C++.
1807 (captured_main): Likewise.
1808
436252de
SM
18092017-04-06 Simon Marchi <simon.marchi@ericsson.com>
1810
1811 * server.c (handle_v_cont): Initialize thread_resume::thread
1812 with null_ptid.
1813
9bf2a700
PA
18142017-04-05 Pedro Alves <palves@redhat.com>
1815
1816 * configure: Regenerate.
1817
a121b7c1
PA
18182017-04-05 Pedro Alves <palves@redhat.com>
1819
1820 * gdbreplay.c (sync_error): Constify.
1821 * linux-x86-low.c (push_opcode): Constify.
1822
21c8a587
PA
18232017-04-05 Pedro Alves <palves@redhat.com>
1824
1825 * win32-low.c (get_child_debug_event)
1826 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
1827 Report TARGET_WAITKIND_SPURIOUS instead.
1828
fb32b4f7
PA
18292017-04-05 Pedro Alves <palves@redhat.com>
1830
1831 * remote-utils.c (remote_prepare, remote_open): Constify.
1832 * remote-utils.h (remote_prepare, remote_open): Constify.
1833 * server.c (captured_main): Constify 'port' handling.
1834
65dd1e59
SM
18352017-04-04 Simon Marchi <simon.marchi@ericsson.com>
1836
1837 * Makefile.in (clean): Clear .deps.
1838
8fa5b777
SM
18392017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
1840
1841 * .gitignore: Remove generated files, replace with wildcard.
1842 * (clean): Replace removal of generated files with wildcard.
1843 (version.c): Replace with...
1844 (version-generated.c): ...this.
1845 (xml-builtin.c): Replace with...
1846 (xml-builtin-generated.c): ...this.
1847 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
1848 (%.c: *regformats*): Replace with...
1849 (%-generated.c: *regformats*): ...this.
1850
a12e714b
MF
18512017-03-27 Max Filippov <jcmvbkbc@gmail.com>
1852
1853 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
1854 (xtensa_fill_gregset): Call collect_register_by_name for
1855 threadptr register.
1856 (xtensa_store_gregset): Call supply_register_by_name for
1857 threadptr register.
1858
1a09b50a
MF
18592017-03-27 Max Filippov <jcmvbkbc@gmail.com>
1860
1861 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
1862 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
1863 (xtensa_store_gregset): Call supply_register for all registers in
1864 a0_regnum..a0_regnum + C0_NREGS range.
1865
1a01e7c6
SM
18662017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1867
1868 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
1869 (ax-ipa.o: ax.c): Remove.
1870 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
1871 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
1872 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
1873 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
1874 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
1875
36bc18a8
SM
18762017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1877
1878 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
1879 (print-utils-ipa.o: ../common/print-utils.c): Remove.
1880 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
1881 (errors-ipa.o: ../common/errors.c): Remove.
1882 (format-ipa.o: ../common/format.c): Remove.
1883 (common-utils-ipa.o: ../common/common-utils.c): Remove.
1884
a8ebe3d5
SM
18852017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1886
1887 * Makefile.in (%-ipa.o: %.c): New rule.
1888 (tracepoint-ipa.o: tracepoint.c): Remove.
1889 (utils-ipa.o: utils.c): Remove.
1890 (remote-utils-ipa.o: remote-utils.c): Remove.
1891 (regcache-ipa.o: regcache.c): Remove.
1892 (i386-linux-ipa.o: i386-linux.c): Remove.
1893 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
1894 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
1895 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
1896 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
1897 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
1898 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
1899 (amd64-linux-ipa.o: amd64-linux.c): Remove.
1900 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
1901 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
1902 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
1903 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
1904 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
1905 (aarch64-ipa.o: aarch64.c): Remove.
1906 (s390-linux32-ipa.o: s390-linux32.c): Remove.
1907 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
1908 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
1909 (s390-linux64-ipa.o: s390-linux64.c): Remove.
1910 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
1911 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
1912 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
1913 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
1914 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
1915 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
1916 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
1917 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
1918 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
1919 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
1920 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
1921 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
1922 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
1923 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
1924 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
1925 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
1926 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
1927 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
1928 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
1929 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
1930 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
1931 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
1932 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
1933 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
1934 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
1935 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
1936 (tdesc-ipa.o: tdesc.c): Remove.
1937 (x32-linux-ipa.o: x32-linux.c): Remove.
1938 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
1939 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
1940
50cfacb7
SM
19412017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1942
1943 * Makefile.in (%.o: ../arch/%.c): New rule.
1944 (arm.o: ../arch/arm.c): Remove.
1945 (arm-linux.o: ../arch/arm-linux.c): Remove.
1946 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
1947 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
1948
c5a22423
SM
19492017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1950
1951 * Makefile.in (%.o: ../nat/%.c): New rule.
1952 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
1953 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
1954 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
1955 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
1956 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
1957 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
1958 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
1959 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
1960 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
1961 (linux-personality.o: ../nat/linux-personality.c): Remove.
1962 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
1963 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
1964 (x86-linux.o: ../nat/x86-linux.c): Remove.
1965 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
1966 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
1967
6bda016b
SM
19682017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1969
1970 * Makefile.in (%.o: ../common/%.c): New rule.
1971 (signals.o: ../common/signals.c): Remove.
1972 (print-utils.o: ../common/print-utils.c): Remove.
1973 (rsp-low.o: ../common/rsp-low.c): Remove.
1974 (common-utils.o: ../common/common-utils.c): Remove.
1975 (posix-strerror.o: ../common/posix-strerror.c): Remove.
1976 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
1977 (vec.o: ../common/vec.c): Remove.
1978 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
1979 (xml-utils.o: ../common/xml-utils.c): Remove.
1980 (ptid.o: ../common/ptid.c): Remove.
1981 (buffer.o: ../common/buffer.c): Remove.
1982 (format.o: ../common/format.c): Remove.
1983 (filestuff.o: ../common/filestuff.c): Remove.
1984 (agent.o: ../common/agent.c): Remove.
1985 (errors.o: ../common/errors.c): Remove.
1986 (environ.o: ../common/environ.c): Remove.
1987 (common-debug.o: ../common/common-debug.c): Remove.
1988 (cleanups.o: ../common/cleanups.c): Remove.
1989 (common-exceptions.o: ../common/common-exceptions.c): Remove.
1990 (fileio.o: ../common/fileio.c): Remove.
1991 (common-regcache.o: ../common/common-regcache.c): Remove.
1992 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
1993 (new-op.o: ../common/new-op.c): Remove.
1994 (btrace-common.o: ../common/btrace-common.c): Remove.
1995
21122961
SM
19962017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1997
1998 * Makefile.in (%.o: ../target/%.c): New rule.
1999 (waitstatus.o: ../target/waitstatus.c): Remove.
2000
c362e621
SM
20012017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2002
2003 * Makefile.in
2004 (%.c: ../regformats/%.dat,
2005 (%.c: ../regformats/arm/%.dat,
2006 (%.c: ../regformats/i386/%.dat,
2007 (%.c: ../regformats/rs6000/%.dat): New rules.
2008 (aarch64.c): Remove.
2009 (reg-arm.c): Remove.
2010 (arm-with-iwmmxt.c): Remove.
2011 (arm-with-vfpv2.c): Remove.
2012 (arm-with-vfpv3.c): Remove.
2013 (arm-with-neon.c): Remove.
2014 (reg-bfin.c): Remove.
2015 (reg-cris.c): Remove.
2016 (reg-crisv32.c): Remove.
2017 (i386.c): Remove.
2018 (i386-linux.c): Remove.
2019 (i386-avx.c): Remove.
2020 (i386-avx-linux.c): Remove.
2021 (i386-avx-avx512.c): Remove.
2022 (i386-avx-avx512-linux.c): Remove.
2023 (i386-mpx.c): Remove.
2024 (i386-mpx-linux.c): Remove.
2025 (i386-avx-mpx-avx512-pku.c): Remove.
2026 (i386-avx-mpx-avx512-pku-linux.c): Remove.
2027 (i386-avx-mpx.c): Remove.
2028 (i386-avx-mpx-linux.c): Remove.
2029 (i386-mmx.c): Remove.
2030 (i386-mmx-linux.c): Remove.
2031 (reg-ia64.c): Remove.
2032 (reg-m32r.c): Remove.
2033 (reg-m68k.c): Remove.
2034 (reg-cf.c): Remove.
2035 (mips-linux.c): Remove.
2036 (mips-dsp-linux.c): Remove.
2037 (mips64-linux.c): Remove.
2038 (mips64-dsp-linux.c): Remove.
2039 (nios2-linux.c): Remove.
2040 (powerpc-32.c): Remove.
2041 (powerpc-32l.c): Remove.
2042 (powerpc-altivec32l.c): Remove.
2043 (powerpc-cell32l.c): Remove.
2044 (powerpc-vsx32l.c): Remove.
2045 (powerpc-isa205-32l.c): Remove.
2046 (powerpc-isa205-altivec32l.c): Remove.
2047 (powerpc-isa205-vsx32l.c): Remove.
2048 (powerpc-e500l.c): Remove.
2049 (powerpc-64l.c): Remove.
2050 (powerpc-altivec64l.c): Remove.
2051 (powerpc-cell64l.c): Remove.
2052 (powerpc-vsx64l.c): Remove.
2053 (powerpc-isa205-64l.c): Remove.
2054 (powerpc-isa205-altivec64l.c): Remove.
2055 (powerpc-isa205-vsx64l.c): Remove.
2056 (s390-linux32.c): Remove.
2057 (s390-linux32v1.c): Remove.
2058 (s390-linux32v2.c): Remove.
2059 (s390-linux64.c): Remove.
2060 (s390-linux64v1.c): Remove.
2061 (s390-linux64v2.c): Remove.
2062 (s390-te-linux64.c): Remove.
2063 (s390-vx-linux64.c): Remove.
2064 (s390-tevx-linux64.c): Remove.
2065 (s390x-linux64.c): Remove.
2066 (s390x-linux64v1.c): Remove.
2067 (s390x-linux64v2.c): Remove.
2068 (s390x-te-linux64.c): Remove.
2069 (s390x-vx-linux64.c): Remove.
2070 (s390x-tevx-linux64.c): Remove.
2071 (tic6x-c64xp-linux.c): Remove.
2072 (tic6x-c64x-linux.c): Remove.
2073 (tic6x-c62x-linux.c): Remove.
2074 (reg-sh.c): Remove.
2075 (reg-sparc64.c): Remove.
2076 (reg-spu.c): Remove.
2077 (amd64.c): Remove.
2078 (amd64-linux.c): Remove.
2079 (amd64-avx.c): Remove.
2080 (amd64-avx-linux.c): Remove.
2081 (amd64-avx-avx512.c): Remove.
2082 (amd64-avx-avx512-linux.c): Remove.
2083 (amd64-mpx.c): Remove.
2084 (amd64-mpx-linux.c): Remove.
2085 (amd64-avx-mpx-avx512-pku.c): Remove.
2086 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
2087 (amd64-avx-mpx.c): Remove.
2088 (amd64-avx-mpx-linux.c): Remove.
2089 (x32.c): Remove.
2090 (x32-linux.c): Remove.
2091 (x32-avx.c): Remove.
2092 (x32-avx-linux.c): Remove.
2093 (x32-avx-avx512.c): Remove.
2094 (x32-avx-avx512-linux.c): Remove.
2095 (reg-xtensa.c): Remove.
2096 (reg-tilegx.c): Remove.
2097 (reg-tilegx32.c): Remove.
2098
1672e0d9
SDJ
20992017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
2100
2101 * Makefile.in (SFILES): Add "common/environ.c".
2102 (OBJS): Add "common/environ.h".
2103
239b6d10
WT
21042017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
2105
2106 * configure.ac: Check if the fs_base and gs_base members of
2107 `struct user_regs_struct' exist.
2108 * config.in: Regenerated.
2109 * configure: Likewise.
2110
694b382c
AT
21112017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
2112
2113 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
2114 target_read_memory.
2115 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
2116 (get_next_pcs_syscall_next_pc): Likewise.
2117
7dc53023
LM
21182016-12-23 Luis Machado <lgustavo@codesourcery.com>
2119
2120 * win32-i386-low.c: Fix incorrect reference to a couple source files.
2121 * nto-x86-low.c: Likewise.
2122
ad02e4fe
SM
21232016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
2124
2125 * Makefile.in: Include disable-implicit-rules.mk.
2126
dcb07cfa
PA
21272016-11-23 Pedro Alves <palves@redhat.com>
2128
2129 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
2130 (debug_vprintf): Use std::chrono::steady_clock instead of
2131 gettimeofday. Use '.' instead of ':'.
2132 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
2133 (get_timestamp): Use std::chrono::steady_clock instead of
2134 gettimeofday.
2135
8629c02c
SM
21362016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
2137
2138 * Makefile.in: Fix whitespace formatting.
2139
b593ecca
SM
21402016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
2141
2142 * Makefile.in (SFILES, OBS): Flatten list and order
2143 alphabetically.
2144
9986ba08
PA
21452016-11-23 Pedro Alves <palves@redhat.com>
2146
2147 * event-loop.c (handle_file_event): Use warning.
2148 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
2149 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
2150 Use warning.
2151
4eefa7bc
PA
21522016-11-23 Pedro Alves <palves@redhat.com>
2153
2154 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
2155 output.
2156 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
2157 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
2158 debug_printf and debug_flush for debug output.
2159 * server.c (handle_general_set): Likewise.
2160 * thread-db.c (try_thread_db_load): Use debug_printf for debug
2161 output.
2162
5443506e
SM
21632016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
2164
2165 * Makefile.in (.c.o): Replace rule with ...
2166 (%.o: %.c): ... this one.
2167
3b165252
SM
21682016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
2169
2170 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
2171 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
2172 make.
2173 * configure.ac: Remove checks for the make program.
2174 * configure: Re-generate.
2175
0bcda685
PA
21762016-10-28 Pedro Alves <palves@redhat.com>
2177
2178 * Makefile.in (CXX_DIALECT): Get from configure.
2179 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
2180 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
2181 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
2182 * config.in: Regenerate.
2183 * configure: Regenerate.
2184
c3805894
YQ
21852016-10-27 Yao Qi <yao.qi@linaro.org>
2186
2187 * linux-low.c (linux_supports_range_stepping): Return true if
2188 can_software_single_step return true.
2189
89342618
YQ
21902016-10-27 Yao Qi <yao.qi@linaro.org>
2191
2192 * inferiors.c (find_inferior_in_random): New function.
2193 * inferiors.h (find_inferior_in_random): Declare.
2194 * linux-low.c (linux_wait_for_event_filtered): Call
2195 find_inferior_in_random instead of find_inferior.
2196
e3652c84
YQ
21972016-10-27 Yao Qi <yao.qi@linaro.org>
2198
2199 * linux-low.c (linux_wait_1): If single-step breakpoints are
2200 inserted, remove them.
2201
5a04c4cf
PA
22022016-10-26 Pedro Alves <palves@redhat.com>
2203
2204 * linux-low.c (handle_extended_wait): Link parent/child fork
2205 threads.
2206 (linux_wait_1): Unlink them.
2207 (linux_set_resume_request): Ignore resume requests for
2208 already-resumed and unhandled fork child threads.
2209 * linux-low.h (struct lwp_info) <fork_relative>: New field.
2210 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
2211 New functions.
2212 (handle_v_requests) <vCont>: Don't call require_running.
2213 * server.h (in_queued_stop_replies): New declaration.
2214
cb93dc7f
YQ
22152016-10-24 Yao Qi <yao.qi@linaro.org>
2216
2217 PR server/20733
2218 * linux-aarch64-low.c (append_insns): Cast the return value to
2219 'uint32_t *'.
2220
a1078bea
YQ
22212016-10-10 Yao Qi <yao.qi@linaro.org>
2222
2223 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
2224
1fb77080
SDJ
22252016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
2226
2227 * target.c (target_supports_multi_process): New function, moved
2228 from...
2229 * target.h (target_supports_multi_process): ... here. Remove
2230 macro.
2231
39b5a3b9
TT
22322016-10-05 Tom Tromey <tom@tromey.com>
2233
2234 PR remote/20655:
2235 * tracepoint.c (handle_tracepoint_bkpts): Check
2236 ipa_error_tracepoint, not ipa_stopping_tracepoint.
2237
c1d0b70a
YQ
22382016-10-05 Yao Qi <yao.qi@linaro.org>
2239
2240 * configure.srv: Update the path of arm-*.xml files.
2241
0a69eedb
YQ
22422016-10-05 Terry Guo <terry.guo@arm.com>
2243 Yao Qi <yao.qi@linaro.org>
2244
2245 * Makefile.in: Adjust the path of rules.
2246 * configure.srv: Update the path of xml files.
2247 * regformats/arm-with-iwmmxt.dat: Regenerated.
2248 * regformats/arm-with-neon.dat: Likewise.
2249 * regformats/arm-with-vfpv2.dat: Likewise.
2250 * regformats/arm-with-vfpv3.dat Likewise.
2251
17e16485
YQ
22522016-09-30 Yao Qi <yao.qi@linaro.org>
2253
2254 PR gdbserver/20627
2255 * target.c (target_stop_and_wait): Don't call
2256 target_continue_no_signal, use resume_stop instead.
2257
edeeb602
YQ
22582016-09-26 Yao Qi <yao.qi@linaro.org>
2259
2260 * linux-low.c (linux_wait_1): Call debug_exit.
2261
503b1c39
PA
22622016-09-23 Pedro Alves <palves@redhat.com>
2263
2264 * Makefile.in (SFILES): Add common/new-op.c.
2265 (OBS): Add common/new-op.o.
2266 (new-op.o): New rule.
2267
74172ecf
SM
22682016-09-21 Simon Marchi <simon.marchi@ericsson.com>
2269
2270 * .gitinore: Ignore more files.
2271
fc6cda2e
YQ
22722016-09-21 Yao Qi <yao.qi@linaro.org>
2273
2274 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
2275 23.
2276
bc1e6c81
SDJ
22772016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
2278
2279 * server.c (start_inferior): Call target_mourn_inferior instead of
2280 mourn_inferior; pass ptid_t argument to it.
2281 (resume): Likewise.
2282 (handle_target_event): Likewise.
2283 * target.c (target_mourn_inferior): New function.
2284 * target.h (mourn_inferior): Delete macro.
2285
0e00e962
AA
22862016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
2287
2288 * linux-low.c (lwp_is_stepping): New function.
2289
1d8cb77d
CL
22902016-09-06 Carl Love <cel@us.ibm.com>
2291
2292 * server.c (start_inferior): Fixed comment, requested comment change
2293 didn't get updated correctly. Removed reference to ptrace () call as
2294 it is only true on Linux systems.
2295
7313bced
CL
22962016-09-06 Carl Love <cel@us.ibm.com>
2297
2298 * server.c (start_inferior): Do not call
2299 function target_post_create_inferior () if the
2300 inferior process has already exited.
2301
cf6de44d
PA
23022016-09-05 Pedro Alves <palves@redhat.com>
2303
2304 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
2305 (COMPILE.pre, CC_LD): Use CXX directly.
2306 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
2307 * acinclude.m4: Don't include build-with-cxx.m4.
2308 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
2309 * configure: Regenerate.
2310
c1da6748
AT
23112016-09-02 Akash Trehan <akash.trehan123@gmail.com>
2312
2313 PR gdb/19495
2314 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
2315 call writing data to own_buf.
2316
f2b9e3df
SDJ
23172016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
2318
2319 * target.c (mywait): Call target_wait instead of
2320 the_target->wait.
2321 (target_wait): New function.
2322
049a8570
SDJ
23232016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
2324
2325 * server.c (start_inferior): New variable 'ptid'. Replace calls
2326 to the_target->resume by target_continue{,_no_signal}, depending
2327 on the case.
2328 * target.c (target_stop_and_wait): Call target_continue_no_signal
2329 instead of the_target->resume.
2330 (target_continue): New function.
2331
3aa5cfa0
AT
23322016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
2333
2334 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
2335
754653a7
AZ
23362016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
2337
2338 PR server/20491
2339 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
2340 ps_prochandle.
2341 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
2342 * linux-arm-low.c (ps_get_thread_area): Likewise.
2343 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
2344 * linux-m68k-low.c (ps_get_thread_area): Likewise.
2345 * linux-mips-low.c (ps_get_thread_area): Likewise.
2346 * linux-nios2-low.c (ps_get_thread_area): Likewise.
2347 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
2348 * linux-x86-low.c (ps_get_thread_area): Likewise.
2349 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
2350
ed036b40
PA
23512016-08-19 Pedro Alves <palves@redhat.com>
2352
2353 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
2354
c8ef42ee
PA
23552016-08-19 Pedro Alves <palves@redhat.com>
2356
2357 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
2358 comment. Use memcpy instead of casting through unsigned long.
2359
9c235a72
PA
23602016-08-19 Pedro Alves <palves@redhat.com>
2361
2362 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
2363 allocating around 0x80000000.
2364
201506da
PA
23652016-08-19 Pedro Alves <palves@redhat.com>
2366
2367 PR gdb/20415
2368 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
2369 (x32-avx512-linux-ipa.o): New rules.
2370 * configure.ac (x86_64-*-linux*): New x32 check.
2371 * configure.srv (ipa_x32_linux_regobj): New.
2372 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
2373 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
2374 descriptions.
2375 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
2376 descriptions.
2377 * configure: Regenerate.
2378
f348d89a
PA
23792016-08-09 Pedro Alves <palves@redhat.com>
2380
2381 PR gdb/18653
2382 * Makefile.in (OBS): Add signals-state-save-restore.o.
2383 (signals-state-save-restore.o): New rule.
2384 * config.in: Regenerate.
2385 * configure: Regenerate.
2386 * linux-low.c: Include "signals-state-save-restore.h".
2387 (linux_create_inferior): Call
2388 restore_original_signals_state.
2389 * server.c: Include "dispositions-save-restore.h".
2390 (captured_main): Call save_original_signals_state.
2391
1baf5149
PA
23922016-08-05 Pedro Alves <palves@redhat.com>
2393
2394 * configure: Regenerate.
2395
fcd4a73d
YQ
23962016-08-04 Yao Qi <yao.qi@linaro.org>
2397
2398 * linux-low.c (regsets_fetch_inferior_registers): Check
2399 errno is ESRCH or not.
2400
979659d0
YQ
24012016-08-02 Yao Qi <yao.qi@linaro.org>
2402
2403 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
2404 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
2405 (thread_db_load_search): Update.
2406 (try_thread_db_load_1): Don't look for td_ta_event_addr,
2407 td_ta_set_event and td_ta_event_getmsg.
2408
6598661d
PA
24092016-07-26 Pedro Alves <palves@redhat.com>
2410
2411 PR server/20414
2412 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
2413 of unsigned long for 64-bit registers and use uint32_t instead of
2414 unsigned int for 32-bit registers.
2415
9cf12d57
PA
24162016-07-26 Pedro Alves <palves@redhat.com>
2417
2418 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
2419 to 'ptrace'.
2420
305450ed
TT
24212016-07-21 Tom Tromey <tom@tromey.com>
2422
2423 * configure: Rebuild.
2424
2583da7c
YQ
24252016-07-21 Yao Qi <yao.qi@linaro.org>
2426
2427 * mem-break.c (find_gdb_breakpoint): Cast bp to
2428 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
2429
21536b36
YQ
24302016-07-21 Yao Qi <yao.qi@linaro.org>
2431
2432 * server.c (handle_v_requests): Support s and S actions
2433 if target_supports_software_single_step return true.
2434
8901d193
YQ
24352016-07-21 Yao Qi <yao.qi@linaro.org>
2436
2437 * linux-low.c (resume_stopped_resumed_lwps): If resume request
2438 is resume_step, call maybe_hw_step.
2439 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
2440 and unstop them.
2441 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
2442 breakpoints or not.
2443 (proceed_one_lwp): If resume request is resume_step, install
2444 reinsert breakpoints and call maybe_hw_step.
2445
0e9a339e
YQ
24462016-07-21 Yao Qi <yao.qi@linaro.org>
2447
2448 * linux-low.c (proceed_one_lwp): Declare.
2449 (linux_resume_one_thread): Remove local variable 'step'.
2450 Lift code enqueue signal. Call proceed_one_lwp instead of
2451 linux_resume_one_lwp.
2452
4281b351
YQ
24532016-07-21 Yao Qi <yao.qi@linaro.org>
2454
2455 * linux-low.c (linux_resume_one_thread): Call
2456 enqueue_pending_signal.
2457
984a2c04
YQ
24582016-07-21 Yao Qi <yao.qi@linaro.org>
2459
2460 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
2461 * inferiors.c (do_restore_current_thread_cleanup): New function.
2462 (make_cleanup_restore_current_thread): Likewise.
2463 * linux-low.c (install_software_single_step_breakpoints): Call
2464 make_cleanup_restore_current_thread. Switch current_thread to
2465 thread.
2466
bec903c9
YQ
24672016-07-21 Yao Qi <yao.qi@linaro.org>
2468
2469 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
2470 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
2471 (clone_one_breakpoint): Likewise.
2472 (delete_reinsert_breakpoints): Change parameter to thread.
2473 Callers updated.
2474 (has_reinsert_breakpoints): Likewise.
2475 (uninsert_reinsert_breakpoints): Likewise.
2476 (reinsert_reinsert_breakpoints): Likewise.
2477 * mem-break.h (set_reinsert_breakpoint): Update declaration.
2478 (delete_reinsert_breakpoints): Likewise.
2479 (reinsert_reinsert_breakpoints): Likewise.
2480 (uninsert_reinsert_breakpoints): Likewise.
2481 (has_reinsert_breakpoints): Likewise.
2482
63c40ec7
YQ
24832016-07-21 Yao Qi <yao.qi@linaro.org>
2484
2485 * inferiors.c (get_thread_process): Make parameter const.
2486 * inferiors.h (get_thread_process): Update declaration.
2487 * mem-break.c (clone_all_breakpoints): Remove all parameters.
2488 Add new parameters child_thread and parent_thread. Callers
2489 updated.
2490 * mem-break.h (clone_all_breakpoints): Update declaration.
2491
9aa76cd0
YQ
24922016-07-21 Yao Qi <yao.qi@linaro.org>
2493
2494 * mem-break.c (struct breakpoint) <cond_list>: Remove.
2495 <command_list, handler>: Remove.
2496 (struct gdb_breakpoint): New.
2497 (struct other_breakpoint): New.
2498 (struct reinsert_breakpoint): New.
2499 (is_gdb_breakpoint): New function.
2500 (any_persistent_commands): Update command_list if
2501 is_gdb_breakpoint returns true.
2502 (set_breakpoint): Create breakpoints according to their types.
2503 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
2504 (set_gdb_breakpoint_1): Likewise.
2505 (set_gdb_breakpoint): Likewise.
2506 (clear_breakpoint_conditions): Change parameter type to
2507 'struct gdb_breakpoint *'.
2508 (clear_breakpoint_commands): Likewise.
2509 (clear_breakpoint_conditions_and_commands): Likewise.
2510 (add_condition_to_breakpoint): Likewise.
2511 (add_breakpoint_condition): Likewise.
2512 (add_commands_to_breakpoint): Likewise.
2513 (check_breakpoints): Check other_breakpoint.
2514 (clone_one_breakpoint): Clone breakpopint according to its type.
2515 * mem-break.h (struct gdb_breakpoint): Declare.
2516 (set_gdb_breakpoint): Update declaration.
2517 (clear_breakpoint_conditions_and_commands): Likewise.
2518 (add_breakpoint_condition): Likewise.
2519 (add_breakpoint_commands): Likewise.
2520 * server.c (process_point_options): Change parameter type to
2521 'struct gdb_breakpoint *'.
2522
811f8301
YQ
25232016-07-21 Yao Qi <yao.qi@linaro.org>
2524
2525 * mem-break.c (set_breakpoint_at): Rename it to ...
2526 (set_breakpoint_type_at): ... it.
2527 (set_breakpoint_at): Call set_breakpoint_type_at.
2528 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
2529 * mem-break.h (set_breakpoint_at): Update comments.
2530
b1c51e36
CLT
25312016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
2532
2533 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
2534 to buf parameter.
2535 (nios2_store_gregset): Likewise.
2536
ced2dffb
PA
25372016-07-01 Pedro Alves <palves@redhat.com>
2538 Antoine Tremblay <antoine.tremblay@ericsson.com>
2539
2540 * linux-low.c: Change interface to take the target lwp_info
2541 pointer directly and return void. Handle detaching from a zombie
2542 thread.
2543 (linux_detach_lwp_callback): New function.
2544 (linux_detach): Detach from the leader thread after detaching from
2545 the clone threads.
2546
2ac09a5b
YQ
25472016-06-28 Yao Qi <yao.qi@linaro.org>
2548
2549 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
2550 for variable new_offset.
2551 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
2552 (aarch64_ftrace_insn_reloc_cb): Likewise.
2553 (aarch64_ftrace_insn_reloc_tb): Likewise.
2554 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
2555 PRIx64 instead of PRIx32.
2556
79e7fd4f
YQ
25572016-06-28 Yao Qi <yao.qi@linaro.org>
2558
2559 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
2560 (the_low_target): Install arm_get_syscall_trapinfo.
2561
061fc021
YQ
25622016-06-28 Yao Qi <yao.qi@linaro.org>
2563
2564 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
2565 function.
2566 (the_low_target): Install aarch64_get_syscall_trapinfo.
2567
4cc32bec
YQ
25682016-06-28 Yao Qi <yao.qi@linaro.org>
2569
2570 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
2571 Callers updated.
2572 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
2573 Remove parameter sysno.
2574 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
2575 sysret.
2576
782c1122
AA
25772016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
2578
2579 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
2580 (s390_emit_ne_goto): Likewise.
2581 (s390_emit_lt_goto): Likewise.
2582 (s390_emit_le_goto): Likewise.
2583 (s390_emit_gt_goto): Likewise.
2584 (s390_emit_ge_goto): Likewise.
2585 (s390x_emit_eq_goto): Likewise.
2586 (s390x_emit_ne_goto): Likewise.
2587 (s390x_emit_lt_goto): Likewise.
2588 (s390x_emit_le_goto): Likewise.
2589 (s390x_emit_gt_goto): Likewise.
2590 (s390x_emit_ge_goto): Likewise.
2591 (s390_emit_ops_impl): Mark variable static.
2592 (s390x_emit_ops): Likewise.
2593
2e7b624b
YQ
25942016-06-17 Yao Qi <yao.qi@linaro.org>
2595
2596 * linux-low.c (handle_extended_wait): Call
2597 uninsert_reinsert_breakpoints for the parent process. Remove
2598 reinsert breakpoints from the child process. Reinsert them to
2599 the parent process when vfork is done.
2600 * mem-break.c (uninsert_reinsert_breakpoints): New function.
2601 (reinsert_reinsert_breakpoints): New function.
2602 * mem-break.h (uninsert_reinsert_breakpoints): Declare
2603 (reinsert_reinsert_breakpoints): Declare.
2604
8a81c5d7
YQ
26052016-06-17 Yao Qi <yao.qi@linaro.org>
2606
2607 * linux-low.c (handle_extended_wait): If the parent is doing
2608 step-over, remove the reinsert breakpoints from the forked child.
2609
f50bf8e5
YQ
26102016-06-17 Yao Qi <yao.qi@linaro.org>
2611
2612 * linux-low.c (unsuspend_all_lwps): Declare.
2613 (linux_low_filter_event): If thread exited, call finish_step_over.
2614 If step-over is finished, unsuspend other threads.
2615
8376a3cb
YQ
26162016-06-17 Yao Qi <yao.qi@linaro.org>
2617
2618 * linux-low.c (linux_resume_one_lwp_throw): Assert
2619 has_reinsert_breakpoints returns false.
2620 * mem-break.c (delete_disabled_breakpoints): Assert
2621 bp type isn't reinsert_breakpoint.
2622
f79b145d
YQ
26232016-06-17 Yao Qi <yao.qi@linaro.org>
2624
2625 * linux-low.c (maybe_hw_step): New function.
2626 (linux_resume_one_lwp_throw): Call maybe_hw_step.
2627 (finish_step_over): Switch current_thread to lwp temporarily,
2628 and assert has_reinsert_breakpoints returns true.
2629 (proceed_one_lwp): Call maybe_hw_step.
2630 * mem-break.c (has_reinsert_breakpoints): New function.
2631 * mem-break.h (has_reinsert_breakpoints): Declare.
2632
0ae534d2
JT
26332016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
2634
2635 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
2636
fcdad592
YQ
26372016-05-17 Yao Qi <yao.qi@linaro.org>
2638
2639 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
2640 instead of find_inferior.
2641
9e784964
YQ
26422016-05-05 Yao Qi <yao.qi@linaro.org>
2643
2644 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
2645 Initialize res to zero.
2646
cf2ebb6e
YQ
26472016-05-05 Yao Qi <yao.qi@linaro.org>
2648
2649 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
2650 to uint32_t.
2651
c1aebf87
UW
26522016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
2653
2654 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
2655 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
2656 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
2657
35fd2deb 26582016-04-28 Par Olsson <par.olsson@windriver.com>
cbe14bcf 2659 Simon Marchi <simon.marchi@ericsson.com>
35fd2deb
PO
2660
2661 * tracepoint.c (write_inferior_int8): New function.
2662 (cmd_qtenable_disable): Write enable flag using
2663 write_inferior_int8.
2664
484b3c32
YQ
26652016-04-25 Yao Qi <yao.qi@linaro.org>
2666
2667 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
2668 (need_step_over_p): Return zero if the LWP has pending signals
2669 can be delivered on software single step target.
2670
85ba7d86
YQ
26712016-04-25 Yao Qi <yao.qi@linaro.org>
2672
2673 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
2674 return instead of error.
2675
3539aa13
YQ
26762016-04-22 Yao Qi <yao.qi@linaro.org>
2677
2678 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
2679 to 23.
2680
5b061e98
YQ
26812016-04-22 Yao Qi <yao.qi@linaro.org>
2682
2683 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
2684 signal when stepping over breakpoint with software single
2685 step.
2686
3451269c
PA
26872016-04-21 Pedro Alves <palves@redhat.com>
2688
2689 * linux-s390-low.c (s390_collect_ptrace_register)
2690 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
2691 add casts.
2692 (s390_check_regset): Use void * instead of gdb_byte *.
2693
a2358508
PA
26942016-04-20 Pedro Alves <palves@redhat.com>
2695
2696 * configure: Renegerate.
2697
6885166d
YQ
26982016-04-20 Yao Qi <yao.qi@linaro.org>
2699
2700 * linux-aarch32-low.c: Include "arch/arm-linux.h".
2701 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
2702 number 16.
2703 (arm_store_gregset): Likewise.
2704
2b863f51
WT
27052016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
2706
2707 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
2708 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
2709 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
2710 (amd64-avx-mpx-linux.c): New rules.
2711 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
2712 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
2713 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
2714 (srv_amd64_regobj): Add amd64-avx-mpx.o.
2715 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
2716 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
2717 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
2718 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
2719 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
2720 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
2721 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
2722 * linux-x86-low.c (x86_linux_read_description): Add case for
2723 X86_XSTATE_AVX_MPX_MASK.
2724 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
2725 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
2726 init_registers_i386_avx_mpx_linux.
2727 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
2728 (initialize_low_tracepoint): Call
2729 init_registers_i386_avx_mpx_linux.
2730 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
2731 (initialize_low_tracepoint): Call
2732 init_registers_amd64_avx_mpx_linux.
2733 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
2734 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
2735 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
2736 declarations.
2737
9b30624b
PA
27382016-04-18 Pedro Alves <palves@redhat.com>
2739
2740 * configure: Regenerate.
2741
45e3745e
AT
27422016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
2743
2744 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
2745 (aarch64_emit_sub): Likewise.
2746
2afc13ff
PA
27472016-04-12 Pedro Alves <palves@redhat.com>
2748
2749 * utils.c (prepare_to_throw_exception): Delete.
2750
6e774b13
SM
27512016-04-05 Simon Marchi <simon.marchi@ericsson.com>
2752
2753 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
2754
4dca19f8
MK
27552016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
2756
2757 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
2758
d0a9981f
MK
27592016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
2760
2761 * linux-aarch64-ipa.c: Add <elf.h> include.
2762 * linux-ppc-ipa.c: Add <elf.h> include.
2763 * linux-s390-ipa.c: Add <elf.h> include.
2764
252db07e
MK
27652016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
2766
2767 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
2768 (get_raw_reg_ptr): Likewise.
2769 (get_trace_state_variable_value_ptr): Likewise.
2770 (set_trace_state_variable_value_ptr): Likewise.
2771 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
2772 char *.
2773
14e2b6d9
MK
27742016-03-31 Wei-cheng Wang <cole945@gmail.com>
2775 Marcin Kościelnicki <koriakin@0x04.net>
2776
2777 PR/17221
2778 * linux-ppc-low.c (emit_insns): New function.
2779 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
2780 (ppc_emit_prologue): New function.
2781 (ppc_emit_epilogue): New function.
2782 (ppc_emit_add): New function.
2783 (ppc_emit_sub): New function.
2784 (ppc_emit_mul): New function.
2785 (ppc_emit_lsh): New function.
2786 (ppc_emit_rsh_signed): New function.
2787 (ppc_emit_rsh_unsigned): New function.
2788 (ppc_emit_ext): New function.
2789 (ppc_emit_zero_ext): New function.
2790 (ppc_emit_log_not): New function.
2791 (ppc_emit_bit_and): New function.
2792 (ppc_emit_bit_or): New function.
2793 (ppc_emit_bit_xor): New function.
2794 (ppc_emit_bit_not): New function.
2795 (ppc_emit_equal): New function.
2796 (ppc_emit_less_signed): New function.
2797 (ppc_emit_less_unsigned): New function.
2798 (ppc_emit_ref): New function.
2799 (ppc_emit_const): New function.
2800 (ppc_emit_reg): New function.
2801 (ppc_emit_pop): New function.
2802 (ppc_emit_stack_flush): New function.
2803 (ppc_emit_swap): New function.
2804 (ppc_emit_stack_adjust): New function.
2805 (ppc_emit_call): New function.
2806 (ppc_emit_int_call_1): New function.
2807 (ppc_emit_void_call_2): New function.
2808 (ppc_emit_if_goto): New function.
2809 (ppc_emit_goto): New function.
2810 (ppc_emit_eq_goto): New function.
2811 (ppc_emit_ne_goto): New function.
2812 (ppc_emit_lt_goto): New function.
2813 (ppc_emit_le_goto): New function.
2814 (ppc_emit_gt_goto): New function.
2815 (ppc_emit_ge_goto): New function.
2816 (ppc_write_goto_address): New function.
2817 (ppc_emit_ops_impl): New static variable.
2818 (ppc64v1_emit_prologue): New function.
2819 (ppc64v2_emit_prologue): New function.
2820 (ppc64_emit_epilogue): New function.
2821 (ppc64_emit_add): New function.
2822 (ppc64_emit_sub): New function.
2823 (ppc64_emit_mul): New function.
2824 (ppc64_emit_lsh): New function.
2825 (ppc64_emit_rsh_signed): New function.
2826 (ppc64_emit_rsh_unsigned): New function.
2827 (ppc64_emit_ext): New function.
2828 (ppc64_emit_zero_ext): New function.
2829 (ppc64_emit_log_not): New function.
2830 (ppc64_emit_bit_and): New function.
2831 (ppc64_emit_bit_or): New function.
2832 (ppc64_emit_bit_xor): New function.
2833 (ppc64_emit_bit_not): New function.
2834 (ppc64_emit_equal): New function.
2835 (ppc64_emit_less_signed): New function.
2836 (ppc64_emit_less_unsigned): New function.
2837 (ppc64_emit_ref): New function.
2838 (ppc64_emit_const): New function.
2839 (ppc64v1_emit_reg): New function.
2840 (ppc64v2_emit_reg): New function.
2841 (ppc64_emit_pop): New function.
2842 (ppc64_emit_stack_flush): New function.
2843 (ppc64_emit_swap): New function.
2844 (ppc64v1_emit_call): New function.
2845 (ppc64v2_emit_call): New function.
2846 (ppc64v1_emit_int_call_1): New function.
2847 (ppc64v2_emit_int_call_1): New function.
2848 (ppc64v1_emit_void_call_2): New function.
2849 (ppc64v2_emit_void_call_2): New function.
2850 (ppc64_emit_if_goto): New function.
2851 (ppc64_emit_eq_goto): New function.
2852 (ppc64_emit_ne_goto): New function.
2853 (ppc64_emit_lt_goto): New function.
2854 (ppc64_emit_le_goto): New function.
2855 (ppc64_emit_gt_goto): New function.
2856 (ppc64_emit_ge_goto): New function.
2857 (ppc64v1_emit_ops_impl): New static variable.
2858 (ppc64v2_emit_ops_impl): New static variable.
2859 (ppc_emit_ops): New function.
2860 (linux_low_target): Wire in ppc_emit_ops.
2861
a2174ba4
MK
28622016-03-31 Wei-cheng Wang <cole945@gmail.com>
2863 Marcin Kościelnicki <koriakin@0x04.net>
2864
2865 PR/17221
2866 * Makefile.in: Add powerpc-*-ipa.o
2867 * configure.srv: Add ipa_obj for powerpc*-linux.
2868 * linux-ppc-ipa.c: New file.
2869 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
2870 includes.
2871 (PPC_FIELD): New macro.
2872 (PPC_SEXT): New macro.
2873 (PPC_OP6): New macro.
2874 (PPC_BO): New macro.
2875 (PPC_LI): New macro.
2876 (PPC_BD): New macro.
2877 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
2878 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
2879 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
2880 (ppc_get_thread_area): New function.
2881 (is_elfv2_inferior): New function.
2882 (gen_ds_form): New function.
2883 (GEN_STD): New macro.
2884 (GEN_STDU): New macro.
2885 (GEN_LD): New macro.
2886 (GEN_LDU): New macro.
2887 (gen_d_form): New function.
2888 (GEN_ADDI): New macro.
2889 (GEN_ADDIS): New macro.
2890 (GEN_LI): New macro.
2891 (GEN_LIS): New macro.
2892 (GEN_ORI): New macro.
2893 (GEN_ORIS): New macro.
2894 (GEN_LWZ): New macro.
2895 (GEN_STW): New macro.
2896 (GEN_STWU): New macro.
2897 (gen_xfx_form): New function.
2898 (GEN_MFSPR): New macro.
2899 (GEN_MTSPR): New macro.
2900 (GEN_MFCR): New macro.
2901 (GEN_MTCR): New macro.
2902 (GEN_SYNC): New macro.
2903 (GEN_LWSYNC): New macro.
2904 (gen_x_form): New function.
2905 (GEN_OR): New macro.
2906 (GEN_MR): New macro.
2907 (GEN_LWARX): New macro.
2908 (GEN_STWCX): New macro.
2909 (GEN_CMPW): New macro.
2910 (gen_md_form): New function.
2911 (GEN_RLDICL): New macro.
2912 (GEN_RLDICR): New macro.
2913 (gen_i_form): New function.
2914 (GEN_B): New macro.
2915 (GEN_BL): New macro.
2916 (gen_b_form): New function.
2917 (GEN_BNE): New macro.
2918 (GEN_LOAD): New macro.
2919 (GEN_STORE): New macro.
2920 (gen_limm): New function.
2921 (gen_atomic_xchg): New function.
2922 (gen_call): New function.
2923 (ppc_relocate_instruction): New function.
2924 (ppc_install_fast_tracepoint_jump_pad): New function.
2925 (ppc_get_min_fast_tracepoint_insn_len): New function.
2926 (ppc_get_ipa_tdesc_idx): New function.
2927 (the_low_target): Wire in the new functions.
2928 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
2929 tdescs.
2930 * linux-ppc-tdesc.h: New file.
2931
a13c4696
MK
29322016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
2933
2934 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
2935 (alloc_jump_pad_buffer): New function.
2936 * linux-amd64-ipa.c: Add <sys/mman.h> include.
2937 (alloc_jump_pad_buffer): New function.
2938 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
2939 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
2940 (alloc_jump_pad_buffer): New function.
2941 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
2942 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
2943 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
2944 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
2945
1cda1512
MK
29462016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
2947
2948 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
2949 * linux-amd64-ipa.c: Likewise.
2950 * linux-i386-ipa.c: Likewise.
2951 * linux-s390-ipa.c: Likewise.
2952 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
2953 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
2954 set_trace_state_variable_value_ptr.
2955 (struct ipa_sym_addresses): Likewise.
2956 (symbol_list): Likewise.
2957 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
2958 accessing gdb_collect directly.
2959 (gdb_collect_ptr_type): New typedef.
2960 (get_raw_reg_ptr_type): New typedef.
2961 (get_trace_state_variable_value_ptr_type): New typedef.
2962 (set_trace_state_variable_value_ptr_type): New typedef.
2963 (gdb_collect_ptr): New global.
2964 (get_raw_reg_ptr): New global.
2965 (get_trace_state_variable_value_ptr): New global.
2966 (set_trace_state_variable_value_ptr): New global.
2967 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
2968 accessing get_raw_reg directly.
2969 (get_get_tsv_func_addr): Likewise for
2970 get_trace_state_variable_value_ptr.
2971 (get_set_tsv_func_addr): Likewise for
2972 set_trace_state_variable_value_ptr.
2973 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
2974
72fb5488
SM
29752016-03-30 Simon Marchi <simon.marchi@ericsson.com>
2976
2977 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
2978
28170b88
MK
29792016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
2980
2981 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
2982 packets.
2983 (relocate_instruction): Remove own_buf.
2984 * server.c (own_buf): Make global.
2985 (handle_v_requests): Make global.
2986 * server.h (own_buf): New declaration.
2987 (handle_v_requests): New prototype.
2988
f39e8743
MK
29892016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
2990
2991 PR 18377
2992 * linux-s390-low.c (add_insns): New function.
2993 (s390_emit_prologue): New function.
2994 (s390_emit_epilogue): New function.
2995 (s390_emit_add): New function.
2996 (s390_emit_sub): New function.
2997 (s390_emit_mul): New function.
2998 (s390_emit_lsh): New function.
2999 (s390_emit_rsh_signed): New function.
3000 (s390_emit_rsh_unsigned): New function.
3001 (s390_emit_ext): New function.
3002 (s390_emit_log_not): New function.
3003 (s390_emit_bit_and): New function.
3004 (s390_emit_bit_or): New function.
3005 (s390_emit_bit_xor): New function.
3006 (s390_emit_bit_not): New function.
3007 (s390_emit_equal): New function.
3008 (s390_emit_less_signed): New function.
3009 (s390_emit_less_unsigned): New function.
3010 (s390_emit_ref): New function.
3011 (s390_emit_if_goto): New function.
3012 (s390_emit_goto): New function.
3013 (s390_write_goto_address): New function.
3014 (s390_emit_litpool): New function.
3015 (s390_emit_const): New function.
3016 (s390_emit_call): New function.
3017 (s390_emit_reg): New function.
3018 (s390_emit_pop): New function.
3019 (s390_emit_stack_flush): New function.
3020 (s390_emit_zero_ext): New function.
3021 (s390_emit_swap): New function.
3022 (s390_emit_stack_adjust): New function.
3023 (s390_emit_set_r2): New function.
3024 (s390_emit_int_call_1): New function.
3025 (s390_emit_void_call_2): New function.
3026 (s390_emit_eq_goto): New function.
3027 (s390_emit_ne_goto): New function.
3028 (s390_emit_lt_goto): New function.
3029 (s390_emit_le_goto): New function.
3030 (s390_emit_gt_goto): New function.
3031 (s390_emit_ge_goto): New function.
3032 (s390x_emit_prologue): New function.
3033 (s390x_emit_epilogue): New function.
3034 (s390x_emit_add): New function.
3035 (s390x_emit_sub): New function.
3036 (s390x_emit_mul): New function.
3037 (s390x_emit_lsh): New function.
3038 (s390x_emit_rsh_signed): New function.
3039 (s390x_emit_rsh_unsigned): New function.
3040 (s390x_emit_ext): New function.
3041 (s390x_emit_log_not): New function.
3042 (s390x_emit_bit_and): New function.
3043 (s390x_emit_bit_or): New function.
3044 (s390x_emit_bit_xor): New function.
3045 (s390x_emit_bit_not): New function.
3046 (s390x_emit_equal): New function.
3047 (s390x_emit_less_signed): New function.
3048 (s390x_emit_less_unsigned): New function.
3049 (s390x_emit_ref): New function.
3050 (s390x_emit_if_goto): New function.
3051 (s390x_emit_const): New function.
3052 (s390x_emit_call): New function.
3053 (s390x_emit_reg): New function.
3054 (s390x_emit_pop): New function.
3055 (s390x_emit_stack_flush): New function.
3056 (s390x_emit_zero_ext): New function.
3057 (s390x_emit_swap): New function.
3058 (s390x_emit_stack_adjust): New function.
3059 (s390x_emit_int_call_1): New function.
3060 (s390x_emit_void_call_2): New function.
3061 (s390x_emit_eq_goto): New function.
3062 (s390x_emit_ne_goto): New function.
3063 (s390x_emit_lt_goto): New function.
3064 (s390x_emit_le_goto): New function.
3065 (s390x_emit_gt_goto): New function.
3066 (s390x_emit_ge_goto): New function.
3067 (s390_emit_ops): New function.
3068 (struct linux_target_ops): Fill in emit_ops hook.
3069
abd9baf9
MK
30702016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
3071
3072 PR 18377
3073 * Makefile.in: Add s390 IPA files.
3074 * configure.srv: Build IPA for s390.
3075 * linux-s390-ipa.c: New file.
3076 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
3077 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
3078 (tdesc_s390_linux32): Likewise.
3079 (init_registers_s390_linux32v1): Likewise.
3080 (tdesc_s390_linux32v1): Likewise.
3081 (init_registers_s390_linux32v2): Likewise.
3082 (tdesc_s390_linux32v2): Likewise.
3083 (init_registers_s390_linux64): Likewise.
3084 (tdesc_s390_linux64): Likewise.
3085 (init_registers_s390_linux64v1): Likewise.
3086 (tdesc_s390_linux64v1): Likewise.
3087 (init_registers_s390_linux64v2): Likewise.
3088 (tdesc_s390_linux64v2): Likewise.
3089 (init_registers_s390_te_linux64): Likewise.
3090 (tdesc_s390_te_linux64): Likewise.
3091 (init_registers_s390_vx_linux64): Likewise.
3092 (tdesc_s390_vx_linux64): Likewise.
3093 (init_registers_s390_tevx_linux64): Likewise.
3094 (tdesc_s390_tevx_linux64): Likewise.
3095 (init_registers_s390x_linux64): Likewise.
3096 (tdesc_s390x_linux64): Likewise.
3097 (init_registers_s390x_linux64v1): Likewise.
3098 (tdesc_s390x_linux64v1): Likewise.
3099 (init_registers_s390x_linux64v2): Likewise.
3100 (tdesc_s390x_linux64v2): Likewise.
3101 (init_registers_s390x_te_linux64): Likewise.
3102 (tdesc_s390x_te_linux64): Likewise.
3103 (init_registers_s390x_vx_linux64): Likewise.
3104 (tdesc_s390x_vx_linux64): Likewise.
3105 (init_registers_s390x_tevx_linux64): Likewise.
3106 (tdesc_s390x_tevx_linux64): Likewise.
3107 (have_hwcap_s390_vx): New static variable.
3108 (s390_arch_setup): Fill have_hwcap_s390_vx.
3109 (s390_get_thread_area): New function.
3110 (s390_ft_entry_gpr_esa): New const.
3111 (s390_ft_entry_gpr_zarch): New const.
3112 (s390_ft_entry_misc): New const.
3113 (s390_ft_entry_fr): New const.
3114 (s390_ft_entry_vr): New const.
3115 (s390_ft_main_31): New const.
3116 (s390_ft_main_64): New const.
3117 (s390_ft_exit_fr): New const.
3118 (s390_ft_exit_vr): New const.
3119 (s390_ft_exit_misc): New const.
3120 (s390_ft_exit_gpr_esa): New const.
3121 (s390_ft_exit_gpr_zarch): New const.
3122 (append_insns): New function.
3123 (s390_relocate_instruction): New function.
3124 (s390_install_fast_tracepoint_jump_pad): New function.
3125 (s390_get_min_fast_tracepoint_insn_len): New function.
3126 (s390_get_ipa_tdesc_idx): New function.
3127 (struct linux_target_ops): Wire in the above functions.
3128 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
3129 * linux-s390-tdesc.h: New file.
3130
a4105d04
MK
31312016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
3132
3133 * linux-s390-low.c (s390_supports_tracepoints): New function.
3134 (struct linux_target_ops): Fill supports_tracepoints hook.
3135
35ac8b3e
YQ
31362016-03-18 Yao Qi <yao.qi@linaro.org>
3137
3138 * linux-low.c (lwp_signal_can_be_delivered): New function.
3139 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
3140
94610ec4
YQ
31412016-03-18 Yao Qi <yao.qi@linaro.org>
3142
3143 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
3144 0 if signal is enqueued. Remove 'signal' from one debugging
3145 message. Move one debugging message to some lines below.
3146 Remove code setting 'signal' to 0.
3147
80aea927
YQ
31482016-03-18 Yao Qi <yao.qi@linaro.org>
3149
3150 * linux-low.c (linux_low_filter_event): Remove redundant
3151 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
3152
b04fd3be
MK
31532016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
3154
3155 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
3156 (struct linux_target_ops): Wire in the above.
3157
c40c8d4b
YQ
31582016-03-03 Yao Qi <yao.qi@linaro.org>
3159
3160 * linux-low.c: Update comments to start_step_over.
3161
0f8288ae
YQ
31622016-03-03 Yao Qi <yao.qi@linaro.org>
3163
3164 PR server/19736
3165 * linux-low.c (handle_extended_wait): Set child suspended
3166 if event_lwp->bp_reinsert isn't zero.
3167
fdbd04a8
YQ
31682016-03-02 Yao Qi <yao.qi@linaro.org>
3169
3170 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
3171 enqueue_pending_signal.
3172
6896a8fa
MK
31732016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
3174
3175 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
3176 is actually loaded.
3177
ab503087
MK
31782016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
3179
3180 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
3181 (s390_regmap_3264) [!__s390x__]: New global.
3182 (s390_collect_ptrace_register): Skip map entries containing -1.
3183 (s390_supply_ptrace_register): Ditto.
3184 (s390_fill_gprs_high): New function.
3185 (s390_store_gprs_high): New function.
3186 (s390_regsets): Add NT_S390_HIGH_GPRS.
3187 (s390_get_hwcap): Enable on 31-bit.
3188 (have_hwcap_s390_high_gprs): Enable on 31-bit.
3189 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
3190 Detect NT_S390_HIGH_GPRS.
3191 (s390_usrregs_info_3264): Enable on 31-bit.
3192 (s390_regs_info): Enable regs_info_3264 on 31-bit.
3193 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
3194
ae91f625
MK
31952016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
3196
3197 PR gdb/13808
3198 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
3199 * configure.srv: Ditto.
3200 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
3201 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
3202 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
3203 (init_registers_amd64_linux): Remove prototype.
3204 (tdesc_amd64_linux): Remove declaration.
3205 (get_ipa_tdesc): New function.
3206 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
3207 initialize remaining tdescs.
3208 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
3209 (init_registers_i386_linux): Remove prototype.
3210 (tdesc_i386_linux): Remove declaration.
3211 (get_ipa_tdesc): New function.
3212 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
3213 initialize remaining tdescs.
3214 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
3215 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
3216 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
3217 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
3218 (x86_get_ipa_tdesc_idx): New function.
3219 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
3220 * linux-x86-tdesc.h: New file.
3221 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
3222 (target_get_ipa_tdesc_idx): New macro.
3223 * tracepoint.c (ipa_tdesc_idx): New macro.
3224 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
3225 (symbol_list): Add ipa_tdesc_idx.
3226 (cmd_qtstart): Write ipa_tdesc_idx in the target.
3227 (ipa_tdesc): Remove.
3228 (ipa_tdesc_idx): New variable.
3229 (get_context_regcache): Use get_ipa_tdesc.
3230 (gdb_collect): Ditto.
3231 (gdb_probe): Ditto.
3232 * tracepoint.h (get_ipa_tdesc): New prototype.
3233 (ipa_tdesc): Remove.
3234
e7ad2f14
PA
32352016-02-24 Pedro Alves <palves@redhat.com>
3236
3237 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
3238 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
3239 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
3240 Factor out common code between the USE_SIGTRAP_SIGINFO and
3241 !USE_SIGTRAP_SIGINFO blocks.
3242 (linux_low_filter_event): Call save_stop_reason instead of
3243 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
3244 Update comments.
3245 (linux_wait_1): Update comments.
3246
657f9cde
WW
32472016-02-24 Wei-cheng Wang <cole945@gmail.com>
3248
3249 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
3250 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
3251 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
3252 ppc_insert_point, ppc_remove_point.
3253
b00b61e1
MK
32542016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
3255
3256 * linux-s390-low.c (s390_supports_z_point_type): New function.
3257 (struct linux_target_ops): Wire s390_supports_z_point_type in.
3258
553cb527
YQ
32592016-02-16 Yao Qi <yao.qi@linaro.org>
3260
3261 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
3262 PC. Get pc from regcache_read_pc.
3263
a5652c21
YQ
32642016-02-12 Yao Qi <yao.qi@linaro.org>
3265
3266 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
3267 or linux_get_pc_32bit.
3268 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
3269
ed443b61
YQ
32702016-02-12 Yao Qi <yao.qi@linaro.org>
3271
3272 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
3273 arm_linux_get_next_pcs_fixup.
3274
020ecd38
MK
32752016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
3276
3277 * tracepoint.c (x_tracepoint_action_download): Change
3278 write_inferior_data_ptr to write_inferior_data_pointer.
3279 (cmd_qtstart): Likewise.
3280 (write_inferior_data_ptr): Remove.
3281 (download_agent_expr): Change write_inferior_data_ptr to
3282 write_inferior_data_pointer.
3283 (download_tracepoint_1): Likewise.
3284 (download_tracepoint): Likewise.
3285 (download_trace_state_variables): Likewise.
3286
7cae9051
WW
32872016-02-11 Wei-cheng Wang <cole945@gmail.com>
3288 Marcin Kościelnicki <koriakin@0x04.net>
3289
3290 * tracepoint.c (struct tracepoint_action_ops): Remove.
3291 (struct tracepoint_action): Remove ops.
3292 (m_tracepoint_action_download, r_tracepoint_action_download)
3293 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
3294 size and offset accordingly.
3295 (m_tracepoint_action_ops, r_tracepoint_action_ops)
3296 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
3297 (tracepoint_action_send, tracepoint_action_download): New functions.
3298 Helpers for trace action handlers.
3299 (add_tracepoint_action): Remove setup actions ops.
3300 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
3301
9f6a71b4
YQ
33022016-02-10 Yao Qi <yao.qi@linaro.org>
3303
3304 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
3305
1e94266c
SM
33062016-02-09 Simon Marchi <simon.marchi@ericsson.com>
3307
3308 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
3309 to AC_OUTPUT.
3310 * configure: Regenerate.
3311
8adce034
SM
33122016-02-09 Simon Marchi <simon.marchi@ericsson.com>
3313
3314 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
3315 void * to gdb_byte *.
3316 * linux-low.c (siginfo_fixup): Likewise.
3317 (linux_xfer_siginfo): Likewise.
3318 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
3319 Likewise.
3320 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
3321
93813b37
WT
33222016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
3323
3324 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
3325 to srv_tgtobj.
3326 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
3327 to srv_tgtobj.
3328 * linux-x86-low.c [__x86_64__]: Include
3329 "nat/amd64-linux-siginfo.h".
3330 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
3331 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
3332 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
3333 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
3334 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
3335 (cpt_si_fd, si_timerid, si_overrun): Move from
3336 nat/amd64-linux-siginfo.c.
3337 * Makefile.in (amd64-linux-siginfo.o:): New rule.
3338
8424cc97
SM
33392016-01-28 Simon Marchi <simon.marchi@ericsson.com>
3340
3341 * server.c (skip_to_semicolon): Remove.
3342 (process_point_options): Use strchrnul instead of
3343 skip_to_semicolon.
3344
4d18591b
YQ
33452016-01-26 Yao Qi <yao.qi@linaro.org>
3346
3347 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
3348 * linux-low.c (install_software_single_step_breakpoints): Don't
3349 call regcache_read_pc.
3350 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
3351 argument pc.
3352
d8020970
YQ
33532016-01-26 Yao Qi <yao.qi@linaro.org>
3354
3355 * linux-low.c (install_software_single_step_breakpoints): Call
3356 regcache_read_pc instead of get_pc.
3357
8b207339
YQ
33582016-01-26 Yao Qi <yao.qi@linaro.org>
3359
3360 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
3361 (unblock_async_io): Rename to ...
3362 (block_unblock_async_io): ... it. New function.
3363 (enable_async_io): Don't install SIGIO handler. Unblock it
3364 instead.
3365 (disable_async_io): Don't ignore SIGIO. Block it instead.
3366 (initialize_async_io): Install SIGIO handler. Don't call
3367 unblock_async_io.
3368
18879fef
YQ
33692016-01-26 Yao Qi <yao.qi@linaro.org>
3370
3371 * remote-utils.c (getpkt): If the buffer isn't empty, and the
3372 first character is '\003', call *the_target->request_interrupt.
3373
a0f8e08a
YQ
33742016-01-25 Yao Qi <yao.qi@linaro.org>
3375
3376 * remote-utils.c (new_thread_notify): Remove.
3377 (dead_thread_notify): Likewise.
3378 * remote-utils.h (new_thread_notify): Remove declaration.
3379 (dead_thread_notify): Likewise.
3380
cc5fd9ab
MK
33812016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
3382
3383 * gdb.trace/pending.exp: Fix expected message on continue.
3384
99e8eb11
MK
33852016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
3386
3387 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
3388 it works properly on big-endian machines where sizeof (CORE_ADDR)
3389 != sizeof (void *).
3390
a994041d
PA
33912016-01-21 Pedro Alves <palves@redhat.com>
3392
3393 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
3394 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
3395 * configure: Regenerate.
3396
f7a6a40d
YQ
33972016-01-21 Yao Qi <yao.qi@linaro.org>
3398
3399 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
3400 is_thumb and set it according to CPSR saved on the stack.
3401 (get_next_pcs_syscall_next_pc): Pass is_thumb to
3402 arm_sigreturn_next_pc.
3403
6f69e520
YQ
34042016-01-18 Yao Qi <yao.qi@linaro.org>
3405
3406 * linux-low.c (linux_set_pc_64bit): New function.
3407 (linux_get_pc_64bit): New function.
3408 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
3409 Declare.
3410 * linux-sparc-low.c (debug_threads): Remove declaration.
3411 (sparc_get_pc): Remove.
3412 (the_low_target): Use linux_get_pc_64bit instead of
3413 sparc_get_pc.
3414 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
3415 (the_low_target): Use linux_get_pc_64bit and
3416 linux_set_pc_64bit.
3417
276d4552
YQ
34182016-01-18 Yao Qi <yao.qi@linaro.org>
3419
3420 * linux-arm-low.c (debug_threads): Remove declaration.
3421 (arm_get_pc, arm_set_pc): Remove.
3422 (the_low_target): Use linux_get_pc_32bit and
3423 linux_set_pc_32bit.
3424 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
3425 (the_low_target): Use linux_get_pc_32bit and
3426 linux_set_pc_32bit.
3427 * linux-cris-low.c (debug_threads): Remove declaration.
3428 (cris_get_pc, cris_set_pc,): Remove.
3429 (the_low_target): Use linux_get_pc_32bit and
3430 linux_set_pc_32bit.
3431 * linux-crisv32-low.c (debug_threads): Remove declaration.
3432 (cris_get_pc, cris_set_pc): Remove.
3433 (the_low_target): Use linux_get_pc_32bit and
3434 linux_set_pc_32bit.
3435 * linux-low.c: Include inttypes.h.
3436 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
3437 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
3438 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
3439 (the_low_target): Use linux_get_pc_32bit and
3440 linux_set_pc_32bit.
3441 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
3442 (the_low_target): Use linux_get_pc_32bit and
3443 linux_set_pc_32bit.
3444 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
3445 (the_low_target): Use linux_get_pc_32bit and
3446 linux_set_pc_32bit.
3447 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
3448 (the_low_target): Use linux_get_pc_32bit and
3449 linux_set_pc_32bit.
3450 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
3451 (the_low_target): Use linux_get_pc_32bit and
3452 linux_set_pc_32bit.
3453
eb0edac8
GB
34542016-01-18 Gary Benson <gbenson@redhat.com>
3455
3456 * configure.ac (AC_FUNC_FORK): New check.
3457 * config.in: Regenerate.
3458 * configure: Likewise.
3459
1b451dda
YQ
34602016-01-14 Yao Qi <yao.qi@linaro.org>
3461
3462 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
3463 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
3464 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
3465 arm_get_next_pcs_ctor.
3466
82075af2
JS
34672016-01-12 Josh Stone <jistone@redhat.com>
3468 Philippe Waroquiers <philippe.waroquiers@skynet.be>
3469
3470 * inferiors.h: Include "gdb_vecs.h".
3471 (struct process_info): Add syscalls_to_catch.
3472 * inferiors.c (remove_process): Free syscalls_to_catch.
3473 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
3474 syscall_return stops.
3475 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
3476 * server.c (handle_general_set): Handle QCatchSyscalls.
3477 (handle_query): Report support for QCatchSyscalls.
3478 * target.h (struct target_ops): Add supports_catch_syscall.
3479 (target_supports_catch_syscall): New macro.
3480 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
3481 (struct lwp_info): Add syscall_state.
3482 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
3483 Maintain syscall_state and syscalls_to_catch across exec.
3484 (get_syscall_trapinfo): New function, proxy to the_low_target.
3485 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
3486 (linux_low_filter_event): Toggle syscall_state entry/return for
3487 syscall traps, and set it ignored for all others.
3488 (gdb_catching_syscalls_p): New function.
3489 (gdb_catch_this_syscall_p): New function.
3490 (linux_wait_1): Handle SYSCALL_SIGTRAP.
3491 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
3492 (linux_supports_catch_syscall): New function.
3493 (linux_target_ops): Install it.
3494 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
3495 (the_low_target): Install it.
3496
8f13a3ce
MF
34972016-01-12 Mike Frysinger <vapier@gentoo.org>
3498
3499 * acinclude.m4: Include new ../warning.m4 file.
3500 * configure: Regenerated.
3501 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
3502
5b3da067
MF
35032016-01-12 Mike Frysinger <vapier@gentoo.org>
3504
3505 * ax.c (is_goto_target): Mark static.
3506 * linux-low.c (register_addr): Likewise.
3507 (linux_fetch_registers, linux_store_registers): Likewise.
3508 * mem-break.c (any_persistent_commands): Fix old prototype.
3509 (add_commands_to_breakpoint): Mark static.
3510 * regcache.c (find_register_by_name): Delete unused func.
3511 * remote-utils.c (hex_or_minus_one): Mark static.
3512 * server.c (monitor_show_help): Mark static.
3513 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
3514 handle_v_requests): Likewise.
3515
bc504a31
PA
35162016-01-12 Pedro Alves <palves@redhat.com>
3517
3518 Remove use of the registered trademark symbol throughout.
3519
5a0dd67a
YQ
35202016-01-08 Yao Qi <yao.qi@linaro.org>
3521
3522 * remote-utils.c (getpkt): If c is '\003', call target hook
3523 request_interrupt.
3524
b2ca446f
YQ
35252016-01-06 Yao Qi <yao.qi@linaro.org>
3526
3527 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
3528 linux-aarch32-low.c.
3529 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3530 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
3531 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
3532 (thumb2_breakpoint): Declare.
3533 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
3534 linux-aarch32-low.h.
3535 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3536 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
3537 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
3538
edd88788
JB
35392016-01-01 Joel Brobecker <brobecker@adacore.com>
3540
3541 * gdbreplay.c (gdbreplay_version): Change copyright year in
3542 version message.
3543 * server.c (gdbserver_version): Likewise.
3544
65da7f14
PP
35452015-12-28 Patrick Palka <patrick@parcs.ath.cx>
3546
3547 * server.c (crc32_table): Delete.
3548 (crc32): Use libiberty's xcrc32 function.
3549
4abd5ed2
JB
35502015-12-22 Joel Brobecker <brobecker@adacore.com>
3551
3552 * lynx-low.c (lynx_delete_thread_callback): New function.
3553 (lynx_mourn): Properly delete our process and all of its
3554 threads. Remove call to clear_inferiors.
3555
0e50fe5c
JB
35562015-12-22 Joel Brobecker <brobecker@adacore.com>
3557
3558 * target.c (thread_search_callback): Add check that
3559 the thread_stopped target callback is not NULL before
3560 calling it.
3561
35adc03f
YQ
35622015-12-21 Yao Qi <yao.qi@linaro.org>
3563
3564 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
3565 arm breakpoint.
3566
bd2b2909
AT
35672015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3568
3569 * server.c (handle_query): Call target_supports_software_single_step.
3570
7fe5e27e
AT
35712015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3572
3573 * linux-low.c (single_step): New function.
3574 (linux_resume_one_lwp_throw): Call single_step.
3575 (start_step_over): Likewise.
3576
d9311bfa
AT
35772015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3578
3579 * Makefile.in (SFILES): Append arch/arm-linux.c,
3580 arch/arm-get-next-pcs.c.
3581 (arm-linux.o): New rule.
3582 (arm-get-next-pcs.o): New rule.
3583 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
3584 arm-linux.o.
3585 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
3586 to linux-aarch32-low.c.
3587 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3588 (arm_breakpoint_len, thumb_breakpoint): Likewise.
3589 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
3590 (thumb2_breakpoint_len): Likewise.
3591 (arm_is_thumb_mode): Make non-static.
3592 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
3593 from linux-aarch32-low.c.
3594 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3595 (arm_breakpoint_len, thumb_breakpoint): Likewise.
3596 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
3597 (thumb2_breakpoint_len): Likewise.
3598 (arm_is_thumb_mode): New declaration.
3599 * linux-arm-low.c: Include arch/arm-linux.h
3600 aarch/arm-get-next-pcs.h, sys/syscall.h.
3601 (get_next_pcs_ops): New struct.
3602 (get_next_pcs_addr_bits_remove): New function.
3603 (get_next_pcs_is_thumb): New function.
3604 (get_next_pcs_read_memory_unsigned_integer): Likewise.
3605 (arm_sigreturn_next_pc): Likewise.
3606 (get_next_pcs_syscall_next_pc): Likewise.
3607 (arm_gdbserver_get_next_pcs): Likewise.
3608 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
3609 Initialize.
3610 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
3611 * server.h: Include gdb_vecs.h.
3612
68ce2059
AT
36132015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3614
3615 * Makefile.in (SFILES): Append common/common-regcache.c.
3616 (OBS): Append common-regcache.o.
3617 (common-regcache.o): New rule.
3618 * regcache.c (init_register_cache): Initialize cache to
3619 REG_UNAVAILABLE.
3620 (regcache_raw_read_unsigned): New function.
3621 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
3622 register_status enum.
3623
fa5308bd
AT
36242015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3625
3626 * linux-aarch64-low.c (the_low_targets): Rename
3627 breakpoint_reinsert_addr to get_next_pcs.
3628 * linux-arm-low.c (the_low_targets): Likewise.
3629 * linux-bfin-low.c (the_low_targets): Likewise.
3630 * linux-cris-low.c (the_low_targets): Likewise.
3631 * linux-crisv32-low.c (the_low_targets): Likewise.
3632 * linux-low.c (can_software_single_step): Likewise.
3633 (install_software_single_step_breakpoints): New function.
3634 (start_step_over): Use install_software_single_step_breakpoints.
3635 * linux-low.h: New CORE_ADDR vector.
3636 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
3637 get_next_pcs.
3638 * linux-mips-low.c (the_low_targets): Likewise.
3639 * linux-nios2-low.c (the_low_targets): Likewise.
3640 * linux-sparc-low.c (the_low_targets): Likewise.
3641
4a6ed09b
PA
36422015-12-17 Pedro Alves <palves@redhat.com>
3643
3644 * linux-low.c (linux_kill_one_lwp): Remove references to
3645 LinuxThreads.
3646 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
3647 to 'kill'.
3648 (linux_init_signals): Delete.
3649 (initialize_low): Adjust.
3650 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
3651
7544db95
PA
36522015-12-16 Pedro Alves <palves@redhat.com>
3653
3654 * configure.ac (compiler warning flags): When testing a
3655 -Wno-foo option, check whether -Wfoo works instead.
3656 * configure: Regenerate.
3657
8020350c
DB
36582015-12-11 Don Breazeal <donb@codesourcery.com>
3659
3660 * server.c (process_serial_event): Don't exit from gdbserver
3661 in remote mode if there are still active inferiors.
3662
db91f502
YQ
36632015-12-11 Yao Qi <yao.qi@linaro.org>
3664
3665 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
3666 arm_breakpoint_at if the process is 32-bit.
3667
b37a6290
YQ
36682015-12-11 Yao Qi <yao.qi@linaro.org>
3669
3670 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
3671 arm breakpoint.
3672
17b1509a
YQ
36732015-12-07 Yao Qi <yao.qi@linaro.org>
3674
3675 * configure.srv: Append arm.o to srv_tgtobj for
3676 aarch64*-*-linux* target.
3677 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
3678 from linux-arm-low.c.
3679 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3680 (arm_breakpoint_len, thumb_breakpoint): Likewise.
3681 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
3682 (thumb2_breakpoint_len): Likewise.
3683 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
3684 (arm_breakpoint_kinds): Likewise.
3685 (arm_breakpoint_kind_from_pc): Likewise.
3686 (arm_sw_breakpoint_from_kind): Likewise.
3687 (arm_breakpoint_kind_from_current_state): Likewise.
3688 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
3689 (arm_sw_breakpoint_from_kind): Declare.
3690 (arm_breakpoint_kind_from_current_state): Declare.
3691 (arm_breakpoint_at): Declare.
3692 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
3693 arm_sw_breakpoint_from_kind if process is 32-bit.
3694 (aarch64_breakpoint_kind_from_pc): New function.
3695 (aarch64_breakpoint_kind_from_current_state): New function.
3696 (the_low_target): Initialize fields breakpoint_kind_from_pc
3697 and breakpoint_kind_from_current_state.
3698 * linux-arm-low.c (arm_breakpoint_kinds): Move to
3699 linux-aarch32-low.c.
3700 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
3701 (arm_breakpoint, arm_breakpoint_len): Likewise.
3702 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
3703 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
3704 (arm_is_thumb_mode): Likewise.
3705 (arm_breakpoint_at): Likewise.
3706 (arm_breakpoint_kind_from_pc): Likewise.
3707 (arm_sw_breakpoint_from_kind): Likewise.
3708 (arm_breakpoint_kind_from_current_state): Likewise.
3709
3710 Revert:
3711 2015-08-04 Yao Qi <yao.qi@linaro.org>
3712
3713 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
3714 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
3715 * server.c (extended_protocol): Remove "static".
3716 * server.h (extended_protocol): Declare it.
3717
ece66d65
JS
37182015-12-04 Josh Stone <jistone@redhat.com>
3719
3720 * target.h (struct target_ops) <arch_setup>: Rename to ...
3721 (struct target_ops) <post_create_inferior>: ... this.
3722 (target_arch_setup): Rename to ...
3723 (target_post_create_inferior): ... this, calling post_create_inferior.
3724 * server.c (start_inferior): Update target_arch_setup calls to
3725 target_post_create_inferior.
3726 * linux-low.c (linux_low_ptrace_options): Forward declare.
3727 (linux_arch_setup): Update its comment for general use.
3728 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
3729 (struct linux_target_ops): Use linux_post_create_inferior.
3730 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
3731 to post_create_inferior.
3732 * nto-low.c (struct nto_target_ops): Likewise.
3733 * spu-low.c (struct spu_target_ops): Likewise.
3734 * win32-low.c (struct win32_target_ops): Likewise.
3735
e58c48b4
AT
37362015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
3737
3738 * linux-arm-low.c: Remove duplicate arch/arm.h include.
3739
fbec8956
AT
37402015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3741
3742 * linux-arm-low.c (arm_reinsert_addr): Remove function.
3743 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
3744 * linux-cris-low.c (cris_reinsert_addr> Remove function.
3745 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3746 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
3747 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3748 * linux-mips-low.c (mips_reinsert_addr): Remove function.
3749 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3750 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
3751 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3752 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
3753 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3754
9b4c5f87
AT
37552015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3756
3757 * linux-low.c (linux_look_up_symbols): Don't call
3758 linux_supports_traceclone.
3759 * linux-low.h (thread_db_init): Remove use_events argument.
3760 * thread-db.c (thread_db_use_event): Remove global variable.
3761 (struct thread_db) <td_thr_event_enable_p>: Remove field.
3762 (struct thread_db) <td_create_bp>: Remove field.
3763 (thread_db_create_event): Remove function.
3764 (thread_db_enable_reporting): Likewise.
3765 (find_one_thread): Don't check for thread_db_use_events.
3766 (attach_thread): Likewise.
3767 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
3768 (try_thread_db_load_1): Don't check for thread_db_use_events.
3769 (thread_db_init): Remove use_events argument and thread events
3770 handling.
3771 (remove_thread_event_breakpoints): Remove function.
3772 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
3773
7d00775e
AT
37742015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3775
3776 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
3777 New function.
3778 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3779 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
3780 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3781 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
3782 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
3783 Initialize.
3784 * linux-crisv32-low.c (cris_supports_hardware_single_step):
3785 New function.
3786 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3787 * linux-low.c (can_hardware_single_step): Use
3788 supports_hardware_single_step.
3789 (can_software_single_step): New function.
3790 (start_step_over): Call can_software_single_step.
3791 (linux_supports_hardware_single_step): New function.
3792 (struct target_ops) <supports_software_single_step>: Initialize.
3793 * linux-low.h (struct linux_target_ops)
3794 <supports_hardware_single_step>: Initialize.
3795 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
3796 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3797 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
3798 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
3799 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
3800 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3801 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
3802 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3803 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
3804 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
3805 Initialize.
3806 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
3807 (struct linux_target_ops) <tile_supports_hardware_single_step>:
3808 Initialize.
3809 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
3810 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3811 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
3812 New function.
3813 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3814 * target.h (struct target_ops): <supports_software_single_step>:
3815 New field.
3816 (target_supports_software_single_step): New macro.
3817
2d97cd35
AT
38182015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3819
3820 * linux-low.c (linux_wait_1): Fix pc advance condition.
3821 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
3822 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
3823
769ef81f
AT
38242015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3825
3826 * linux-arm-low.c (arm_is_thumb_mode): New function.
3827 (arm_breakpoint_at): Use arm_is_thumb_mode.
3828 (arm_breakpoint_kind_from_current_state): New function.
3829 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
3830 Initialize.
3831 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
3832 (linux_breakpoint_kind_from_current_state): New function.
3833 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
3834 * linux-low.h (struct linux_target_ops)
3835 <breakpoint_kind_from_current_state>: New field.
3836 * target.h (struct target_ops): Likewise.
3837 (target_breakpoint_kind_from_current_state): New macro.
3838
1bebeeca
PA
38392015-11-30 Pedro Alves <palves@redhat.com>
3840
3841 * linux-low.c (linux_resume): Wake up the event loop before
3842 returning.
3843
a67a9fae
PA
38442015-11-30 Pedro Alves <palves@redhat.com>
3845
3846 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
3847 check.
3848 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
3849 to -1.
3850 * target.c (struct thread_search): New structure.
3851 (thread_search_callback): New function.
3852 (prev_general_thread): New global.
3853 (prepare_to_access_memory, done_accessing_memory): New functions.
3854 * target.h (prepare_to_access_memory, done_accessing_memory):
3855 Replace macros with function declarations.
3856
f2faf941
PA
38572015-11-30 Pedro Alves <palves@redhat.com>
3858
3859 PR 14618
3860 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
3861 report TARGET_WAITKIND_NO_RESUMED.
3862 * remote-utils.c (prepare_resume_reply): Handle
3863 TARGET_WAITKIND_NO_RESUMED.
3864 * server.c (report_no_resumed): New global.
3865 (handle_query) <qSupported>: Handle "no-resumed+". Report
3866 "no-resumed+" support.
3867 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
3868 return error if the client doesn't support no-resumed events.
3869 (push_stop_notification): New function.
3870 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
3871 events if the client supports them.
3872
a681f9c9
PA
38732015-11-30 Pedro Alves <palves@redhat.com>
3874
3875 * linux-low.c (thread_still_has_status_pending_p): Don't check
3876 vCont;t here.
3877 (lwp_resumed): New function.
3878 (status_pending_p_callback): Return early if the LWP is not
3879 supposed to be resumed.
3880
65706a29
PA
38812015-11-30 Pedro Alves <palves@redhat.com>
3882
3883 * linux-low.c (handle_extended_wait): Assert that the LWP's
3884 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
3885 thread create events, leave the new child's status pending.
3886 (linux_low_filter_event): If GDB wants to hear about thread exit
3887 events, leave the LWP marked dead and don't delete it.
3888 (linux_wait_for_event_filtered): Don't check for thread exit.
3889 (filter_exit_event): New function.
3890 (linux_wait_1): Use it, when returning an exit event.
3891 (linux_resume_one_lwp_throw): Assert that the LWP's
3892 waitstatus is TARGET_WAITKIND_IGNORE.
3893 * remote-utils.c (prepare_resume_reply): Handle
3894 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
3895 * server.c (report_thread_events): New global.
3896 (handle_general_set): Handle QThreadEvents.
3897 (handle_query) <qSupported>: Handle and report QThreadEvents+;
3898 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
3899 TARGET_WAITKIND_THREAD_EXITED.
3900 * server.h (report_thread_events): Declare.
3901
56cf4bed
PA
39022015-11-30 Pedro Alves <palves@redhat.com>
3903
3904 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
3905 the thread's last_resume_kind was resume_stop.
3906
500c1d85
PA
39072015-11-30 Pedro Alves <palves@redhat.com>
3908
3909 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
3910 before returning.
3911
de979965
PA
39122015-11-30 Pedro Alves <palves@redhat.com>
3913
3914 * server.c (handle_v_requests): Handle vCtrlC.
3915
34c65914
PA
39162015-11-30 Pedro Alves <palves@redhat.com>
3917
3918 * gdbthread.h (find_any_thread_of_pid): Declare.
3919 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
3920 functions.
3921 * server.c (handle_query): If current_thread is NULL, look for
3922 another thread of the selected process.
3923
79efa585 39242015-11-26 Daniel Colascione <dancol@dancol.org>
01a49af8 3925 Simon Marchi <simon.marchi@ericsson.com>
79efa585
SM
3926
3927 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
3928 * server.c (handle_qxfer_threads_worker): Refactor to include thread
3929 name in reply.
3930 * target.h (struct target_ops) <thread_name>: New field.
3931 (target_thread_name): New macro.
3932
80d82c19
JB
39332015-11-23 Joel Brobecker <brobecker@adacore.com>
3934
3935 * regcache.h (regcache_invalidate_pid): Add declaration.
3936 * regcache.c (regcache_invalidate_pid): New function, extracted
3937 from regcache_invalidate.
3938 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
3939 Add trivial documentation comment.
3940 * lynx-low.c: Use regcache_invalidate_pid instead of
3941 regcache_invalidate.
3942
64da5dd5
JB
39432015-11-23 Joel Brobecker <brobecker@adacore.com>
3944
3945 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
3946 and Elf64_auxv_t if the target is Android.
3947
37ce4055
DE
39482015-11-22 Doug Evans <xdje42@gmail.com>
3949
3950 * target.h: #include <sys/types.h>.
3951
06e03fff
PA
39522015-11-19 Pedro Alves <palves@redhat.com>
3953
3954 * linux-low.c (linux_process_qsupported): Change prototype.
3955 Adjust.
3956 * linux-low.h (struct linux_target_ops) <process_qsupported>:
3957 Change prototype.
3958 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
3959 and adjust to loop over all features.
3960 * server.c (handle_query) <qSupported>: Adjust to call
3961 target_process_qsupported once, passing it a vector of unprocessed
3962 features.
3963 * target.h (struct target_ops) <process_qsupported>: Change
3964 prototype.
3965 (target_process_qsupported): Adjust.
3966
9a084706
PA
39672015-11-19 Pedro Alves <palves@redhat.com>
3968
3969 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
3970 mode.
3971 * configure: Regenerate.
3972
dad44a1f
PA
39732015-11-19 Pedro Alves <palves@redhat.com>
3974
3975 * configure: Regenerate.
3976
231c0592
YQ
39772015-11-19 Yao Qi <yao.qi@linaro.org>
3978
3979 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
3980 type to uint32_t.
3981
6c1c9a8b
YQ
39822015-11-19 Yao Qi <yao.qi@linaro.org>
3983
3984 * linux-aarch64-low.c (enum aarch64_operand_type): New.
3985 (struct aarch64_operand): Move enum out.
3986
9caa3311
YQ
39872015-11-19 Yao Qi <yao.qi@linaro.org>
3988
3989 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
3990 struct user_fpsimd_state *.
3991 (aarch64_store_fpregset): Likewise.
3992
6a69a054
YQ
39932015-11-19 Yao Qi <yao.qi@linaro.org>
3994
3995 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
3996 struct user_pt_regs *.
3997 (aarch64_store_gregset): Likewise.
3998
1798301e
PA
39992015-11-18 Pedro Alves <palves@redhat.com>
4000
4001 * Makefile.in (all_object_files): Add $IPA_OBJS.
4002
ce7715e2
PA
40032015-11-17 Pedro Alves <palves@redhat.com>
4004
4005 * win32-low.c (win32_resume): Use gdb_signal_from_host,
4006 GDB_SIGNAL_0 and gdb_signal_to_string.
4007
c0879059
PA
40082015-11-17 Pedro Alves <palves@redhat.com>
4009
4010 * win32-low.c (handle_output_debug_string): Remove parameter.
4011 (win32_kill): Remove our_status local and adjust call to
4012 handle_output_debug_string.
4013 (get_child_debug_event): Adjust call to
4014 handle_output_debug_string.
4015
1996e237
SM
40162015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4017
4018 * linux-mips-low.c (mips_fill_gregset): Add cast.
4019 (mips_store_gregset): Likewise.
4020 (mips_fill_fpregset): Likewise.
4021 (mips_store_fpregset): Likewise.
4022
cbec665b
SM
40232015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4024
4025 * linux-mips-low.c (mips_add_watchpoint): Rename private to
4026 priv.
4027
eb3e3c67
SM
40282015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4029
4030 * linux-mips-low.c (mips_linux_new_thread): Change type of
4031 watch_type to enum target_hw_bp_type.
4032
171de4b8
SM
40332015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4034
4035 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
4036 Change return type to arm_hwbp_type.
4037
04248ead
SM
40382015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4039
4040 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
4041 (arm_store_gregset): Likewise.
4042 * linux-arm-low.c (arm_get_hwcap): Likewise.
4043 (arm_read_description): Likewise.
4044
04b3479c
SM
40452015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4046
4047 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
4048
2bc84e8a
SM
40492015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4050
4051 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
4052 (ppc_fill_vsxregset): Likewise.
4053 (ppc_store_vsxregset): Likewise.
4054 (ppc_fill_vrregset): Likewise.
4055 (ppc_store_vrregset): Likewise.
4056 (ppc_fill_evrregset): Likewise.
4057 (ppc_store_evrregset): Likewise.
4058
e6c5bb05
SM
40592015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4060
4061 * linux-ppc-low.c (ppc_usrregs_info): Remove
4062 forward-declaration.
4063 (ppc_arch_setup): Move lower in file.
4064
7ea45d72
SM
40652015-10-30 Simon Marchi <simon.marchi@ericsson.com>
4066
4067 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
4068 (ps_pdwrite): Likewise.
4069
69291610
HW
40702015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
4071
4072 * linux-arm-low.c (arm_new_thread): Move pointer dereference
4073 to after assert checks.
4074
b42945fd
SM
40752015-10-29 Simon Marchi <simon.marchi@ericsson.com>
4076
4077 * proc-service.c (ps_pdread): Add/adjust casts.
4078 (ps_pdwrite): Add/adjust casts.
4079
d6f85c84
SM
40802015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
4081
4082 * server.c (handle_search_memory_1): Cast return value of
4083 memmem.
4084
f98cd059
SM
40852015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
4086
4087 * server.c (write_qxfer_response): Change type of data to
4088 gdb_byte *.
4089
d2412fa5
PA
40902015-10-29 Pedro Alves <palves@redhat.com>
4091
4092 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
4093
c17414a2
PA
40942015-10-29 Pedro Alves <palves@redhat.com>
4095
4096 * tracepoint.c (clear_installed_tracepoints): Add casts.
4097
e053fbc4
PA
40982015-10-29 Pedro Alves <palves@redhat.com>
4099
4100 * server.c (handle_v_cont, process_serial_event): Add enum
4101 gdb_signal casts to signal parsing code.
4102
add67df8
PA
41032015-10-29 Pedro Alves <palves@redhat.com>
4104
4105 * linux-low.h (NULL_REGSET): Define.
4106 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
4107 * linux-arm-low.c (arm_regsets): Likewise.
4108 * linux-crisv32-low.c (cris_regsets): Likewise.
4109 * linux-m68k-low.c (m68k_regsets): Likewise.
4110 * linux-mips-low.c (mips_regsets): Likewise.
4111 * linux-nios2-low.c (nios2_regsets): Likewise.
4112 * linux-ppc-low.c (ppc_regsets): Likewise.
4113 * linux-s390-low.c (s390_regsets): Likewise.
4114 * linux-sh-low.c (sh_regsets): Likewise.
4115 * linux-sparc-low.c (sparc_regsets): Likewise.
4116 * linux-tic6x-low.c (tic6x_regsets): Likewise.
4117 * linux-tile-low.c (tile_regsets): Likewise.
4118 * linux-x86-low.c (x86_regsets): Likewise.
4119 * linux-xtensa-low.c (xtensa_regsets): Likewise.
4120
50bc912a
PA
41212015-10-29 Pedro Alves <palves@redhat.com>
4122
4123 * linux-low.h (NULL_REGSET): Define.
4124 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
4125 * linux-arm-low.c (arm_regsets): Likewise.
4126 * linux-crisv32-low.c (cris_regsets): Likewise.
4127 * linux-m68k-low.c (m68k_regsets): Likewise.
4128 * linux-mips-low.c (mips_regsets): Likewise.
4129 * linux-nios2-low.c (nios2_regsets): Likewise.
4130 * linux-ppc-low.c (ppc_regsets): Likewise.
4131 * linux-s390-low.c (s390_regsets): Likewise.
4132 * linux-sh-low.c (sh_regsets): Likewise.
4133 * linux-sparc-low.c (sparc_regsets): Likewise.
4134 * linux-tic6x-low.c (tic6x_regsets): Likewise.
4135 * linux-tile-low.c (tile_regsets): Likewise.
4136 * linux-x86-low.c (x86_regsets): Likewise.
4137 * linux-xtensa-low.c (xtensa_regsets): Likewise.
4138
682b2546
DE
41392015-10-26 Doug Evans <dje@google.com>
4140
4141 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
4142
963843d4
DE
41432015-10-26 Doug Evans <dje@google.com>
4144
4145 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
4146
d41401ac
DE
41472015-10-26 Doug Evans <dje@google.com>
4148
4149 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
4150 for debug_printf.
4151 (attach_thread, find_new_threads_callback): Ditto.
4152
3db28855
AT
41532015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
4154
4155 * mem-break.h (set_breakpoint_data): Remove.
4156
fb78e89c
AT
41572015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
4158
4159 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
4160 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
4161 (initialize_low): Remove set_breakpoint_data call.
4162 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
4163 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
4164 (initialize_low): Remove set_breakpoint_data call.
4165 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
4166 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
4167 (initialize_low): Remove set_breakpoint_data call.
4168
2e6ee069
AT
41692015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
4170
4171 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
4172 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
4173 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
4174 * target.h (target_breakpoint_kind_from_pc): New macro.
4175
1652a986
AT
41762015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
4177
4178 * linux-low.c (default_breakpoint_kind_from_pc): New function.
4179 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
4180 the default breakpoint kind.
4181
abeead09
AT
41822015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4183
4184 * linux-arm-low.c (arm_supports_z_point_type): Add software
4185 breakpoint support.
4186
b0b4b501
AT
41872015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4188
4189 * linux-arm-low.c: Refactor breakpoint definitions.
4190 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
4191 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
4192
8689682c
AT
41932015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4194
4195 * Makefile.in: Add arm.c/o.
4196 * configure.srv: Likewise.
4197 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
4198 (arm_breakpoint_kind_from_pc): New function.
4199 (arm_sw_breakpoint_from_kind): Return proper kind.
4200 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
4201
27165294
AT
42022015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4203
4204 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
4205 removal.
4206 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
4207 (struct raw_breakpoint) <size>: Remove.
4208 (struct raw_breakpoint) <kind>: Add.
4209 (bp_size): New function.
4210 (bp_opcode): Likewise.
4211 (find_raw_breakpoint_at): Adjust for kind.
4212 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
4213 (remove_memory_breakpoint): Adjust for kind call bp_size.
4214 (set_raw_breakpoint_at): Adjust for kind.
4215 (set_breakpoint): Likewise.
4216 (set_breakpoint_at): Call breakpoint_kind_from_pc.
4217 (delete_raw_breakpoint): Adjust for kind.
4218 (delete_breakpoint): Likewise.
4219 (find_gdb_breakpoint): Likewise.
4220 (set_gdb_breakpoint_1): Likewise.
4221 (set_gdb_breakpoint): Likewise.
4222 (delete_gdb_breakpoint_1): Likewise.
4223 (delete_gdb_breakpoint): Likewise.
4224 (uninsert_raw_breakpoint): Likewise.
4225 (reinsert_raw_breakpoint): Likewise.
4226 (set_breakpoint_data): Remove.
4227 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
4228 (check_mem_read): Adjust for kind call bp_size.
4229 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
4230 (clone_one_breakpoint): Adjust for kind.
4231 * mem-break.h (set_gdb_breakpoint): Likewise.
4232 (delete_gdb_breakpoint): Likewise.
4233 * server.c (process_serial_event): Likewise.
4234
dd373349
AT
42352015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4236
4237 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
4238 (struct linux_target_ops) <breakpoint>: Remove.
4239 (struct linux_target_ops) <breakpoint_len>: Remove.
4240 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4241 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4242 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
4243 (arm_sw_breakpoint_from_kind): New function.
4244 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
4245 (struct linux_target_ops) <breakpoint>: Remove.
4246 (struct linux_target_ops) <breakpoint_len>: Remove.
4247 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4248 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4249 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
4250 (struct linux_target_ops) <breakpoint>: Remove.
4251 (struct linux_target_ops) <breakpoint_len>: Remove.
4252 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4253 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4254 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
4255 (struct linux_target_ops) <breakpoint>: Remove.
4256 (struct linux_target_ops) <breakpoint_len>: Remove.
4257 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4258 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4259 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
4260 and sw_breakpoint_from_kind to increment the pc.
4261 (linux_breakpoint_kind_from_pc): New function.
4262 (linux_sw_breakpoint_from_kind): New function.
4263 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
4264 (initialize_low): Call breakpoint_kind_from_pc and
4265 sw_breakpoint_from_kind to replace breakpoint_data/len.
4266 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
4267 New field.
4268 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
4269 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
4270 (struct linux_target_ops) <breakpoint>: Remove.
4271 (struct linux_target_ops) <breakpoint_len>: Remove.
4272 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4273 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4274 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
4275 (struct linux_target_ops) <breakpoint>: Remove.
4276 (struct linux_target_ops) <breakpoint_len>: Remove.
4277 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4278 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4279 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
4280 (struct linux_target_ops) <breakpoint>: Remove.
4281 (struct linux_target_ops) <breakpoint_len>: Remove.
4282 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4283 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4284 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
4285 (struct linux_target_ops) <breakpoint>: Remove.
4286 (struct linux_target_ops) <breakpoint_len>: Remove.
4287 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4288 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4289 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
4290 (struct linux_target_ops) <breakpoint>: Remove.
4291 (struct linux_target_ops) <breakpoint_len>: Remove.
4292 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4293 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4294 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
4295 (struct linux_target_ops) <breakpoint>: Remove.
4296 (struct linux_target_ops) <breakpoint_len>: Remove.
4297 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4298 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4299 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
4300 (struct linux_target_ops) <breakpoint>: Remove.
4301 (struct linux_target_ops) <breakpoint_len>: Remove.
4302 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4303 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4304 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
4305 (struct linux_target_ops) <breakpoint>: Remove.
4306 (struct linux_target_ops) <breakpoint_len>: Remove.
4307 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4308 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4309 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
4310 (struct linux_target_ops) <breakpoint>: Remove.
4311 (struct linux_target_ops) <breakpoint_len>: Remove.
4312 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4313 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4314 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
4315 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
4316 (struct linux_target_ops) <breakpoint>: Remove.
4317 (struct linux_target_ops) <breakpoint_len>: Remove.
4318 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4319 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4320 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
4321 (struct linux_target_ops) <breakpoint>: Remove.
4322 (struct linux_target_ops) <breakpoint_len>: Remove.
4323 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4324 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4325
4cd98a19
AT
43262015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4327
4328 * linux-cris-low.c (cris_get_pc): Remove void arg.
4329
774ee6d2
AR
43302015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
4331
4332 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
4333 variable name.
4334
833dcd29
AR
43352015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
4336
4337 * inferiors.c (thread_pid_matches_callback): New function.
4338 (find_thread_process): New function.
4339 (remove_thread): Reset current_thread.
4340 (remove_process): Assert threads have been removed first.
4341
8d689ee5
YQ
43422015-10-15 Yao Qi <yao.qi@linaro.org>
4343
4344 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
4345 if it is 3.
4346 (aarch64_remove_point): Likewise.
4347 * regcache.c (regcache_register_size): New function.
4348
1c2e1515
YQ
43492015-10-12 Yao Qi <yao.qi@linaro.org>
4350
4351 * linux-aarch64-low.c: Update all callers as emit_load_store
4352 is renamed to aarch64_emit_load_store.
4353
e1c587c3
YQ
43542015-10-12 Yao Qi <yao.qi@linaro.org>
4355
4356 * linux-aarch64-low.c: Update all callers of function renaming
4357 from emit_insn to aarch64_emit_insn.
4358
b6542f81
YQ
43592015-10-12 Yao Qi <yao.qi@linaro.org>
4360
4361 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
4362 arch/aarch64-insn.h.
4363 (struct aarch64_memory_operand): Likewise.
4364 (ENCODE): Likewise.
4365 (emit_insn): Move to arch/aarch64-insn.c.
4366 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
4367 (emit_load_store): Move to arch/aarch64-insn.c.
4368 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
4369 (can_encode_int32): Remove.
4370
246994ce
YQ
43712015-10-12 Yao Qi <yao.qi@linaro.org>
4372
4373 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
4374 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
4375 (aarch64_relocate_instruction): Likewise.
4376 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
4377 (struct aarch64_insn_visitor): Likewise.
4378
0badd99f
YQ
43792015-10-12 Yao Qi <yao.qi@linaro.org>
4380
4381 * linux-aarch64-low.c (struct aarch64_insn_data): New.
4382 (struct aarch64_insn_visitor): New.
4383 (struct aarch64_insn_relocation_data): New.
4384 (aarch64_ftrace_insn_reloc_b): New function.
4385 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
4386 (aarch64_ftrace_insn_reloc_cb): Likewise.
4387 (aarch64_ftrace_insn_reloc_tb): Likewise.
4388 (aarch64_ftrace_insn_reloc_adr): Likewise.
4389 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
4390 (aarch64_ftrace_insn_reloc_others): Likewise.
4391 (visitor): New.
4392 (aarch64_relocate_instruction): Use visitor.
4393
dfaffe9d
YQ
43942015-10-12 Yao Qi <yao.qi@linaro.org>
4395
4396 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
4397 int. Add argument buf.
4398 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
4399 aarch64_relocate_instruction.
4400
70b439f0
YQ
44012015-10-12 Yao Qi <yao.qi@linaro.org>
4402
4403 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
4404 argument insn. Remove local variable insn. Don't call
4405 target_read_uint32.
4406 (aarch64_install_fast_tracepoint_jump_pad): Call
4407 target_read_uint32.
4408
7781c06f
YQ
44092015-09-30 Yao Qi <yao.qi@linaro.org>
4410
4411 * linux-aarch64-low.c (emit_movk): Shorten a long line.
4412 (emit_load_store_pair): Likewise.
4413
9a3c8263
SM
44142015-09-25 Simon Marchi <simon.marchi@ericsson.com>
4415
4416 * dll.c (match_dll): Add cast(s).
4417 (unloaded_dll): Likewise.
4418 * linux-low.c (second_thread_of_pid_p): Likewise.
4419 (delete_lwp_callback): Likewise.
4420 (count_events_callback): Likewise.
4421 (select_event_lwp_callback): Likewise.
4422 (linux_set_resume_request): Likewise.
4423 * server.c (accumulate_file_name_length): Likewise.
4424 (emit_dll_description): Likewise.
4425 (handle_qxfer_threads_worker): Likewise.
4426 (visit_actioned_threads): Likewise.
4427 * thread-db.c (any_thread_of): Likewise.
4428 * tracepoint.c (same_process_p): Likewise.
4429 (match_blocktype): Likewise.
4430 (build_traceframe_info_xml): Likewise.
4431
224c3ddb
SM
44322015-09-25 Simon Marchi <simon.marchi@ericsson.com>
4433
4434 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
4435 assignment.
4436 (gdb_unparse_agent_expr): Likewise.
4437 * hostio.c (require_data): Likewise.
4438 (handle_pread): Likewise.
4439 * linux-low.c (disable_regset): Likewise.
4440 (fetch_register): Likewise.
4441 (store_register): Likewise.
4442 (get_dynamic): Likewise.
4443 (linux_qxfer_libraries_svr4): Likewise.
4444 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
4445 (set_fast_tracepoint_jump): Likewise.
4446 (uninsert_fast_tracepoint_jumps_at): Likewise.
4447 (reinsert_fast_tracepoint_jumps_at): Likewise.
4448 (validate_inserted_breakpoint): Likewise.
4449 (clone_agent_expr): Likewise.
4450 * regcache.c (init_register_cache): Likewise.
4451 * remote-utils.c (putpkt_binary_1): Likewise.
4452 (decode_M_packet): Likewise.
4453 (decode_X_packet): Likewise.
4454 (look_up_one_symbol): Likewise.
4455 (relocate_instruction): Likewise.
4456 (monitor_output): Likewise.
4457 * server.c (handle_search_memory): Likewise.
4458 (handle_qxfer_exec_file): Likewise.
4459 (handle_qxfer_libraries): Likewise.
4460 (handle_qxfer): Likewise.
4461 (handle_query): Likewise.
4462 (handle_v_cont): Likewise.
4463 (handle_v_run): Likewise.
4464 (captured_main): Likewise.
4465 * target.c (write_inferior_memory): Likewise.
4466 * thread-db.c (try_thread_db_load_from_dir): Likewise.
4467 * tracepoint.c (init_trace_buffer): Likewise.
4468 (add_tracepoint_action): Likewise.
4469 (add_traceframe): Likewise.
4470 (add_traceframe_block): Likewise.
4471 (cmd_qtdpsrc): Likewise.
4472 (cmd_qtdv): Likewise.
4473 (cmd_qtstatus): Likewise.
4474 (response_source): Likewise.
4475 (response_tsv): Likewise.
4476 (cmd_qtnotes): Likewise.
4477 (gdb_collect): Likewise.
4478 (initialize_tracepoint): Likewise.
4479
afbe19f8
PL
44802015-09-21 Pierre Langlois <pierre.langlois@arm.com>
4481
4482 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
4483 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
4484 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
4485 <NOP>: New.
4486 (enum aarch64_condition_codes): New enum.
4487 (w0): New static global.
4488 (fp): Likewise.
4489 (lr): Likewise.
4490 (struct aarch64_memory_operand) <type>: New
4491 MEMORY_OPERAND_POSTINDEX type.
4492 (postindex_memory_operand): New helper function.
4493 (emit_ret): New function.
4494 (emit_load_store_pair): New function, factored out of emit_stp
4495 with support for MEMORY_OPERAND_POSTINDEX.
4496 (emit_stp): Rewrite using emit_load_store_pair.
4497 (emit_ldp): New function.
4498 (emit_load_store): Likewise.
4499 (emit_ldr): Mention post-index instruction in comment.
4500 (emit_ldrh): New function.
4501 (emit_ldrb): New function.
4502 (emit_ldrsw): Mention post-index instruction in comment.
4503 (emit_str): Likewise.
4504 (emit_subs): New function.
4505 (emit_cmp): Likewise.
4506 (emit_and): Likewise.
4507 (emit_orr): Likewise.
4508 (emit_orn): Likewise.
4509 (emit_eor): Likewise.
4510 (emit_mvn): Likewise.
4511 (emit_lslv): Likewise.
4512 (emit_lsrv): Likewise.
4513 (emit_asrv): Likewise.
4514 (emit_mul): Likewise.
4515 (emit_sbfm): Likewise.
4516 (emit_sbfx): Likewise.
4517 (emit_ubfm): Likewise.
4518 (emit_ubfx): Likewise.
4519 (emit_csinc): Likewise.
4520 (emit_cset): Likewise.
4521 (emit_nop): Likewise.
4522 (emit_ops_insns): New helper function.
4523 (emit_pop): Likewise.
4524 (emit_push): Likewise.
4525 (aarch64_emit_prologue): New function.
4526 (aarch64_emit_epilogue): Likewise.
4527 (aarch64_emit_add): Likewise.
4528 (aarch64_emit_sub): Likewise.
4529 (aarch64_emit_mul): Likewise.
4530 (aarch64_emit_lsh): Likewise.
4531 (aarch64_emit_rsh_signed): Likewise.
4532 (aarch64_emit_rsh_unsigned): Likewise.
4533 (aarch64_emit_ext): Likewise.
4534 (aarch64_emit_log_not): Likewise.
4535 (aarch64_emit_bit_and): Likewise.
4536 (aarch64_emit_bit_or): Likewise.
4537 (aarch64_emit_bit_xor): Likewise.
4538 (aarch64_emit_bit_not): Likewise.
4539 (aarch64_emit_equal): Likewise.
4540 (aarch64_emit_less_signed): Likewise.
4541 (aarch64_emit_less_unsigned): Likewise.
4542 (aarch64_emit_ref): Likewise.
4543 (aarch64_emit_if_goto): Likewise.
4544 (aarch64_emit_goto): Likewise.
4545 (aarch64_write_goto_address): Likewise.
4546 (aarch64_emit_const): Likewise.
4547 (aarch64_emit_call): Likewise.
4548 (aarch64_emit_reg): Likewise.
4549 (aarch64_emit_pop): Likewise.
4550 (aarch64_emit_stack_flush): Likewise.
4551 (aarch64_emit_zero_ext): Likewise.
4552 (aarch64_emit_swap): Likewise.
4553 (aarch64_emit_stack_adjust): Likewise.
4554 (aarch64_emit_int_call_1): Likewise.
4555 (aarch64_emit_void_call_2): Likewise.
4556 (aarch64_emit_eq_goto): Likewise.
4557 (aarch64_emit_ne_goto): Likewise.
4558 (aarch64_emit_lt_goto): Likewise.
4559 (aarch64_emit_le_goto): Likewise.
4560 (aarch64_emit_gt_goto): Likewise.
4561 (aarch64_emit_ge_got): Likewise.
4562 (aarch64_emit_ops_impl): New static global variable.
4563 (aarch64_emit_ops): New target function, return
4564 &aarch64_emit_ops_impl.
4565 (struct linux_target_ops): Install it.
4566
bb903df0
PL
45672015-09-21 Pierre Langlois <pierre.langlois@arm.com>
4568
4569 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
4570 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
4571 aarch64-ipa.o.
4572 * linux-aarch64-ipa.c: New file.
4573 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
4574 and endian.h.
4575 (aarch64_get_thread_area): New target method.
4576 (extract_signed_bitfield): New helper function.
4577 (aarch64_decode_ldr_literal): New function.
4578 (enum aarch64_opcodes): New enum.
4579 (struct aarch64_register): New struct.
4580 (struct aarch64_operand): New struct.
4581 (x0): New static global.
4582 (x1): Likewise.
4583 (x2): Likewise.
4584 (x3): Likewise.
4585 (x4): Likewise.
4586 (w2): Likewise.
4587 (ip0): Likewise.
4588 (sp): Likewise.
4589 (xzr): Likewise.
4590 (aarch64_register): New helper function.
4591 (register_operand): Likewise.
4592 (immediate_operand): Likewise.
4593 (struct aarch64_memory_operand): New struct.
4594 (offset_memory_operand): New helper function.
4595 (preindex_memory_operand): Likewise.
4596 (enum aarch64_system_control_registers): New enum.
4597 (ENCODE): New macro.
4598 (emit_insn): New helper function.
4599 (emit_b): New function.
4600 (emit_bcond): Likewise.
4601 (emit_cb): Likewise.
4602 (emit_tb): Likewise.
4603 (emit_blr): Likewise.
4604 (emit_stp): Likewise.
4605 (emit_ldp_q_offset): Likewise.
4606 (emit_stp_q_offset): Likewise.
4607 (emit_load_store): Likewise.
4608 (emit_ldr): Likewise.
4609 (emit_ldrsw): Likewise.
4610 (emit_str): Likewise.
4611 (emit_ldaxr): Likewise.
4612 (emit_stxr): Likewise.
4613 (emit_stlr): Likewise.
4614 (emit_data_processing_reg): Likewise.
4615 (emit_data_processing): Likewise.
4616 (emit_add): Likewise.
4617 (emit_sub): Likewise.
4618 (emit_mov): Likewise.
4619 (emit_movk): Likewise.
4620 (emit_mov_addr): Likewise.
4621 (emit_mrs): Likewise.
4622 (emit_msr): Likewise.
4623 (emit_sevl): Likewise.
4624 (emit_wfe): Likewise.
4625 (append_insns): Likewise.
4626 (can_encode_int32_in): New helper function.
4627 (aarch64_relocate_instruction): New function.
4628 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
4629 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
4630 (struct linux_target_ops): Install aarch64_get_thread_area,
4631 aarch64_install_fast_tracepoint_jump_pad and
4632 aarch64_get_min_fast_tracepoint_insn_len.
4633
787749ea
PL
46342015-09-21 Pierre Langlois <pierre.langlois@arm.com>
4635
4636 * Makefile.in (aarch64-insn.o): New rule.
4637 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
4638
9812b2e6
YQ
46392015-09-21 Yao Qi <yao.qi@linaro.org>
4640
4641 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
4642
18fe412b
YQ
46432015-09-21 Yao Qi <yao.qi@linaro.org>
4644
4645 * tracepoint.c (max_jump_pad_size): Remove.
4646
a0cc84cd
YQ
46472015-09-18 Yao Qi <yao.qi@linaro.org>
4648
4649 * linux-aarch64-low.c: Don't include sys/uio.h.
4650 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
4651
d78908cf
WW
46522015-09-16 Wei-cheng Wang <cole945@gmail.com>
4653
4654 * tracepoint.c (eval_result_type): Change prototype.
4655 (condition_true_at_tracepoint): Fix argument to compiled_cond.
4656
d57e0d50
PA
46572015-09-15 Pedro Alves <palves@redhat.com>
4658
4659 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
4660 Check whether to report exec events instead of checking whether
4661 multiprocess is enabled.
4662
5a676acc
PA
46632015-09-15 Pedro Alves <palves@redhat.com>
4664
4665 PR remote/18965
4666 * remote-utils.c (prepare_resume_reply): Merge
4667 TARGET_WAITKIND_VFORK_DONE switch case with the
4668 TARGET_WAITKIND_FORKED case.
4669
7c5d0fad
YQ
46702015-09-15 Yao Qi <yao.qi@linaro.org>
4671
4672 * server.c (handle_query): Check string comparison using
4673 "else if" instead of "if".
4674
750ce8d1
YQ
46752015-09-15 Yao Qi <yao.qi@linaro.org>
4676
4677 * server.c (vCont_supported): New global variable.
4678 (handle_query): Set vCont_supported to 1 if "vContSupported+"
4679 matches. Append ";vContSupported+" to own_buf.
4680 (handle_v_requests): Append ";s;S" to own_buf if target supports
4681 hardware single step or vCont_supported is false.
4682 (capture_main): Set vCont_supported to zero.
4683
70b90b91
YQ
46842015-09-15 Yao Qi <yao.qi@linaro.org>
4685
4686 * linux-low.c (linux_supports_conditional_breakpoints): Rename
4687 it to ...
4688 (linux_supports_hardware_single_step): ... New function.
4689 (linux_target_ops): Update.
4690 * lynx-low.c (lynx_target_ops): Set field
4691 supports_hardware_single_step to target_can_do_hardware_single_step.
4692 * nto-low.c (nto_target_ops): Likewise.
4693 * spu-low.c (spu_target_ops): Likewise.
4694 * win32-low.c (win32_target_ops): Likewise.
4695 * target.c (target_can_do_hardware_single_step): New function.
4696 * target.h (struct target_ops) <supports_conditional_breakpoints>:
4697 Remove. <supports_hardware_single_step>: New field.
4698 (target_supports_conditional_breakpoints): Remove.
4699 (target_supports_hardware_single_step): New macro.
4700 (target_can_do_hardware_single_step): Declare.
4701 * server.c (handle_query): Use target_supports_hardware_single_step
4702 instead of target_supports_conditional_breakpoints.
4703
ade90bde
YQ
47042015-09-15 Yao Qi <yao.qi@linaro.org>
4705
4706 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
4707 function.
4708 (struct linux_target_ops the_low_target): Install
4709 aarch64_linux_siginfo_fixup.
4710
94585166
DB
47112015-09-11 Don Breazeal <donb@codesourcery.com>
4712 Luis Machado <lgustavo@codesourcery.com>
4713
4714 * linux-low.c (linux_mourn): Static declaration.
4715 (linux_arch_setup): Move in front of
4716 handle_extended_wait.
4717 (linux_arch_setup_thread): New function.
4718 (handle_extended_wait): Handle exec events. Call
4719 linux_arch_setup_thread. Make event_lwp argument a
4720 pointer-to-a-pointer.
4721 (check_zombie_leaders): Do not check stopped threads.
4722 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
4723 (linux_low_filter_event): Add lwp and thread for exec'ing
4724 non-leader thread if leader thread has been deleted.
4725 Refactor code into linux_arch_setup_thread and call it.
4726 Pass child lwp pointer by reference to handle_extended_wait.
4727 (linux_wait_for_event_filtered): Update comment.
4728 (linux_wait_1): Prevent clobbering exec event status.
4729 (linux_supports_exec_events): New function.
4730 (linux_target_ops) <supports_exec_events>: Initialize new member.
4731 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
4732 new member.
4733 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
4734 * server.c (report_exec_events): New global variable.
4735 (handle_query): Handle qSupported query for exec-events feature.
4736 (captured_main): Initialize report_exec_events.
4737 * server.h (report_exec_events): Declare new global variable.
4738 * target.h (struct target_ops) <supports_exec_events>: New
4739 member.
4740 (target_supports_exec_events): New macro.
4741 * win32-low.c (win32_target_ops) <supports_exec_events>:
4742 Initialize new member.
4743
0568462b
MM
47442015-09-09 Markus Metzger <markus.t.metzger@intel.com>
4745
4746 * linux-low.c (linux_low_enable_btrace): Remove.
4747 (linux_target_ops): Replace linux_low_enable_btrace with
4748 linux_enable_btrace.
4749
39edd165
YQ
47502015-09-03 Yao Qi <yao.qi@linaro.org>
4751
4752 * linux-aarch64-low.c (aarch64_insert_point): Call
4753 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
4754 returns true.
4755
1db33b5a
UW
47562015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
4757
4758 * linux-low.c (check_stopped_by_breakpoint): Use
4759 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
4760
ab290430
PA
47612015-08-27 Pedro Alves <palves@redhat.com>
4762
4763 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
4764
8d749320
SM
47652015-08-26 Simon Marchi <simon.marchi@ericsson.com>
4766
6711b7f8
SM
4767 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
4768 the XNEW-family equivalent.
8d749320
SM
4769 (compile_bytecodes): Likewise.
4770 * dll.c (loaded_dll): Likewise.
4771 * event-loop.c (append_callback_event): Likewise.
4772 (create_file_handler): Likewise.
4773 (create_file_event): Likewise.
4774 * hostio.c (handle_open): Likewise.
4775 * inferiors.c (add_thread): Likewise.
4776 (add_process): Likewise.
4777 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
4778 * linux-arm-low.c (arm_new_process): Likewise.
4779 (arm_new_thread): Likewise.
4780 * linux-low.c (add_to_pid_list): Likewise.
4781 (linux_add_process): Likewise.
4782 (handle_extended_wait): Likewise.
4783 (add_lwp): Likewise.
4784 (enqueue_one_deferred_signal): Likewise.
4785 (enqueue_pending_signal): Likewise.
4786 (linux_resume_one_lwp_throw): Likewise.
4787 (linux_resume_one_thread): Likewise.
4788 (linux_read_memory): Likewise.
4789 (linux_write_memory): Likewise.
4790 * linux-mips-low.c (mips_linux_new_process): Likewise.
4791 (mips_linux_new_thread): Likewise.
4792 (mips_add_watchpoint): Likewise.
4793 * linux-x86-low.c (initialize_low_arch): Likewise.
4794 * lynx-low.c (lynx_add_process): Likewise.
4795 * mem-break.c (set_raw_breakpoint_at): Likewise.
4796 (set_breakpoint): Likewise.
4797 (add_condition_to_breakpoint): Likewise.
4798 (add_commands_to_breakpoint): Likewise.
4799 (clone_agent_expr): Likewise.
4800 (clone_one_breakpoint): Likewise.
4801 * regcache.c (new_register_cache): Likewise.
4802 * remote-utils.c (look_up_one_symbol): Likewise.
4803 * server.c (queue_stop_reply): Likewise.
4804 (start_inferior): Likewise.
4805 (queue_stop_reply_callback): Likewise.
4806 (handle_target_event): Likewise.
4807 * spu-low.c (fetch_ppc_memory): Likewise.
4808 (store_ppc_memory): Likewise.
4809 * target.c (set_target_ops): Likewise.
4810 * thread-db.c (thread_db_load_search): Likewise.
4811 (try_thread_db_load_1): Likewise.
4812 * tracepoint.c (add_tracepoint): Likewise.
4813 (add_tracepoint_action): Likewise.
4814 (create_trace_state_variable): Likewise.
4815 (cmd_qtdpsrc): Likewise.
4816 (cmd_qtro): Likewise.
4817 (add_while_stepping_state): Likewise.
4818 * win32-low.c (child_add_thread): Likewise.
4819 (get_image_name): Likewise.
4820
ed8b7b42
YQ
48212015-08-25 Yao Qi <yao.qi@linaro.org>
4822
4823 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
4824
db3cb7cb
YQ
48252015-08-25 Yao Qi <yao.qi@linaro.org>
4826
4827 * Makefile.in (aarch64-linux.o): New rule.
4828 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
4829 srv_tgtobj.
4830 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
4831 (aarch64_init_debug_reg_state): Make it extern.
4832 (aarch64_linux_prepare_to_resume): Remove.
4833
f6011a1c
YQ
48342015-08-25 Yao Qi <yao.qi@linaro.org>
4835
4836 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
4837 lwp_arch_private_info and ptid_of_lwp.
4838
88e2cf7e
YQ
48392015-08-25 Yao Qi <yao.qi@linaro.org>
4840
4841 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
4842 Find proc_info by find_process_pid. All callers updated.
4843
5e35436e
YQ
48442015-08-25 Yao Qi <yao.qi@linaro.org>
4845
4846 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
4847 Remove.
4848 (debug_reg_change_callback): Remove.
4849 (aarch64_notify_debug_reg_change): Remove.
4850
4a8a7965
YQ
48512015-08-25 Yao Qi <yao.qi@linaro.org>
4852
4853 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
4854 Call current_lwp_ptid.
4855
32a271ee
YQ
48562015-08-25 Yao Qi <yao.qi@linaro.org>
4857
4858 * linux-aarch64-low.c (debug_reg_change_callback): Use
4859 debug_printf.
4860
0d51c8d7
YQ
48612015-08-25 Yao Qi <yao.qi@linaro.org>
4862
4863 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
4864
31a43dd5
YQ
48652015-08-25 Yao Qi <yao.qi@linaro.org>
4866
4867 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
4868
8ee52567
YQ
48692015-08-25 Yao Qi <yao.qi@linaro.org>
4870
4871 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
4872 the code.
4873
ff3f0f45
YQ
48742015-08-25 Yao Qi <yao.qi@linaro.org>
4875
4876 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
4877 Remove.
4878 (debug_reg_change_callback): Remove argument entry and add argument
4879 lwp. Remove local variable thread. Don't print thread id in the
4880 debugging output. Don't check whether pid of thread equals to pid.
4881 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
4882 iterate_over_lwps instead find_inferior.
4883
3d40fbb5
PA
48842015-08-24 Pedro Alves <palves@redhat.com>
4885
4886 * inferiors.c (get_first_process): New function.
4887 * inferiors.h (get_first_process): New declaration.
4888 * remote-utils.c (read_ptid): Default to the first process in the
4889 list, instead of to the current thread's process.
4890
438e1e42
PA
48912015-08-24 Pedro Alves <palves@redhat.com>
4892
4893 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
4894 * event-loop.c: Likewise.
4895 * remote-utils.c: Likewise.
4896 * tracepoint.c: Likewise.
4897
a8c6d4fc
PA
48982015-08-24 Pedro Alves <palves@redhat.com>
4899
4900 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
4901 ptid_get_lwp.
4902
99b0bb12
PA
49032015-08-21 Pedro Alves <palves@redhat.com>
4904
4905 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
4906 instead of literal 1.
4907
f8904751
PA
49082015-08-21 Pedro Alves <palves@redhat.com>
4909
4910 * tdesc.c (default_description): Explicitly zero-initialize.
4911
465a859e
PA
49122015-08-21 Pedro Alves <palves@redhat.com>
4913
4914 PR gdb/18749
4915 * inferiors.c (remove_thread): Discard any pending stop reply for
4916 this thread.
4917 * server.c (remove_all_on_match_pid): Rename to ...
4918 (remove_all_on_match_ptid): ... this. Work with a filter ptid
4919 instead of a pid.
4920 (discard_queued_stop_replies): Change parameter to a ptid. Now
4921 extern.
4922 (handle_v_kill, kill_inferior_callback, captured_main)
4923 (process_serial_event): Adjust.
4924 * server.h (discard_queued_stop_replies): Declare.
4925
f0db101d
PA
49262015-08-21 Pedro Alves <palves@redhat.com>
4927
4928 * linux-low.c (wait_for_sigstop): Always switch to no thread
4929 selected if the previously current thread dies.
4930 * lynx-low.c (lynx_request_interrupt): Use the first thread's
4931 process instead of the current thread's.
4932 * remote-utils.c (input_interrupt): Don't check if there's no
4933 current thread.
4934 * server.c (gdb_read_memory, gdb_write_memory): If setting the
4935 current thread to the general thread fails, error out.
4936 (handle_qxfer_auxv, handle_qxfer_libraries)
4937 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
4938 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
4939 (handle_query): Check if there's a thread selected instead of
4940 checking whether there's any thread in the thread list.
4941 (handle_qxfer_threads, handle_qxfer_btrace)
4942 (handle_qxfer_btrace_conf): Don't error out early if there's no
4943 thread in the thread list.
4944 (handle_v_cont, myresume): Don't set the current thread to the
4945 continue thread.
4946 (process_serial_event) <Hg handling>: Also set thread_id if the
4947 previous general thread is still alive.
4948 (process_serial_event) <g/G handling>: If setting the current
4949 thread to the general thread fails, error out.
4950 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
4951 thread's lwp instead of the current thread's.
4952 * target.c (set_desired_thread): If the desired thread was not
4953 found, leave the current thread pointing to NULL. Return an int
4954 (boolean) indicating success.
4955 * target.h (set_desired_thread): Change return type to int.
4956
40045d91
MF
49572015-08-20 Max Filippov <jcmvbkbc@gmail.com>
4958
4959 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
4960 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
4961 #includes.
4962 (ps_get_thread_area): New function.
4963
45face3b
GB
49642015-08-19 Gary Benson <gbenson@redhat.com>
4965
4966 * hostio.c (handle_pread): Do not attempt to read more data
4967 than hostio_reply_with_data can fit in a packet.
4968
16d5f642
JB
49692015-08-18 Joel Brobecker <brobecker@adacore.com>
4970
4971 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
4972
a738da3a
MF
49732015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
4974
4975 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
4976
33ebda9d
PA
49772015-08-06 Pedro Alves <palves@redhat.com>
4978
4979 * tracepoint.c (expr_eval_result): Now an int.
4980
a44892be
PA
49812015-08-06 Pedro Alves <palves@redhat.com>
4982
4983 * gdbthread.h (struct regcache): Forward declare.
4984 (struct thread_info) <regcache_data>: Now a struct regcache
4985 pointer.
4986 * inferiors.c (inferior_regcache_data)
4987 (set_inferior_regcache_data): Now work with struct regcache
4988 pointers.
4989 * inferiors.h (struct regcache): Forward declare.
4990 (inferior_regcache_data, set_inferior_regcache_data): Now work
4991 with struct regcache pointers.
4992 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
4993 (free_register_cache_thread): Remove struct regcache pointer
4994 casts.
4995
608a1e46
PA
49962015-08-06 Pedro Alves <palves@redhat.com>
4997
4998 * server.c (captured_main): On error, print the exception message
4999 to stderr, and if run_once is set, throw a quit.
5000
f0ce0d3a
PA
50012015-08-06 Pedro Alves <palves@redhat.com>
5002
5003 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
5004 the current thread.
5005
bf47e248
PA
50062015-08-06 Pedro Alves <palves@redhat.com>
5007
5008 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
5009 reading beyond the passed in buffer length.
5010
b6b9ffcc
PL
50112015-08-06 Pierre Langlois <pierre.langlois@arm.com>
5012
5013 * tracepoint.c (symbol_list) <required>: Remove.
5014
863d01bd
PA
50152015-08-06 Pedro Alves <palves@redhat.com>
5016
5017 * linux-low.c (handle_extended_wait): Set the fork child's suspend
5018 count if stopping and suspending threads.
5019 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
5020 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
5021 (linux_detach): Complete an ongoing step-over.
5022 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
5023 throughout.
5024 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
5025 (linux_wait_1): If passing a signal to the inferior after
5026 finishing a step-over, unsuspend and re-resume all lwps. If we
5027 see a single-step event but the thread should be continuing, don't
5028 pass the trap to gdb.
5029 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
5030 internal_error instead of gdb_assert.
5031 (enqueue_pending_signal): New function.
5032 (check_ptrace_stopped_lwp_gone): Add debug output.
5033 (start_step_over): Use internal_error instead of gdb_assert.
5034 (complete_ongoing_step_over): New function.
5035 (linux_resume_one_thread): Don't resume a suspended thread.
5036 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
5037 it stepping.
5038
00db26fa
PA
50392015-08-06 Pedro Alves <palves@redhat.com>
5040
5041 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
5042 (linux_thread_alive): Use lwp_is_marked_dead.
5043 (extended_event_reported): Delete.
5044 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
5045 instead of extended_event_reported.
5046 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
5047 as well.
5048 (lwp_is_marked_dead): New function.
5049 (lwp_running): Use lwp_is_marked_dead.
5050 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
5051 comment.
5052
ad071a30
PA
50532015-08-06 Pedro Alves <palves@redhat.com>
5054
5055 * linux-low.c (linux_wait_1): Move fork event output out of the
5056 !report_to_gdb check. Pass event_child->waitstatus to
5057 target_waitstatus_to_string instead of ourstatus.
5058
524b57e6
YQ
50592015-08-04 Yao Qi <yao.qi@linaro.org>
5060
5061 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
5062 if current_thread is 32 bit.
5063
6085d6f6
YQ
50642015-08-04 Yao Qi <yao.qi@linaro.org>
5065
5066 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
5067 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
5068 * server.c (extended_protocol): Remove "static".
5069 * server.h (extended_protocol): Declare it.
5070
8a7e4587
YQ
50712015-08-04 Yao Qi <yao.qi@linaro.org>
5072
5073 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
5074 both aarch64 and aarch32.
5075 (aarch64_set_pc): Likewise.
5076
3b53ae99
YQ
50772015-08-04 Yao Qi <yao.qi@linaro.org>
5078
5079 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
5080 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
5081 arm-with-neon.xml to srv_xmlfiles.
5082 * linux-aarch64-low.c: Include linux-aarch32-low.h.
5083 (is_64bit_tdesc): New function.
5084 (aarch64_linux_read_description): New function.
5085 (aarch64_arch_setup): Call aarch64_linux_read_description.
5086 (regs_info): Rename to regs_info_aarch64.
5087 (aarch64_regs_info): Return right regs_info.
5088 (initialize_low_arch): Call initialize_low_arch_aarch32.
5089
bd9e6534
YQ
50902015-08-04 Yao Qi <yao.qi@linaro.org>
5091
5092 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
5093 * linux-aarch32-low.c: New file.
5094 * linux-aarch32-low.h: New file.
5095 * linux-arm-low.c (arm_fill_gregset): Move it to
5096 linux-aarch32-low.c.
5097 (arm_store_gregset): Likewise.
5098 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
5099 (arm_store_vfpregset): Call arm_store_vfpregset_num.
5100 (arm_arch_setup): Check if PTRACE_GETREGSET works.
5101 (regs_info): Rename to regs_info_arm.
5102 (arm_regs_info): Return regs_info_aarch32 if
5103 have_ptrace_getregset is 1 and target description is
5104 arm_with_neon or arm_with_vfpv3.
5105 (initialize_low_arch): Don't call init_registers_arm_with_neon.
5106 Call initialize_low_arch_aarch32 instead.
5107
ded48a5e
YQ
51082015-08-04 Yao Qi <yao.qi@linaro.org>
5109
5110 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
5111 * linux-low.c: ... here.
5112 * linux-low.h (have_ptrace_getregset): Declare it.
5113
96e9210f
PA
51142015-08-04 Pedro Alves <palves@redhat.com>
5115
5116 * thread-db.c (struct thread_db): Use new typedefs.
5117 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
5118 CHK calls.
5119 (disable_thread_event_reporting): Cast result of dlsym to
5120 destination function pointer type.
5121 (thread_db_mourn): Use td_ta_delete_ftype.
5122
af60a1ef
SL
51232015-08-03 Sandra Loosemore <sandra@codesourcery.com>
5124
5125 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
5126 arch variant.
5127 (CDX_BREAKPOINT): Define for R2.
5128 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
5129 (the_low_target): Add comments.
5130
e8b41681
YQ
51312015-07-30 Yao Qi <yao.qi@linaro.org>
5132
5133 * linux-arm-low.c (arm_hwcap): Remove it.
5134 (arm_read_description): New local variable arm_hwcap. Don't
5135 set arm_hwcap to zero.
5136
89abb039
YQ
51372015-07-30 Yao Qi <yao.qi@linaro.org>
5138
5139 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
5140 Use regcache->tdesc instead.
5141 (arm_store_wmmxregset): Likewise.
5142 (arm_fill_vfpregset): Likewise.
5143 (arm_store_vfpregset): Likewise.
5144
deca266c
YQ
51452015-07-30 Yao Qi <yao.qi@linaro.org>
5146
5147 * linux-arm-low.c: Include arch/arm.h.
5148 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
5149 (arm_store_gregset): Likewise.
5150
aa58a496
SM
51512015-07-29 Simon Marchi <simon.marchi@ericsson.com>
5152
5153 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
5154 ptrace's 4th parameter.
5155
50904b25
YQ
51562015-07-27 Yao Qi <yao.qi@linaro.org>
5157
5158 * configure.srv (case aarch64*-*-linux*): Don't set
5159 srv_linux_usrregs.
5160
5826e159
PA
51612015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
5162
5163 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
5164 sys/ptrace.h.
5165 * linux-arm-low.c: Likewise.
5166 * linux-cris-low.c: Likewise.
5167 * linux-crisv32-low.c: Likewise.
5168 * linux-low.c: Likewise.
5169 * linux-m68k-low.c: Likewise.
5170 * linux-mips-low.c: Likewise.
5171 * linux-nios2-low.c: Likewise.
5172 * linux-s390-low.c: Likewise.
5173 * linux-sparc-low.c: Likewise.
5174 * linux-tic6x-low.c: Likewise.
5175 * linux-tile-low.c: Likewise.
5176 * linux-x86-low.c: Likewise.
5177
54019719
PA
51782015-07-24 Pedro Alves <palves@redhat.com>
5179
5180 * config.in: Regenerate.
5181 * configure: Regenerate.
5182
eb7aa561
PA
51832015-07-24 Pedro Alves <palves@redhat.com>
5184
5185 * acinclude.m4: Include ../ptrace.m4.
5186 * configure.ac: Call GDB_AC_PTRACE.
5187 * config.in, configure: Regenerate.
5188
55d7b841
YQ
51892015-07-24 Yao Qi <yao.qi@linaro.org>
5190
5191 * linux-low.c (linux_create_inferior): Remove setting to
5192 proc->priv->new_inferior.
5193 (linux_attach): Likewise.
5194 (linux_low_filter_event): Likewise.
5195 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
5196
c06cbd92
YQ
51972015-07-24 Yao Qi <yao.qi@linaro.org>
5198
5199 * linux-low.c (linux_arch_setup): New function.
5200 (linux_low_filter_event): If proc->tdesc is NULL and
5201 proc->attached is true, call the_low_target.arch_setup.
5202 Otherwise, keep status pending, and return.
5203 (linux_resume_one_lwp_throw): Don't call get_pc if
5204 thread->while_stepping isn't NULL. Don't call
5205 get_thread_regcache if proc->tdesc is NULL.
5206 (need_step_over_p): Return 0 if proc->tdesc is NULL.
5207 (linux_target_ops): Install arch_setup.
5208 * server.c (start_inferior): Call the_target->arch_setup.
5209 * target.h (struct target_ops) <arch_setup>: New field.
5210 (target_arch_setup): New marco.
5211 * lynx-low.c (lynx_target_ops): Update.
5212 * nto-low.c (nto_target_ops): Update.
5213 * spu-low.c (spu_target_ops): Update.
5214 * win32-low.c (win32_target_ops): Update.
5215
5ae3ebba
YQ
52162015-07-24 Yao Qi <yao.qi@linaro.org>
5217
5218 * linux-low.c (linux_add_process): Don't set
5219 proc->priv->new_inferior.
5220 (linux_create_inferior): Set proc->priv->new_inferior to 1.
5221 (linux_attach): Likewise.
5222
eb97750b
YQ
52232015-07-24 Yao Qi <yao.qi@linaro.org>
5224
5225 * server.c (start_inferior): Code refactor.
5226
51aee833
YQ
52272015-07-24 Yao Qi <yao.qi@linaro.org>
5228
5229 * server.c (process_serial_event): Set general_thread.
5230
af1b22f3
YQ
52312015-07-21 Yao Qi <yao.qi@linaro.org>
5232
5233 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
5234 aarch64_linux_get_debug_reg_capacity.
5235
554717a3
YQ
52362015-07-17 Yao Qi <yao.qi@linaro.org>
5237
5238 * Makefile.in (aarch64-linux-hw-point.o): New rule.
5239 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
5240 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
5241 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
5242 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
5243 (AARCH64_HWP_ALIGNMENT): Likewise.
5244 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
5245 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
5246 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
5247 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
5248 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
5249 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
5250 (struct aarch64_debug_reg_state): Likewise.
5251 (struct arch_lwp_info): Likewise.
5252 (aarch64_align_watchpoint): Likewise.
5253 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
5254 (aarch64_watchpoint_length): Likewise.
5255 (aarch64_point_encode_ctrl_reg): Likewise
5256 (aarch64_point_is_aligned): Likewise.
5257 (aarch64_align_watchpoint): Likewise.
5258 (aarch64_linux_set_debug_regs):
5259 (aarch64_dr_state_insert_one_point): Likewise.
5260 (aarch64_dr_state_remove_one_point): Likewise.
5261 (aarch64_handle_breakpoint): Likewise.
5262 (aarch64_handle_aligned_watchpoint): Likewise.
5263 (aarch64_handle_unaligned_watchpoint): Likewise.
5264 (aarch64_handle_watchpoint): Likewise.
5265
c67ca4de
YQ
52662015-07-17 Yao Qi <yao.qi@linaro.org>
5267
5268 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
5269 and don't aarch64_get_debug_reg_state. All callers update.
5270 (aarch64_handle_aligned_watchpoint): Likewise.
5271 (aarch64_handle_unaligned_watchpoint): Likewise.
5272 (aarch64_handle_watchpoint): Likewise.
5273 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
5274 (aarch64_remove_point): Likewise.
5275
25abf979
YQ
52762015-07-17 Yao Qi <yao.qi@linaro.org>
5277
5278 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
5279 debug_printf.
5280 (aarch64_handle_unaligned_watchpoint): Likewise.
5281
db1ff28b
JK
52822015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
5283
5284 Revert the previous 3 commits:
5285 Move gdb_regex* to common/
5286 Move linux_find_memory_regions_full & co.
5287 gdbserver build-id attribute generator
5288
700ca40f
JK
52892015-07-15 Aleksandar Ristovski <aristovski@qnx.com
5290 Jan Kratochvil <jan.kratochvil@redhat.com>
5291
5292 gdbserver build-id attribute generator.
5293 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
5294 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
5295 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
5296 (find_phdr): New.
5297 (get_dynamic): Use find_pdhr to traverse program headers.
5298 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
5299 (compare_mapping_entry_range, struct find_memory_region_callback_data)
5300 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
5301 (get_hex_build_id): New.
5302 (linux_qxfer_libraries_svr4): Add optional build-id attribute
5303 to reply XML document.
5304
9904185c
JK
53052015-07-15 Aleksandar Ristovski <aristovski@qnx.com
5306 Jan Kratochvil <jan.kratochvil@redhat.com>
5307
5308 * target.c: Include target/target-utils.h and fcntl.h.
5309 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
5310 (target_fileio_read_stralloc): New functions.
5311
6e5b4429
JK
53122015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
5313
5314 * Makefile.in (OBS): Add gdb_regex.o.
5315 (gdb_regex.o): New.
5316 * config.in: Rebuilt.
5317 * configure: Rebuilt.
5318
ddc98fbf
JK
53192015-07-15 Aleksandar Ristovski <aristovski@qnx.com
5320 Jan Kratochvil <jan.kratochvil@redhat.com>
5321
5322 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
5323 * Makefile.in (OBS): Add target-utils.o.
5324 (linux-maps.o, target-utils.o): New.
5325 * configure.srv (srv_linux_obj): Add linux-maps.o.
5326
e57bb7a0
PL
53272015-07-15 Pierre Langlois <pierre.langlois@arm.com>
5328
5329 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
5330 function, return 1.
5331 (the_low_target): Install it.
5332
586b02a9
PA
53332015-07-14 Pedro Alves <palves@redhat.com>
5334
5335 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
5336 Instead, ignore ECHILD, and throw an error for other errnos.
5337
58c1b36c
PA
53382015-07-10 Pedro Alves <palves@redhat.com>
5339
5340 * event-loop.c (struct callback_event) <data>: Change type to
5341 gdb_client_data instance instead of gdb_client_data pointer.
5342 (append_callback_event): Adjust.
5343
421530db
PL
53442015-07-10 Pierre Langlois <pierre.langlois@arm.com>
5345
5346 * linux-aarch64-low.c: Add comments for each linux_target_ops
5347 method. Remove comments already covered in target_ops and
5348 linux_target_ops definitions.
5349 (the_low_target): Add comments for each unimplemented method.
5350
c2d65f38
YQ
53512015-07-09 Yao Qi <yao.qi@linaro.org>
5352
5353 * linux-aarch64-low.c (aarch64_regmap): Remove.
5354 (aarch64_usrregs_info): Remove.
5355 (regs_info): Set field usrregs to NULL.
5356
b20a6524
MM
53572015-07-02 Markus Metzger <markus.t.metzger@intel.com>
5358
5359 * linux-low.c: Include "rsp-low.h"
5360 (linux_low_encode_pt_config, linux_low_encode_raw): New.
5361 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
5362 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
5363 (handle_btrace_enable_pt): New.
5364 (handle_btrace_general_set): Support "pt".
5365 (handle_btrace_conf_general_set): Support "pt:size".
5366
96c97461
PL
53672015-06-29 Pierre Langlois <pierre.langlois@arm.com>
5368
5369 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
5370 Z_PACKET_SW_BP.
5371
37d66942
PL
53722015-06-29 Pierre Langlois <pierre.langlois@arm.com>
5373
5374 * linux-aarch64-low.c: Remove comment about endianness.
5375 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
5376 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
5377 memcmp.
5378
dc06243f
GB
53792015-06-24 Gary Benson <gbenson@redhat.com>
5380
5381 * linux-i386-ipa.c (stdint.h): Do not include.
5382 * lynx-i386-low.c (stdint.h): Likewise.
5383 * lynx-ppc-low.c (stdint.h): Likewise.
5384 * mem-break.c (stdint.h): Likewise.
5385 * thread-db.c (stdint.h): Likewise.
5386 * tracepoint.c (stdint.h): Likewise.
5387 * win32-low.c (stdint.h): Likewise.
5388
124e13d9
SM
53892015-06-18 Simon Marchi <simon.marchi@ericsson.com>
5390
5391 * server.c (write_qxfer_response): Update call to
5392 remote_escape_output.
5393
909c2cda
JK
53942015-06-15 Aleksandar Ristovski <aristovski@qnx.com
5395 Jan Kratochvil <jan.kratochvil@redhat.com>
5396
5397 Merge multiple hex conversions.
5398 * gdbreplay.c (tohex): Rename to 'fromhex'.
5399 (logchar): Use fromhex.
5400
24c05f46
JK
54012015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
5402
5403 * server.c (handle_qxfer_libraries): Set `version' attribute for
5404 <library-list>.
5405
14d2069a
GB
54062015-06-10 Gary Benson <gbenson@redhat.com>
5407
5408 * target.h (struct target_ops) <multifs_open>: New field.
5409 <multifs_unlink>: Likewise.
5410 <multifs_readlink>: Likewise.
5411 * linux-low.c (nat/linux-namespaces.h): New include.
5412 (linux_target_ops): Initialize the_target->multifs_open,
5413 the_target->multifs_unlink and the_target->multifs_readlink.
5414 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
5415 * hostio.c (hostio_fs_pid): New static variable.
5416 (hostio_handle_new_gdb_connection): New function.
5417 (handle_setfs): Likewise.
5418 (handle_open): Use the_target->multifs_open as appropriate.
5419 (handle_unlink): Use the_target->multifs_unlink as appropriate.
5420 (handle_readlink): Use the_target->multifs_readlink as
5421 appropriate.
5422 (handle_vFile): Handle vFile:setfs packets.
5423 * server.c (handle_query): Call hostio_handle_new_gdb_connection
5424 after target_handle_new_gdb_connection.
5425
4b8b5e72
GB
54262015-06-10 Gary Benson <gbenson@redhat.com>
5427
5428 * configure.ac (AC_CHECK_FUNCS): Add setns.
5429 * config.in: Regenerate.
5430 * configure: Likewise.
5431 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
5432 (linux-namespaces.o): New rule.
5433 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
5434
3ac2e371
GB
54352015-06-09 Gary Benson <gbenson@redhat.com>
5436
5437 * hostio.c (handle_open): Process mode argument with
5438 fileio_to_host_mode.
5439
ca9b78ce
YQ
54402015-06-01 Yao Qi <yao.qi@linaro.org>
5441
5442 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
5443 * linux-x86-low.c: Likewise.
5444
bfacd19d
DB
54452015-05-28 Don Breazeal <donb@codesourcery.com>
5446
5447 * linux-low.c (handle_extended_wait): Initialize
5448 thread_info.last_resume_kind for new fork children.
5449
452003ef
PA
54502015-05-15 Pedro Alves <palves@redhat.com>
5451
5452 * target.h (target_handle_new_gdb_connection): Rewrite using if
5453 wrapped in do/while.
5454
1041a03c
JB
54552015-05-14 Joel Brobecker <brobecker@adacore.com>
5456
5457 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
5458 * configure, config.in: Regenerate.
5459 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
5460 Declare typedef.
5461
c269dbdb
DB
54622015-05-12 Don Breazeal <donb@codesourcery.com>
5463
5464 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
5465 PTRACE_EVENT_VFORK_DONE.
5466 (linux_low_ptrace_options, extended_event_reported): Add vfork
5467 events.
5468 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
5469 and "vforkdone" for RSP 'T' Stop Reply Packet.
5470 * server.h (report_vfork_events): Declare
5471 global variable.
5472
3a8a0396
DB
54732015-05-12 Don Breazeal <donb@codesourcery.com>
5474
5475 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
5476 (the_low_target) <new_fork>: Initialize new member.
5477 * linux-arm-low.c (arm_new_fork): New function.
5478 (the_low_target) <new_fork>: Initialize new member.
5479 * linux-low.c (handle_extended_wait): Call new target function
5480 new_fork.
5481 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
5482 * linux-mips-low.c (mips_add_watchpoint): New function
5483 extracted from mips_insert_point.
5484 (the_low_target) <new_fork>: Initialize new member.
5485 (mips_linux_new_fork): New function.
5486 (mips_insert_point): Call mips_add_watchpoint.
5487 * linux-x86-low.c (x86_linux_new_fork): New function.
5488 (the_low_target) <new_fork>: Initialize new member.
5489
de0d863e
DB
54902015-05-12 Don Breazeal <donb@codesourcery.com>
5491
5492 * linux-low.c (handle_extended_wait): Implement return value,
5493 rename argument 'event_child' to 'event_lwp', handle
5494 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
5495 (linux_low_ptrace_options): New function.
5496 (linux_low_filter_event): Call linux_low_ptrace_options,
5497 use different argument fo linux_enable_event_reporting,
5498 use return value from handle_extended_wait.
5499 (extended_event_reported): New function.
5500 (linux_wait_1): Call extended_event_reported and set
5501 status to report fork events.
5502 (linux_write_memory): Add pid to debug message.
5503 (reset_lwp_ptrace_options_callback): New function.
5504 (linux_handle_new_gdb_connection): New function.
5505 (linux_target_ops): Initialize new structure member.
5506 * linux-low.h (struct lwp_info) <waitstatus>: New member.
5507 * lynx-low.c: Initialize new structure member.
5508 * remote-utils.c (prepare_resume_reply): Implement stop reason
5509 "fork" for "T" stop message.
5510 * server.c (handle_query): Call handle_new_gdb_connection.
5511 * server.h (report_fork_events): Declare global flag.
5512 * target.h (struct target_ops) <handle_new_gdb_connection>:
5513 New member.
5514 (target_handle_new_gdb_connection): New macro.
5515 * win32-low.c: Initialize new structure member.
5516
ddcbc397
DB
55172015-05-12 Don Breazeal <donb@codesourcery.com>
5518
5519 * mem-break.c (APPEND_TO_LIST): Define macro.
5520 (clone_agent_expr): New function.
5521 (clone_one_breakpoint): New function.
5522 (clone_all_breakpoints): New function.
5523 * mem-break.h: Declare new functions.
5524
89245bc0
DB
55252015-05-12 Don Breazeal <donb@codesourcery.com>
5526
5527 * linux-low.c (linux_supports_fork_events): New function.
5528 (linux_supports_vfork_events): New function.
5529 (linux_target_ops): Initialize new structure members.
5530 (initialize_low): Call linux_check_ptrace_features.
5531 * lynx-low.c (lynx_target_ops): Initialize new structure
5532 members.
5533 * server.c (report_fork_events, report_vfork_events):
5534 New global flags.
5535 (handle_query): Add new features to qSupported packet and
5536 response.
5537 (captured_main): Initialize new global variables.
5538 * target.h (struct target_ops) <supports_fork_events>:
5539 New member.
5540 <supports_vfork_events>: New member.
5541 (target_supports_fork_events): New macro.
5542 (target_supports_vfork_events): New macro.
5543 * win32-low.c (win32_target_ops): Initialize new structure
5544 members.
5545
835205d0
GB
55462015-05-12 Gary Benson <gbenson@redhat.com>
5547
5548 * server.c (handle_qxfer_exec_file): Use current process
5549 if annex is empty.
5550
21e94bd9
SL
55512015-05-08 Sandra Loosemore <sandra@codesourcery.com>
5552
5553 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
5554 Remove HAVE_PTRACE_GETREGS conditionals.
5555 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
5556 instead of PTRACE_GETREGS and PTRACE_SETREGS.
5557
45614f15
YQ
55582015-05-08 Yao Qi <yao.qi@linaro.org>
5559
5560 * linux-low.c (linux_supports_conditional_breakpoints): New
5561 function.
5562 (linux_target_ops): Install new target method.
5563 * lynx-low.c (lynx_target_ops): Install NULL hook for
5564 supports_conditional_breakpoints.
5565 * nto-low.c (nto_target_ops): Likewise.
5566 * spu-low.c (spu_target_ops): Likewise.
5567 * win32-low.c (win32_target_ops): Likewise.
5568 * server.c (handle_query): Check
5569 target_supports_conditional_breakpoints.
5570 * target.h (struct target_ops) <supports_conditional_breakpoints>:
5571 New field.
5572 (target_supports_conditional_breakpoints): New macro.
5573
80ad801e
PA
55742015-05-06 Pedro Alves <palves@redhat.com>
5575
5576 PR server/18081
5577 * server.c (start_inferior): If the process exits, mourn it.
5578
819843c7
GB
55792015-04-21 Gary Benson <gbenson@redhat.com>
5580
5581 * hostio.c (fileio_open_flags_to_host): Factored out to
5582 fileio_to_host_openflags in common/fileio.c. Single use
5583 updated.
5584
a2d5a9d7
MF
55852015-04-17 Max Filippov <jcmvbkbc@gmail.com>
5586
5587 * linux-xtensa-low.c (xtensa_fill_gregset)
5588 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
5589 XCHAL_HAVE_LOOP.
5590
deb44829
MF
55912015-04-17 Max Filippov <jcmvbkbc@gmail.com>
5592
5593 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
5594 (regs_info): Replace usrregs pointer with NULL.
5595
e57f1de3
GB
55962015-04-17 Gary Benson <gbenson@redhat.com>
5597
5598 * target.h (struct target_ops) <pid_to_exec_file>: New field.
5599 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
5600 * server.c (handle_qxfer_exec_file): New function.
5601 (qxfer_packets): Add exec-file entry.
5602 (handle_query): Report qXfer:exec-file:read as supported packet.
5603
62828379
RN
56042015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
5605
5606 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
5607
b88bb450
GB
56082015-04-09 Gary Benson <gbenson@redhat.com>
5609
5610 * hostio-errno.c (errno_to_fileio_error): Remove function.
5611 Update caller to use remote_fileio_to_fio_error.
5612
c8f4bfdd
YQ
56132015-04-09 Yao Qi <yao.qi@linaro.org>
5614
5615 * linux-low.c (linux_insert_point): Call
5616 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
5617 (linux_remove_point): Call remove_memory_breakpoint if type is
5618 raw_bkpt_type_sw.
5619 * linux-x86-low.c (x86_insert_point): Don't call
5620 insert_memory_breakpoint.
5621 (x86_remove_point): Don't call remove_memory_breakpoint.
5622
41f98f02
PA
56232015-04-01 Pedro Alves <palves@redhat.com>
5624 Cleber Rosa <crosa@redhat.com>
5625
5626 * server.c (gdbserver_usage): Reorganize and extend the usage
5627 message.
5628
2bf6fb9d
PA
56292015-03-24 Pedro Alves <palves@redhat.com>
5630
5631 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
5632 output. Also dump TRAP_TRACE.
5633 (linux_low_filter_event): In debug output, distinguish a
5634 resume_stop SIGSTOP from a delayed SIGSTOP.
5635
369f6daa
GB
56362015-03-24 Gary Benson <gbenson@redhat.com>
5637
5638 * linux-x86-low.c (x86_linux_new_thread): Moved to
5639 nat/x86-linux.c.
5640 (x86_linux_prepare_to_resume): Likewise.
5641
8e5d4070
GB
56422015-03-24 Gary Benson <gbenson@redhat.com>
5643
5644 * Makefile.in (x86-linux-dregs.o): New rule.
5645 * configure.srv: Add x86-linux-dregs.o to relevant targets.
5646 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
5647 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
5648 (x86_linux_dr_get): Likewise.
5649 (x86_linux_dr_set): Likewise.
5650 (update_debug_registers_callback): Likewise.
5651 (x86_linux_dr_set_addr): Likewise.
5652 (x86_linux_dr_get_addr): Likewise.
5653 (x86_linux_dr_set_control): Likewise.
5654 (x86_linux_dr_get_control): Likewise.
5655 (x86_linux_dr_get_status): Likewise.
5656 (x86_linux_update_debug_registers): Likewise.
5657
2b95d440
GB
56582015-03-24 Gary Benson <gbenson@redhat.com>
5659
5660 * linux-x86-low.c (x86_linux_update_debug_registers):
5661 New function, factored out from...
5662 (x86_linux_prepare_to_resume): ...this.
5663
14b0bc68
GB
56642015-03-24 Gary Benson <gbenson@redhat.com>
5665
5666 * linux-x86-low.c (x86_linux_dr_get): Update comments.
5667 (x86_linux_dr_set): Likewise.
5668 (update_debug_registers_callback): Likewise.
5669 (x86_linux_dr_set_addr): Likewise.
5670 (x86_linux_dr_get_addr): Likewise.
5671 (x86_linux_dr_set_control): Likewise.
5672 (x86_linux_dr_get_control): Likewise.
5673 (x86_linux_dr_get_status): Likewise.
5674 (x86_linux_prepare_to_resume): Likewise.
5675
5dfe6ca8
GB
56762015-03-24 Gary Benson <gbenson@redhat.com>
5677
5678 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
5679 Use perror_with_name. Pass string through gettext.
5680 (x86_linux_dr_set): Likewise.
5681
d33472ad
GB
56822015-03-24 Gary Benson <gbenson@redhat.com>
5683
5684 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
5685 (x86_linux_dr_set_addr): ...this.
5686 (x86_dr_low_get_addr): Rename to...
5687 (x86_linux_dr_get_addr): ...this.
5688 (x86_dr_low_set_control): Rename to...
5689 (x86_linux_dr_set_control): ...this.
5690 (x86_dr_low_get_control): Rename to...
5691 (x86_linux_dr_get_control): ...this.
5692 (x86_dr_low_get_status): Rename to...
5693 (x86_linux_dr_get_status): ...this.
5694 (x86_dr_low): Update with new function names.
5695
4b134ca1
GB
56962015-03-24 Gary Benson <gbenson@redhat.com>
5697
5698 * Makefile.in (x86-linux.o): New rule.
5699 * configure.srv: Add x86-linux.o to relevant targets.
5700 * linux-low.c (lwp_set_arch_private_info): New function.
5701 (lwp_arch_private_info): Likewise.
5702 * linux-x86-low.c: Include nat/x86-linux.h.
5703 (arch_lwp_info): Removed structure.
5704 (update_debug_registers_callback):
5705 Use lwp_set_debug_registers_changed.
5706 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
5707 and lwp_set_debug_registers_changed.
5708 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
5709
34c703da
GB
57102015-03-24 Gary Benson <gbenson@redhat.com>
5711
5712 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
5713 * linux-arm-low.c (arm_new_thread): Likewise.
5714 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
5715 * linux-mips-low.c (mips_linux_new_thread): Likewise.
5716 * linux-x86-low.c (x86_linux_new_thread): Likewise.
5717 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
5718
cff068da
GB
57192015-03-24 Gary Benson <gbenson@redhat.com>
5720
5721 * linux-low.c (ptid_of_lwp): New function.
5722 (lwp_is_stopped): Likewise.
5723 (lwp_stop_reason): Likewise.
5724 * linux-x86-low.c (update_debug_registers_callback):
5725 Use lwp_is_stopped.
5726 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
5727 lwp_stop_reason.
5728
b2f7c7e8
GB
57292015-03-24 Gary Benson <gbenson@redhat.com>
5730
5731 * linux-low.h (linux_stop_lwp): Remove declaration.
5732
6d4ee8c6
GB
57332015-03-24 Gary Benson <gbenson@redhat.com>
5734
5735 * linux-low.h: Include nat/linux-nat.h.
5736 * linux-low.c (iterate_over_lwps_args): New structure.
5737 (iterate_over_lwps_filter): New function.
5738 (iterate_over_lwps): Likewise.
5739 * linux-x86-low.c (update_debug_registers_callback):
5740 Update signature to what iterate_over_lwps expects.
5741 Remove PID check that iterate_over_lwps now performs.
5742 (x86_dr_low_set_addr): Use iterate_over_lwps.
5743 (x86_dr_low_set_control): Likewise.
5744
70a0bb6b
GB
57452015-03-24 Gary Benson <gbenson@redhat.com>
5746
5747 * linux-x86-low.c (x86_debug_reg_state): New function.
5748 (x86_linux_prepare_to_resume): Use the above.
5749
7b669087
GB
57502015-03-24 Gary Benson <gbenson@redhat.com>
5751
5752 * linux-low.c (current_lwp_ptid): New function.
5753 * linux-x86-low.c: Include nat/linux-nat.h.
5754 (x86_dr_low_get_addr): Use current_lwp_ptid.
5755 (x86_dr_low_get_control): Likewise.
5756 (x86_dr_low_get_status): Likewise.
5757
eef49a3d
PA
57582015-03-20 Pedro Alves <palves@redhat.com>
5759
5760 * tracepoint.c (cmd_qtstatus): Make "str" const.
5761
b2333d22
PA
57622015-03-20 Pedro Alves <palves@redhat.com>
5763
5764 * server.c (handle_general_set): Make "req_str" const.
5765
23f238d3
PA
57662015-03-19 Pedro Alves <palves@redhat.com>
5767
5768 * linux-low.c (linux_resume_one_lwp): Rename to ...
5769 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
5770 instead call perror_with_name.
5771 (check_ptrace_stopped_lwp_gone): New function.
5772 (linux_resume_one_lwp): Reimplement as wrapper around
5773 linux_resume_one_lwp_throw that swallows errors if the LWP is
5774 gone.
5775
91baf43f
PA
57762015-03-19 Pedro Alves <palves@redhat.com>
5777
5778 * linux-low.c (count_events_callback, select_event_lwp_callback):
5779 No longer check whether the thread has resume_stop as last resume
5780 kind.
5781
8bf3b159
PA
57822015-03-19 Pedro Alves <palves@redhat.com>
5783
5784 * linux-low.c (count_events_callback, select_event_lwp_callback):
5785 Use the lwp's status_pending_p field, not the thread's.
5786
b90fc188
PA
57872015-03-19 Pedro Alves <palves@redhat.com>
5788
5789 * linux-low.c (select_event_lwp_callback): Update comments to
5790 no longer mention SIGTRAP.
5791
464b0089
GB
57922015-03-18 Gary Benson <gbenson@redhat.com>
5793
5794 * server.c (handle_query): Do not report vFile:fstat as supported.
5795
aa9e327f
GB
57962015-03-11 Gary Benson <gbenson@redhat.com>
5797
5798 * hostio.c (sys/types.h): New include.
5799 (sys/stat.h): Likewise.
5800 (common-remote-fileio.h): Likewise.
5801 (handle_fstat): New function.
5802 (handle_vFile): Handle vFile:fstat packets.
aa9e327f 5803
791c0056
GB
58042015-03-11 Gary Benson <gbenson@redhat.com>
5805
5806 * configure.ac (AC_CHECK_MEMBERS): Add checks for
5807 struct stat.st_blocks and struct stat.st_blksize.
5808 * configure: Regenerate.
5809 * config.in: Likewise.
5810 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
5811 (OBS): Add common-remote-fileio.o.
5812 (common-remote-fileio.o): New rule.
5813
9a9df970
PA
58142015-03-09 Pedro Alves <palves@redhat.com>
5815
5816 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
5817 'struct sockaddr' pointer in 'accept' call.
5818
9eb1356e
PA
58192015-03-09 Pedro Alves <palves@redhat.com>
5820
5821 Revert:
5822 2015-03-07 Pedro Alves <palves@redhat.com>
5823 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
5824 or <winsock2.h> here. Instead include "gdb_socket.h".
5825 (remote_open): Use union gdb_sockaddr_u.
5826 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
5827 or <winsock2.h> here. Instead include "gdb_socket.h".
5828 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
5829 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
5830 or <sys/un.h>.
5831 (init_named_socket, gdb_agent_helper_thread): Use union
5832 gdb_sockaddr_u.
5833
aac331e4
PA
58342015-03-07 Pedro Alves <palves@redhat.com>
5835
5836 * configure.ac (build_warnings): Move
5837 -Wdeclaration-after-statement to the C-specific set.
5838 * configure: Regenerate.
5839
366c75fc
PA
58402015-03-07 Pedro Alves <palves@redhat.com>
5841
5842 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
5843 or <winsock2.h> here. Instead include "gdb_socket.h".
5844 (remote_open): Use union gdb_sockaddr_u.
5845 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
5846 or <winsock2.h> here. Instead include "gdb_socket.h".
5847 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
5848 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
5849 or <sys/un.h>.
5850 (init_named_socket, gdb_agent_helper_thread): Use union
5851 gdb_sockaddr_u.
5852
492d29ea
PA
58532015-03-07 Pedro Alves <palves@redhat.com>
5854
5855 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
5856 instead.
5857
60a191ed
YQ
58582015-03-06 Yao Qi <yao.qi@linaro.org>
5859
5860 * linux-aarch64-low.c (aarch64_insert_point): Use
5861 show_debug_regs as a boolean.
5862 (aarch64_remove_point): Likewise.
5863
f5771b1d
PA
58642015-03-05 Pedro Alves <palves@redhat.com>
5865
5866 * lynx-low.c (lynx_target_ops): Install NULL hooks for
5867 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
5868 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
5869 * nto-low.c (nto_target_ops): Likewise.
5870 * spu-low.c (spu_target_ops): Likewise.
5871 * win32-low.c (win32_target_ops): Likewise.
5872
3e572f71
PA
58732015-03-04 Pedro Alves <palves@redhat.com>
5874
72f4393d 5875 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
3e572f71
PA
5876 Decide whether a breakpoint triggered based on the SIGTRAP's
5877 siginfo.si_code.
72f4393d
L
5878 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
5879 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
3e572f71
PA
5880 (linux_low_filter_event): Check for breakpoints before checking
5881 watchpoints.
5882 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
5883 siginfo.si_code.
72f4393d
L
5884 (linux_stopped_by_sw_breakpoint)
5885 (linux_supports_stopped_by_sw_breakpoint)
5886 (linux_stopped_by_hw_breakpoint)
5887 (linux_supports_stopped_by_hw_breakpoint): New functions.
5888 (linux_target_ops): Install new target methods.
3e572f71 5889
1ec68e26
PA
58902015-03-04 Pedro Alves <palves@redhat.com>
5891
5892 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
5893 * server.c (swbreak_feature, hwbreak_feature): New globals.
5894 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
5895 (captured_main): Clear swbreak_feature and hwbreak_feature.
5896 * server.h (swbreak_feature, hwbreak_feature): Declare.
5897 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
5898 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
5899 supports_stopped_by_hw_breakpoint>: New fields.
5900 (target_supports_stopped_by_sw_breakpoint)
5901 (target_stopped_by_sw_breakpoint)
5902 (target_supports_stopped_by_hw_breakpoint)
5903 (target_stopped_by_hw_breakpoint): Declare.
5904
15c66dd6
PA
59052015-03-04 Pedro Alves <palves@redhat.com>
5906
5907 enum lwp_stop_reason -> enum target_stop_reason
5908 * linux-low.c (check_stopped_by_breakpoint): Adjust.
5909 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
5910 (linux_wait_1, stuck_in_jump_pad_callback)
5911 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
5912 (linux_stopped_by_watchpoint):
5913 * linux-low.h (enum lwp_stop_reason): Delete.
5914 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
5915 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
5916
98fc70d6
YQ
59172015-03-04 Yao Qi <yao.qi@linaro.org>
5918
5919 * Makefile.in (SFILES): Add linux-aarch64-low.c.
5920
dd2ac174
GB
59212015-03-03 Gary Benson <gbenson@redhat.com>
5922
5923 * hostio.c (handle_vFile): Fix prefix lengths.
5924
d68e53f4
MM
59252015-03-03 Markus Metzger <markus.t.metzger@intel.com>
5926
5927 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
5928 ptr_bits.
5929
bf2d68ab
AA
59302015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
5931
5932 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
5933 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
5934 (clean): Add "rm -f" for above C files.
5935 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
5936 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
5937 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
5938 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
5939 * linux-s390-low.c (HWCAP_S390_VX): New macro.
5940 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
5941 (init_registers_s390x_vx_linux64)
5942 (init_registers_s390x_tevx_linux64)
5943 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
5944 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
5945 declarations.
5946 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
5947 (s390_store_vxrs_high): New functions.
5948 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
5949 NT_S390_VXRS_HIGH.
5950 (s390_arch_setup): Add logic for selecting one of the new target
5951 descriptions. Activate the new vector regsets if applicable.
5952 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
5953 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
5954 and init_registers_s390x_tevx_linux64.
5955
c966a859
PA
59562015-03-01 Pedro Alves <palves@redhat.com>
5957
5958 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
5959 parameter.
5960
4180215b
PA
59612015-02-27 Pedro Alves <palves@redhat.com>
5962
5963 * linux-x86-low.c (u_debugreg_offset): New function.
5964 (x86_linux_dr_get, x86_linux_dr_set): Use it.
5965
749bab01
PA
59662015-02-27 Pedro Alves <palves@redhat.com>
5967
5968 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
5969 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
5970 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
5971 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
5972 (ps_lsetfpregs, ps_getpid)
5973 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
5974 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
5975 (ps_lsetxregs, ps_plog): Declare.
5976
3c14e5a3
PA
59772015-02-27 Pedro Alves <palves@redhat.com>
5978
5979 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
5980 IP_AGENT_EXPORT_FUNC.
5981 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
5982 IP_AGENT_EXPORT_FUNC.
5983 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
5984 (IP_AGENT_EXPORT): Delete.
5985 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
5986 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
5987 (gdb_trampoline_buffer_error, collecting, gdb_collect)
5988 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
5989 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
5990 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
5991 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
5992 (traceframe_read_count, traceframe_write_count)
5993 (traceframes_created, trace_state_variables, get_raw_reg)
5994 (get_trace_state_variable_value, set_trace_state_variable_value)
5995 (ust_loaded, helper_thread_id, cmd_buf): Use
5996 IPA_SYM_EXPORTED_NAME.
5997 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
5998 (tracepoints) Use IP_AGENT_EXPORT_VAR.
5999 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
6000 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
6001 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
6002 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
6003 EXTERN_C_PUSH/EXTERN_C_POP.
6004 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
6005 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
6006 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
6007 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
6008 (traceframe_write_count, traceframe_read_count)
6009 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
6010 (about_to_request_buffer_space, get_trace_state_variable_value)
6011 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
6012 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
6013 EXTERN_C_PUSH/EXTERN_C_POP.
6014 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
6015 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
6016 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
6017 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
6018 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
6019 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
6020 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
6021 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
6022 Define.
6023 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
6024 (IP_AGENT_EXPORT_VAR_DECL): Define.
6025 (tracing): Declare.
6026 (gdb_agent_get_raw_reg): Declare.
6027
fe978cb0
PA
60282015-02-27 Tom Tromey <tromey@redhat.com>
6029 Pedro Alves <palves@redhat.com>
6030
6031 Rename symbols whose names are reserved C++ keywords throughout.
6032
3bc3d82a
PA
60332015-02-27 Pedro Alves <palves@redhat.com>
6034
6035 * Makefile.in (COMPILER): New, get it from autoconf.
6036 (CXX): Get from autoconf instead.
6037 (COMPILE.pre): Use COMPILER.
6038 (CC-LD): Rename to ...
6039 (CC_LD): ... this. Use COMPILER.
6040 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
6041 (CXX_FOR_TARGET): Default to g++ instead of gcc.
6042 * acinclude.m4: Include build-with-cxx.m4.
6043 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
6044 Disable -Werror by default if building in C++ mode.
6045 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
6046 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
6047 the C++ compiler. Save/restore CXXFLAGS too.
6048 * configure: Regenerate.
6049
07697489
PA
60502015-02-27 Pedro Alves <palves@redhat.com>
6051
6052 * acinclude.m4: Include libiberty.m4.
6053 * configure.ac: Call libiberty_INIT.
6054 * config.in, configure: Regenerate.
6055
9beb7c4e
PA
60562015-02-26 Pedro Alves <palves@redhat.com>
6057
6058 * linux-low.c (linux_wait_1): When incrementing the PC past a
6059 program breakpoint always use the_low_target.breakpoint_len as
6060 increment, rather than the maximum between that and
6061 the_low_target.decr_pc_after_break.
6062
8090aef2
PA
60632015-02-23 Pedro Alves <palves@redhat.com>
6064
6065 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
6066 thread was doing a step-over; always adjust the PC if
6067 we stepped over a permanent breakpoint.
6068 (linux_wait_1): If we stepped over breakpoint that was on top of a
6069 permanent breakpoint, manually advance the PC past it.
6070
bc9540e8
PA
60712015-02-23 Pedro Alves <palves@redhat.com>
6072
6073 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
6074 modes.
6075 (x86_fill_gregset, x86_store_gregset): Use it when handling
6076 $orig_eax.
6077
2db9a427
PA
60782015-02-20 Pedro Alves <palves@redhat.com>
6079
6080 * thread-db.c: Include "nat/linux-procfs.h".
6081 (thread_db_init): Skip listing new threads if the kernel supports
6082 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
6083
afa8d396
PA
60842015-02-20 Pedro Alves <palves@redhat.com>
6085
6086 * linux-low.c (status_pending_p_callback): Use ptid_match.
6087
c9587f88
AT
60882015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
6089
6090 PR breakpoints/16812
6091 * linux-low.c (wstatus_maybe_breakpoint): Remove.
6092 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
6093 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
6094
b05ec7a5
AT
60952015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
6096
6097 PR breakpoints/15956
6098 * tracepoint.c (cmd_qtinit): Add check for current_thread.
6099
d33501a5
MM
61002015-02-09 Markus Metzger <markus.t.metzger@intel.com>
6101
6102 * linux-low.c (linux_low_btrace_conf): Print size.
6103 * server.c (handle_btrace_conf_general_set): New.
6104 (hanle_general_set): Call handle_btrace_conf_general_set.
6105 (handle_query): Report Qbtrace-conf:bts:size as supported.
6106
f4abbc16
MM
61072015-02-09 Markus Metzger <markus.t.metzger@intel.com>
6108
6109 * linux-low.c (linux_low_enable_btrace): Update parameters.
6110 (linux_low_btrace_conf): New.
6111 (linux_target_ops)<to_btrace_conf>: Initialize.
6112 * server.c (current_btrace_conf): New.
6113 (handle_btrace_enable): Rename to ...
6114 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
6115 to target_enable_btrace. Update comment. Update users.
6116 (handle_qxfer_btrace_conf): New.
6117 (qxfer_packets): Add btrace-conf entry.
6118 (handle_query): Report qXfer:btrace-conf:read as supported packet.
6119 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
6120 (target_ops)<read_btrace_conf>: New.
6121 (target_enable_btrace): Update parameters.
6122 (target_read_btrace_conf): New.
6123
043c3577
MM
61242015-02-09 Markus Metzger <markus.t.metzger@intel.com>
6125
6126 * server.c (handle_btrace_general_set): Remove call to
6127 target_supports_btrace.
6128 (supported_btrace_packets): New.
6129 (handle_query): Call supported_btrace_packets.
6130 * target.h: include btrace-common.h.
6131 (btrace_target_info): Removed.
6132 (supports_btrace, target_supports_btrace): Update parameters.
6133
734b0e4b
MM
61342015-02-09 Markus Metzger <markus.t.metzger@intel.com>
6135
6136 * Makefile.in (SFILES): Add common/btrace-common.c.
6137 (OBS): Add common/btrace-common.o.
6138 (btrace-common.o): Add build rules.
6139 * linux-low: Include btrace-common.h.
6140 (linux_low_read_btrace): Use struct btrace_data. Call
6141 btrace_data_init and btrace_data_fini.
6142
d6c146e9
PA
61432015-02-06 Pedro Alves <palves@redhat.com>
6144
6145 * thread-db.c (find_new_threads_callback): Add debug output.
6146
20ba1ce6
PA
61472015-02-04 Pedro Alves <palves@redhat.com>
6148
6149 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
6150 (resume_stopped_resumed_lwps): New function.
6151 (linux_wait_for_event_filtered): Use it.
6152
8cc73a39
SDJ
61532015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
6154
6155 * Makefile.in (SFILES): Add linux-personality.c.
6156 (linux-personality.o): New rule.
6157 * configure.srv (srv_linux_obj): Add linux-personality.o to the
6158 list of objects to be built.
6159 * linux-low.c: Include nat/linux-personality.h.
6160 (linux_create_inferior): Remove code to disable address space
6161 randomization (moved to ../nat/linux-personality.c). Create
6162 cleanup to disable address space randomization.
6163
fb23d554
SDJ
61642015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
6165
6166 * Makefile.in (posix-strerror.o): New rule.
6167 (mingw-strerror.o): Likewise.
6168 * configure: Regenerated.
6169 * configure.ac: Source file ../common/common.host. Initialize new
6170 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
6171
cdf43629
YQ
61722015-01-14 Yao Qi <yao@codesourcery.com>
6173
6174 * Makefile.in (SFILES): Add nat/ppc-linux.c.
6175 (ppc-linux.o): New rule.
6176 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
6177 * configure.ac: AC_CHECK_FUNCS(getauxval).
6178 * config.in: Re-generated.
6179 * configure: Re-generated.
6180 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
6181 ppc64_64bit_inferior_p
6182
514c5338
YQ
61832015-01-14 Yao Qi <yao@codesourcery.com>
6184
6185 * linux-ppc-low.c: Include "nat/ppc-linux.h".
6186 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
6187 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
6188 (PT_ORIG_R3, PT_TRAP): Likewise.
6189 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
6190 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
6191 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
6192
3368c1e5
JB
61932015-01-10 Joel Brobecker <brobecker@adacore.com>
6194
6195 * i387-fp.c (i387_cache_to_xsave): In look over
6196 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
6197 zmmh_low_space field by use of zmmh_high_space.
6198
582511be
PA
61992015-01-09 Pedro Alves <palves@redhat.com>
6200
6201 * linux-low.c (step_over_bkpt): Move higher up in the file.
6202 (handle_extended_wait): Don't store the stop_pc here.
6203 (get_stop_pc): Adjust comments and rename to ...
6204 (check_stopped_by_breakpoint): ... this. Record whether the LWP
6205 stopped for a software breakpoint or hardware breakpoint.
6206 (thread_still_has_status_pending_p): New function.
6207 (status_pending_p_callback): Use
6208 thread_still_has_status_pending_p. If the event is no longer
6209 interesting, resume the LWP.
6210 (handle_tracepoints): Add assert.
6211 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
6212 (wstatus_maybe_breakpoint): New function.
6213 (cancel_breakpoint): Delete function.
6214 (check_stopped_by_watchpoint): New function, factored out from
6215 linux_low_filter_event.
6216 (lp_status_maybe_breakpoint): Delete function.
6217 (linux_low_filter_event): Remove filter_ptid argument.
6218 Leave thread group exits pending here. Store the LWP's stop PC.
6219 Always leave events pending.
6220 (linux_wait_for_event_filtered): Pull all events out of the
6221 kernel, and leave them all pending.
6222 (count_events_callback, select_event_lwp_callback): Consider all
6223 events.
6224 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
6225 (select_event_lwp): Only give preference to the stepping LWP in
6226 all-stop mode. Adjust comments.
6227 (ignore_event): New function.
6228 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
6229 references to cancel_breakpoints. Adjust to renames. Also give
6230 equal priority to all LWPs that have had events in non-stop mode.
6231 If reporting a software breakpoint event, unadjust the LWP's PC.
6232 (linux_wait): If linux_wait_1 returned an ignored event, retry.
6233 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
6234 Adjust.
6235 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
6236 (resume_status_pending_p): Use thread_still_has_status_pending_p.
6237 (linux_stopped_by_watchpoint): Adjust.
6238 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
6239 * linux-low.h (enum lwp_stop_reason): New.
6240 (struct lwp_info) <stop_pc>: Adjust comment.
6241 <stopped_by_watchpoint>: Delete field.
6242 <stop_reason>: New field.
6243 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
6244 * mem-break.c (software_breakpoint_inserted_here)
6245 (hardware_breakpoint_inserted_here): New function.
6246 * mem-break.h (software_breakpoint_inserted_here)
6247 (hardware_breakpoint_inserted_here): Declare.
6248 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
6249 (cancel_breakpoints): Delete.
6250 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
6251 (upload_fast_traceframes): Remove references to
6252 cancel_breakpoints.
6253
a33e3959
PA
62542015-01-09 Pedro Alves <palves@redhat.com>
6255
6256 * thread-db.c (find_new_threads_callback): Ignore thread if the
6257 kernel thread ID is -1.
6258
8784d563
PA
62592015-01-09 Pedro Alves <palves@redhat.com>
6260
6261 * linux-low.c (linux_attach_fail_reason_string): Move to
6262 nat/linux-ptrace.c, and rename.
6263 (linux_attach_lwp): Update comment.
6264 (attach_proc_task_lwp_callback): New function.
6265 (linux_attach): Adjust to rename and use
6266 linux_proc_attach_tgid_threads.
6267 (linux_attach_fail_reason_string): Delete declaration.
6268
76f2b779
JB
62692015-01-01 Joel Brobecker <brobecker@adacore.com>
6270
6271 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
6272 * server.c (gdbserver_version): Likewise.
6273
fafcc06a
SDJ
62742014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
6275
6276 * remote-utils.c: Include ctype.h.
6277 (input_interrupt): Explicitly handle the case when the char
6278 received is the NUL byte. Improve the printing of non-ASCII
6279 characters.
6280
beed38b8
JB
62812014-12-16 Joel Brobecker <brobecker@adacore.com>
6282
6283 * linux-low.c (linux_low_filter_event): Update call to
6284 linux_enable_event_reporting following the addition of
6285 a new parameter to that function.
6286
bf330350
CU
62872014-12-16 Catalin Udma <catalin.udma@freescale.com>
6288
6289 PR server/17457
6290 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
6291 (AARCH64_FPCR_REGNO): Likewise.
6292 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
6293 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
6294 (aarch64_store_fpregset): Likewise.
6295
5227d625
JB
62962014-12-15 Joel Brobecker <brobecker@adacore.com>
6297
6298 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
6299 Remove FIXME comment about assumption about N.
6300
f93b65a0
JB
63012014-12-13 Joel Brobecker <brobecker@adacore.com>
6302
6303 * configure.ac: If large-file support is disabled in GDBserver,
6304 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
6305 * configure: Regenerate.
6306
e5a9158d
AA
63072014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
6308
6309 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
6310 warning upon ENODATA from ptrace.
6311 * linux-s390-low.c (s390_store_tdb): New.
6312 (s390_regsets): Add regset for NT_S390_TDB.
6313
feea5f36
AA
63142014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
6315
6316 * linux-low.c (regsets_store_inferior_registers): Skip regsets
6317 without a fill_function.
6318 * linux-s390-low.c (s390_fill_last_break): Remove.
6319 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
6320 (s390_arch_setup): Use regset's size instead of fill_function for
6321 loop end condition.
6322
098dbe61
AA
63232014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
6324
6325 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
6326 the regset's store function when ptrace returned an error.
6327 * regcache.c (get_thread_regcache): Invalidate register cache
6328 before fetching inferior's registers.
6329
28eef672
AA
63302014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
6331
6332 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
6333 while-loop as for-loop.
6334 (regsets_store_inferior_registers): Likewise.
6335
bdca27a2
YQ
63362014-11-28 Yao Qi <yao@codesourcery.com>
6337
6338 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
6339 * config.in, configure: Re-generate.
6340 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
6341 is defined.
6342
9c232dda
YQ
63432014-11-21 Yao Qi <yao@codesourcery.com>
6344
6345 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
6346 (AC_CHECK_HEADERS): Remove malloc.h.
6347 * configure: Re-generated.
6348 * config.in: Re-generated.
6349 * server.h: Don't include alloca.h and malloc.h.
6350 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
6351 Don't include malloc.h.
6352
43968415
JB
63532014-11-17 Joel Brobecker <brobecker@adacore.com>
6354
6355 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
6356 corresponding ERRNO check in same block.
6357
40e91bc7
PA
63582014-11-12 Pedro Alves <palves@redhat.com>
6359
6360 * server.c (cont_thread): Update comment.
6361 (start_inferior, attach_inferior): No longer clear cont_thread.
6362 (handle_v_cont): No longer set cont_thread.
6363 (captured_main): Clear cont_thread each time a GDB connects.
6364
c2c118cf
PA
63652014-11-12 Pedro Alves <palves@redhat.com>
6366
6367 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
6368 thread, and don't resume all threads if the Hc thread has exited.
6369
78708b7c
PA
63702014-11-12 Pedro Alves <palves@redhat.com>
6371
6372 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
6373 the process group instead of to a specific LWP.
6374
a2abc7de
PA
63752014-10-15 Pedro Alves <palves@redhat.com>
6376
6377 PR server/17487
6378 * win32-arm-low.c (arm_set_thread_context): Remove current_event
6379 parameter.
6380 (arm_set_thread_context): Delete.
6381 (the_low_target): Adjust.
6382 * win32-i386-low.c (debug_registers_changed)
6383 (debug_registers_used): Delete.
6384 (update_debug_registers_callback): New function.
6385 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
6386 needing to update their debug registers.
6387 (win32_get_current_dr): New function.
6388 (x86_dr_low_get_addr, x86_dr_low_get_control)
6389 (x86_dr_low_get_status): Fetch the debug register from the thread
6390 record's context.
6391 (i386_initial_stuff): Adjust.
6392 (i386_get_thread_context): Remove current_event parameter. Don't
6393 clear debug_registers_changed nor copy DR values to
6394 debug_reg_state.
6395 (i386_set_thread_context): Delete.
6396 (i386_prepare_to_resume): New function.
6397 (i386_thread_added): Mark the thread as needing to update irs
6398 debug registers.
6399 (the_low_target): Remove i386_set_thread_context and install
6400 i386_prepare_to_resume.
6401 * win32-low.c (win32_get_thread_context): Adjust.
6402 (win32_set_thread_context): Use SetThreadContext
6403 directly.
6404 (win32_prepare_to_resume): New function.
6405 (win32_require_context): New function, factored out from ...
6406 (thread_rec): ... this.
6407 (continue_one_thread): Call win32_prepare_to_resume on each thread
6408 we're about to continue.
6409 (win32_resume): Call win32_prepare_to_resume on the event thread.
6410 * win32-low.h (struct win32_thread_info)
6411 <debug_registers_changed>: New field.
6412 (struct win32_target_ops): Change prototype of set_thread_context,
6413 delete set_thread_context and add prepare_to_resume.
6414 (win32_require_context): New declaration.
6415
a442d071
GB
64162014-10-08 Gary Benson <gbenson@redhat.com>
6417
6418 * server.h: Do not include common-exceptions.h.
6419
6f1947e8
GB
64202014-10-08 Gary Benson <gbenson@redhat.com>
6421
6422 * server.h: Do not include cleanups.h.
6423
63b434a4
JH
64242014-09-30 James Hogan <james.hogan@imgtec.com>
6425
6426 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
6427 mips64-dsp-linux.c.
6428
c4d9ceb6
YQ
64292014-09-23 Yao Qi <yao@codesourcery.com>
6430
6431 * linux-low.c (lp_status_maybe_breakpoint): New function.
6432 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
6433 (count_events_callback): Likewise.
6434 (select_event_lwp_callback): Likewise.
6435 (cancel_breakpoints_callback): Likewise.
6436
89a5711c
DB
64372014-09-19 Don Breazeal <donb@codesourcery.com>
6438
6439 * linux-low.c (handle_extended_wait): Call
6440 linux_ptrace_get_extended_event.
6441 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
6442 linux_is_extended_waitstatus.
6443
bffc0964
JB
64442014-09-16 Joel Brobecker <brobecker@adacore.com>
6445
6446 * Makefile.in (CPPFLAGS): Define.
6447 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
6448 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
6449
0bfdf32f
GB
64502014-09-16 Gary Benson <gbenson@redhat.com>
6451
6452 * inferiors.h (current_inferior): Renamed as...
6453 (current_thread): New variable. All uses updated.
6454 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
6455 (maybe_move_out_of_jump_pad): Likewise.
6456 (cancel_breakpoint): Likewise.
6457 (linux_low_filter_event): Likewise.
6458 (wait_for_sigstop): Likewise.
6459 (linux_resume_one_lwp): Likewise.
6460 (need_step_over_p): Likewise.
6461 (start_step_over): Likewise.
6462 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
6463 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
6464 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
6465 and save_inferior as saved_thread.
6466 * regcache.c (get_thread_regcache): Renamed saved_inferior as
6467 saved_thread.
6468 (regcache_invalidate_thread): Likewise.
6469 * remote-utils.c (prepare_resume_reply): Likewise.
6470 * thread-db.c (thread_db_get_tls_address): Likewise.
6471 (disable_thread_event_reporting): Likewise.
6472 (remove_thread_event_breakpoints): Likewise.
6473 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
6474 as saved_thread.
6475 * target.h (set_desired_inferior): Renamed as...
6476 (set_desired_thread): New declaration. All uses updated.
6477 * server.c (myresume): Updated comment to reference thread instead
6478 of inferior.
6479 (handle_serial_event): Likewise.
6480 (handle_target_event): Likewise.
6481
361c8ade
GB
64822014-09-12 Tom Tromey <tromey@redhat.com>
6483 Gary Benson <gbenson@redhat.com>
6484
6485 * regcache.h: Include common-regcache.h.
6486 (regcache_read_pc): Don't declare.
6487 * regcache.c (get_thread_regcache_for_ptid): New function.
6488
bd9269f7
GB
64892014-09-11 Tom Tromey <tromey@redhat.com>
6490 Gary Benson <gbenson@redhat.com>
6491
6492 * symbol.c: New file.
6493 * Makefile.in (SFILES): Add symbol.c.
6494 (OBS): Add symbol.o.
6495
f8c1d06b
GB
64962014-09-11 Gary Benson <gbenson@redhat.com>
6497
6498 * target.c (target_stop_ptid, target_continue_ptid): New
6499 functions.
6500
721ec300
GB
65012014-09-11 Tom Tromey <tromey@redhat.com>
6502 Gary Benson <gbenson@redhat.com>
6503
6504 * target.h: Include target/target.h.
6505 * target.c (target_read_memory, target_read_uint32)
6506 (target_write_memory): New functions.
6507
c5e92cca
GB
65082014-09-11 Gary Benson <gbenson@redhat.com>
6509
6510 * server.h (debug_hw_points): Don't declare.
6511 * server.c (debug_hw_points): Don't define. Replace all uses
6512 with show_debug_regs.
6513 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
6514 all uses with show_debug_regs.
6515
2e4bb98a
EBM
65162014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
6517
6518 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
6519 endianness into account.
6520 (ppc_supply_ptrace_register): Likewise.
6521
ac740bc7
JH
65222014-09-03 James Hogan <james.hogan@imgtec.com>
6523
6524 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
6525 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
6526
97ea6506
GB
65272014-09-03 Gary Benson <gbenson@redhat.com>
6528
6529 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
6530 ALL_DEBUG_ADDRESS_REGISTERS.
6531
df7e5265
GB
65322014-09-02 Gary Benson <gbenson@redhat.com>
6533
6534 * i386-low.h: Renamed as...
6535 * x86-low.h: New file. All type, function and variable name
6536 prefixes changed from "i386_" to "x86_". All references updated.
6537 * i386-low.c: Renamed as...
6538 * x86-low.c: New file. All type, function and variable name
6539 prefixes changed from "i386_" to "x86_". All references updated.
6540
ed859da7
GB
65412014-09-02 Gary Benson <gbenson@redhat.com>
6542
6543 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
6544 (x86_linux_new_thread): Likewise.
6545
860789c7
GB
65462014-08-29 Gary Benson <gbenson@redhat.com>
6547
6548 * server.h (setjmp.h): Do not include.
6549 (toplevel): Do not declare.
6550 (common-exceptions.h): Include.
6551 (cleanups.h): Likewise.
6552 * server.c (toplevel): Do not define.
6553 (exit_code): New static global.
6554 (detach_or_kill_for_exit_cleanup): New function.
6555 (main): New function. Original main renamed to...
6556 (captured_main): New function.
6557 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
6558
ff55e1b5
GB
65592014-08-29 Gary Benson <gbenson@redhat.com>
6560
6561 * Makefile.in (SFILES): Add common/common-exceptions.c.
6562 (OBS): Add common-exceptions.o.
6563 (common-exceptions.o): New rule.
6564 * utils.c (prepare_to_throw_exception): New function.
6565
e9bcb658
GB
65662014-08-29 Gary Benson <gbenson@redhat.com>
6567
6568 * config.in: Regenerate.
6569 * configure: Likewise.
6570
e3180625
GB
65712014-08-29 Gary Benson <gbenson@redhat.com>
6572
6573 * Makefile.in (SFILES): Add common/cleanups.c.
6574 (OBS): cleanups.o.
6575 (cleanups.o): New rule.
6576
e3d6ba5d
GB
65772014-08-29 Gary Benson <gbenson@redhat.com>
6578
6579 * utils.c (internal_vwarning): New function.
6580
7096e886
GB
65812014-08-28 Gary Benson <gbenson@redhat.com>
6582
6583 * utils.h (fatal): Remove declaration.
6584 * utils.c (fatal): Remove function.
6585
14ce3192
GB
65862014-08-28 Gary Benson <gbenson@redhat.com>
6587
6588 * tracepoint.c (gdb_agent_init): Replace fatal with
6589 perror_with_name.
6590 (initialize_tracepoint): Likewise.
6591
50278d59
GB
65922014-08-28 Gary Benson <gbenson@redhat.com>
6593
6594 * remote-utils.c (remote_prepare): Replace fatal with error.
6595
aa96c426
GB
65962014-08-28 Gary Benson <gbenson@redhat.com>
6597
6598 * linux-low.c (linux_async): Replace fatal with warning.
6599 Tidy up and return.
6600 (linux_start_non_stop): Return -1 if linux_async failed.
6601
f7160e97
GB
66022014-08-28 Gary Benson <gbenson@redhat.com>
6603
6604 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
6605 gdb_assert.
6606 (i386_dr_low_get_addr): Remove vague comment.
6607 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
6608 gdb_assert.
6609
38e08fca
GB
66102014-08-28 Gary Benson <gbenson@redhat.com>
6611
6612 * inferiors.c (get_thread_process): Replace check with gdb_assert.
6613 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
6614 internal_error.
6615 (linux_resume_one_lwp): Likewise.
6616 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
6617 gdb_assert.
6618 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
6619 with internal_error.
6620 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
6621 (init_register_cache): Replace fatal with gdb_assert_not_reached.
6622 (find_register_by_name): Replace fatal with internal_error.
6623 (find_regno): Likewise.
6624 * tdesc.c (init_target_desc): Replace check with gdb_assert.
6625 * thread-db.c (thread_db_create_event): Likewise.
6626 (thread_db_load_search): Likewise.
6627 (try_thread_db_load_1): Likewise.
6628 * tracepoint.c (get_jump_space_head): Replace fatal with
6629 internal_error.
6630 (claim_trampoline_space): Likewise.
6631 (have_fast_tracepoint_trampoline_buffer): Likewise.
6632 (cmd_qtstart): Likewise.
6633 (stop_tracing): Likewise.
6634 (fast_tracepoint_collecting): Likewise.
6635 (target_malloc): Likewise.
6636 (download_tracepoint): Likewise.
6637 (download_trace_state_variables): Replace check with gdb_assert.
6638 (upload_fast_traceframes): Replace fatal with internal_error.
6639
34abf635
GB
66402014-08-19 Tom Tromey <tromey@redhat.com>
6641 Gary Benson <gbenson@redhat.com>
6642
6643 * Makefile.in (SFILES): Add common/common-debug.c.
6644 (OBS): Add common-debug.o.
6645 (common-debug.o): New rule.
6646 * debug.h (debug_printf): Don't declare.
6647 * debug.c (debug_printf): Renamed and rewritten as...
6648 (debug_vprintf): New function.
6649
f6e94d78
GB
66502014-08-19 Gary Benson <gbenson@redhat.com>
6651
6652 * utils.h: Do not include print-utils.h.
6653
9239eeab
GB
66542014-08-19 Tom Tromey <tromey@redhat.com>
6655 Gary Benson <gbenson@redhat.com>
6656
6657 * server.h: Add static assertion.
6658 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
6659
ef87c8bb
GB
66602014-08-19 Tom Tromey <tromey@redhat.com>
6661 Gary Benson <gbenson@redhat.com>
6662
6663 * Makefile.in (SFILES): Add common/errors.c.
6664 (OBS): Add errors.o.
6665 (IPA_OBS): Add errors-ipa.o.
6666 (errors.o): New rule.
6667 (errors-ipa.o): Likewise.
6668 * utils.h (perror_with_name, error, warning): Don't declare.
6669 * utils.c (warning): Renamed and rewritten as...
6670 (vwarning): New function.
6671 (error): Renamed and rewritten as...
6672 (verror): New function.
6673 (internal_error): Renamed and rewritten as...
6674 (internal_verror): New function.
6675
bb974a24
GB
66762014-08-07 Gary Benson <gbenson@redhat.com>
6677
6678 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
6679 * configure: Regenerate.
6680 * config.in: Likewise.
6681 * server.h: Do not include errno.h.
6682 * event-loop.c: Likewise.
6683 * hostio-errno.c: Likewise.
6684 * linux-low.c: Likewise.
6685 * remote-utils.c: Likewise.
6686 * spu-low.c: Likewise.
6687 * utils.c: Likewise.
6688 * gdbreplay.c: Unconditionally include errno.h.
6689
6d3d12eb
GB
66902014-08-07 Gary Benson <gbenson@redhat.com>
6691
6692 * server.h: Do not include string.h.
6693 * event-loop.c: Likewise.
6694 * linux-low.c: Likewise.
6695 * regcache.c: Likewise.
6696 * remote-utils.c: Likewise.
6697 * spu-low.c: Likewise.
6698 * utils.c: Likewise.
6699
dccbb609
GB
67002014-08-07 Gary Benson <gbenson@redhat.com>
6701
6702 * server.h: Do not include gdb_assert.h.
6703
e76df0d0
GB
67042014-08-07 Gary Benson <gbenson@redhat.com>
6705
6706 * server.h: Do not include common-utils.h.
6707
4cb9c816
GB
67082014-08-07 Gary Benson <gbenson@redhat.com>
6709
6710 * server.h: Do not include ptid.h.
6711 * notif.h: Likewise.
6712
3995eeee
GB
67132014-08-07 Gary Benson <gbenson@redhat.com>
6714
6715 * server.h: Do not include gdb_locale.h.
6716
cb9f1a9b
GB
67172014-08-07 Gary Benson <gbenson@redhat.com>
6718
6719 * server.h: Do not include gdb/signals.h.
6720 * win32-low.c: Likewise.
6721
a5fceff8
GB
67222014-08-07 Gary Benson <gbenson@redhat.com>
6723
6724 * server.h: Do not include pathmax.h.
6725
b9391142
GB
67262014-08-07 Gary Benson <gbenson@redhat.com>
6727
6728 * server.h: Do not include libiberty.h.
6729 * linux-bfin-low.c: Likewise.
6730
0e443c87
GB
67312014-08-07 Gary Benson <gbenson@redhat.com>
6732
6733 * server.h: Do not include ansidecl.h.
6734
8ebb3f56
GB
67352014-08-07 Gary Benson <gbenson@redhat.com>
6736
6737 * linux-x86-low.c: Do not include stddef.h.
6738 * lynx-ppc-low.c: Likewise.
6739 * tracepoint.c: Likewise.
6740
8980bdf6
GB
67412014-08-07 Gary Benson <gbenson@redhat.com>
6742
6743 * server.h: Do not include stdarg.h.
6744 * nto-low.c: Likewise.
6745
d7096f71
GB
67462014-08-07 Gary Benson <gbenson@redhat.com>
6747
6748 * server.h: Do not include stdlib.h.
6749 * inferiors.c: Likewise.
6750 * linux-low.c: Likewise.
6751 * regcache.c: Likewise.
6752 * spu-low.c: Likewise.
6753 * tracepoint.c: Likewise.
6754 * utils.c: Likewise.
6755
d02f550d
GB
67562014-08-07 Gary Benson <gbenson@redhat.com>
6757
6758 * server.h: Do not include stdio.h.
6759 * linux-low.c: Likewise.
6760 * remote-utils.c: Likewise.
6761 * spu-low.c: Likewise.
6762 * utils.c: Likewise.
6763 * wincecompat.c: Likewise.
6764
87f6c4e3
GB
67652014-08-06 Gary Benson <gbenson@redhat.com>
6766
6767 * regcache.c (init_register_cache): Move conditionals inside if.
6768
7089dca4
GB
67692014-08-06 Gary Benson <gbenson@redhat.com>
6770
6771 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
6772
462f517e
GB
67732014-07-31 Gary Benson <gbenson@redhat.com>
6774
6775 * ax.h: Do not include server.h.
6776 * gdbthread.h: Likewise.
6777 * lynx-low.h: Likewise.
6778 * notif.h: Likewise.
6779
976411d6
GB
67802014-07-30 Gary Benson <gbenson@redhat.com>
6781
6782 * server.h: Include common-defs.h.
6783 Do not include config.h or build-gnulib-gdbserver/config.h.
6784
d41f6d8e
GB
67852014-07-30 Gary Benson <gbenson@redhat.com>
6786
6787 * hostio-errno.c: Move server.h to top of includes list.
6788 * inferiors.c: Likewise.
6789 * linux-x86-low.c: Likewise.
6790 * notif.c: Include server.h.
6791
314c6a35
TT
67922014-07-24 Tom Tromey <tromey@redhat.com>
6793 Gary Benson <gbenson@redhat.com>
6794
6795 * server.h (CORE_ADDR): Now unsigned.
6796
69ff6be5
PA
67972014-07-16 Pedro Alves <palves@redhat.com>
6798
6799 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
6800
ce9e3fe7
PA
68012014-07-15 Pedro Alves <palves@redhat.com>
6802
6803 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
6804 copy.
6805
e76126e8
PA
68062014-07-11 Pedro Alves <palves@redhat.com>
6807
6808 * linux-low.c (kill_wait_lwp): New function, based on
6809 kill_one_lwp_callback, but use my_waitpid directly.
6810 (kill_one_lwp_callback, linux_kill): Use it.
6811
8e9db26e
PA
68122014-06-23 Pedro Alves <palves@redhat.com>
6813
6814 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
6815 before setting DR0..DR3.
6816
698b3e08
GB
68172014-06-20 Gary Benson <gbenson@redhat.com>
6818
6819 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
6820 * configure: Regenerated.
6821 * config.in: Likewise.
6822
125f8a3d
GB
68232014-06-20 Gary Benson <gbenson@redhat.com>
6824
6825 * Makefile.in (SFILES): Update locations for files moved
6826 from common to nat.
6827 (object file files): Reordered.
6828
42995dbd
GB
68292014-06-20 Gary Benson <gbenson@redhat.com>
6830
6831 * i386-low.h (i386_dr_low_can_set_addr): Removed.
6832 (i386_dr_low_set_addr): Likewise.
6833 (i386_dr_low_get_addr): Likewise.
6834 (i386_dr_low_can_set_control): Likewise.
6835 (i386_dr_low_set_control): Likewise.
6836 (i386_dr_low_get_control): Likewise.
6837 (i386_dr_low_get_status): Likewise.
6838 (i386_get_debug_register_length): Likewise.
6839 * linux-x86-low.c (i386_dr_low_set_addr):
6840 Changed signature. Made static.
6841 (i386_dr_low_get_addr): Likewise.
6842 (i386_dr_low_set_control): Likewise.
6843 (i386_dr_low_get_control): Likewise.
6844 (i386_dr_low_get_status): Likewise.
6845 (i386_dr_low): New global variable.
6846 * win32-i386-low.c (i386_dr_low_set_addr):
6847 Changed signature. Made static.
6848 (i386_dr_low_get_addr): Likewise.
6849 (i386_dr_low_set_control): Likewise.
6850 (i386_dr_low_get_control): Likewise.
6851 (i386_dr_low_get_status): Likewise.
6852 (i386_dr_low): New global variable.
6853
e1d2394b
MS
68542014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
6855
6856 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
6857 * Makefile.in (AR, AR_FLAGS): Define.
6858 * configure: Regenerate.
6859
3a8ee006
GB
68602014-06-19 Gary Benson <gbenson@redhat.com>
6861
6862 * Makefile.in (i386-dregs.o): New rule.
6863 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
6864 * i386-low.c (target.h): Remove include.
6865 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
6866 (DR_CONTROL_SHIFT): Likewise.
6867 (DR_CONTROL_SIZE): Likewise.
6868 (DR_RW_EXECUTE): Likewise.
6869 (DR_RW_WRITE): Likewise.
6870 (DR_RW_READ): Likewise.
6871 (DR_RW_IORW): Likewise.
6872 (DR_LEN_1): Likewise.
6873 (DR_LEN_2): Likewise.
6874 (DR_LEN_4): Likewise.
6875 (DR_LEN_8): Likewise.
6876 (DR_LOCAL_ENABLE_SHIFT): Likewise.
6877 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
6878 (DR_ENABLE_SIZE): Likewise.
6879 (DR_LOCAL_SLOWDOWN): Likewise.
6880 (DR_GLOBAL_SLOWDOWN): Likewise.
6881 (DR_CONTROL_RESERVED): Likewise.
6882 (I386_DR_CONTROL_MASK): Likewise.
6883 (I386_DR_VACANT): Likewise.
6884 (I386_DR_LOCAL_ENABLE): Likewise.
6885 (I386_DR_GLOBAL_ENABLE): Likewise.
6886 (I386_DR_DISABLE): Likewise.
6887 (I386_DR_SET_RW_LEN): Likewise.
6888 (I386_DR_GET_RW_LEN): Likewise.
6889 (I386_DR_WATCH_HIT): Likewise.
6890 (i386_wp_op_t): Likewise.
6891 (i386_show_dr): Likewise.
6892 (i386_length_and_rw_bits): Likewise.
6893 (i386_insert_aligned_watchpoint): Likewise.
6894 (i386_remove_aligned_watchpoint): Likewise.
6895 (i386_handle_nonaligned_watchpoint): Likewise.
6896 i386_update_inferior_debug_regs(): Likewise.
6897 (i386_dr_insert_watchpoint): Likewise.
6898 (i386_dr_remove_watchpoint): Likewise.
6899 (i386_dr_region_ok_for_watchpoint): Likewise.
6900 (i386_dr_stopped_data_address): Likewise.
6901 (i386_dr_stopped_by_watchpoint): Likewise.
6902
8f26655c
GB
69032014-06-19 Gary Benson <gbenson@redhat.com>
6904
6905 * i386-low.c (i386_dr_show): Renamed to
6906 i386_show_dr and made static. All uses updated.
6907 (i386_dr_length_and_rw_bits): Renamed to
6908 i386_length_and_rw_bits and made static.
6909 All uses updated.
6910 (i386_dr_insert_aligned_watchpoint): Renamed to
6911 i386_insert_aligned_watchpoint and made static.
6912 All uses updated.
6913 (i386_dr_remove_aligned_watchpoint): Renamed to
6914 i386_remove_aligned_watchpoint and made static.
6915 All uses updated.
6916 (i386_dr_update_inferior_debug_regs): Renamed to
6917 i386_update_inferior_debug_regs and made static.
6918 All uses updated.
6919
b9228891
GB
69202014-06-18 Gary Benson <gbenson@redhat.com>
6921
5171def3
GB
6922 * i386-low.h (i386_dr_low_can_set_addr): New macro.
6923 (i386_dr_low_can_set_control): Likewise.
6924 (i386_get_debug_register_length): Likewise.
6925 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
6926 (i386_dr_low_can_set_control): Likewise.
6927 (i386_get_debug_register_length): Likewise.
6928
69292014-06-17 Gary Benson <gbenson@redhat.com>
6930
b9228891
GB
6931 * i386-low.h (i386-dregs.h): New include.
6932 (DR_FIRSTADDR): Now in i386-dregs.h.
6933 (DR_LASTADDR): Likewise.
6934 (DR_NADDR): Likewise.
6935 (DR_STATUS): Likewise.
6936 (DR_CONTROL): Likewise.
6937 (i386_debug_reg_state): Likewise.
6938 (i386_dr_insert_watchpoint): Likewise.
6939 (i386_dr_remove_watchpoint): Likewise.
6940 (i386_dr_region_ok_for_watchpoint): Likewise.
6941 (i386_dr_stopped_data_address): Likewise.
6942 (i386_dr_stopped_by_watchpoint): Likewise.
6943 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
6944
4be83cc2
GB
69452014-06-18 Gary Benson <gbenson@redhat.com>
6946
6947 * i386-low.h (i386_low_insert_watchpoint): Renamed to
6948 i386_dr_insert_watchpoint.
6949 (i386_low_remove_watchpoint): Renamed to
6950 i386_dr_remove_watchpoint.
6951 (i386_low_region_ok_for_watchpoint): Renamed to
6952 i386_dr_region_ok_for_watchpoint.
6953 (i386_low_stopped_data_address): Renamed to
6954 i386_dr_stopped_data_address.
6955 (i386_low_stopped_by_watchpoint): Renamed to
6956 i386_dr_stopped_by_watchpoint.
6957 * i386-low.c (i386_show_dr): Renamed to
6958 i386_dr_show and made nonstatic. All uses updated.
6959 (i386_length_and_rw_bits): Renamed to
6960 i386_dr_length_and_rw_bits and made nonstatic.
6961 All uses updated.
6962 (i386_insert_aligned_watchpoint): Renamed to
6963 i386_dr_insert_aligned_watchpoint and made nonstatic.
6964 All uses updated.
6965 (i386_remove_aligned_watchpoint): Renamed to
6966 i386_dr_remove_aligned_watchpoint and made nonstatic.
6967 All uses updated.
6968 (i386_update_inferior_debug_regs): Renamed to
6969 i386_dr_update_inferior_debug_regs and made nonstatic.
6970 All uses updated.
6971 (i386_low_insert_watchpoint): Renamed to
6972 i386_dr_insert_watchpoint. All uses updated.
6973 (i386_low_remove_watchpoint): Renamed to
6974 i386_dr_remove_watchpoint. All uses updated.
6975 (i386_low_region_ok_for_watchpoint): Renamed to
6976 i386_dr_region_ok_for_watchpoint. All uses updated.
6977 (i386_low_stopped_data_address): Renamed to
6978 i386_dr_stopped_data_address. All uses updated.
6979 (i386_low_stopped_by_watchpoint): Renamed to
6980 i386_dr_stopped_by_watchpoint. All uses updated.
6981
131aa0d4
GB
69822014-06-18 Gary Benson <gbenson@redhat.com>
6983
6984 * i386-low.c (i386_dr_low_can_set_addr): New macro.
6985 (i386_dr_low_can_set_control): Likewise.
6986 (i386_insert_aligned_watchpoint): New check.
6987
d9305f7f
GB
69882014-06-18 Gary Benson <gbenson@redhat.com>
6989
6990 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
6991 Renamed to state.
6992
e927c9fc
GB
69932014-06-18 Gary Benson <gbenson@redhat.com>
6994
6995 * i386-low.c (i386_length_and_rw_bits): Use internal_error
6996 instead of fatal and error.
6997 (i386_handle_nonaligned_watchpoint): Likewise.
6998
1b6d4134
GB
69992014-06-18 Gary Benson <gbenson@redhat.com>
7000
7001 * i386-low.c (i386_get_debug_register_length): New macro.
7002 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
7003 (i386_show_dr): Use debug_printf instead of fprintf. Use
7004 phex to format values.
7005
6e62758f
GB
70062014-06-18 Gary Benson <gbenson@redhat.com>
7007
7008 * i386-low.h: Comment changes.
7009 * i386-low.c: Likewise.
7010
fc6e2f03
GB
70112014-06-18 Gary Benson <gbenson@redhat.com>
7012
7013 * i386-low.c: Whitespace changes.
7014
f9d1eeed
TT
70152014-06-12 Tom Tromey <tromey@redhat.com>
7016
7017 * utils.c (freeargv): Remove.
7018
0b04e523
TT
70192014-06-12 Tom Tromey <tromey@redhat.com>
7020
7021 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
7022 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
7023 (parse_debug_format_options): Likewise.
7024 (gdbserver_usage): Likewise.
7025 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
7026 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
7027 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
7028 against libiberty.
7029 ($(LIBGNU)): Depend on libiberty.
7030 (all-lib): Recurse into all subdirs.
7031 (install-only): Invoke "install" target in subdirs.
7032 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
7033 targets.
7034 * configure: Rebuild.
7035 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
7036 for vasprintf, vsnprintf, or gettimeofday.
7037 * configure.srv: Don't add safe-ctype.o or lbasename.o to
7038 srv_tgtobj.
7039
270c9937
JB
70402014-06-05 Joel Brobecker <brobecker@adacore.com>
7041
7042 * development.sh: Delete.
7043 * Makefile.in (config.status): Adjust dependency on development.sh.
7044 * configure.ac: Adjust development.sh source call.
7045 * configure: Regenerate.
7046
0a261ed8
PA
70472014-06-02 Pedro Alves <palves@redhat.com>
7048
7049 * ax.c (gdb_free_agent_expr): New function.
7050 * ax.h (gdb_free_agent_expr): New declaration.
7051 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
7052 list.
7053 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
7054 static.
7055 (clear_breakpoint_conditions_and_commands): New function.
7056 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
7057 (clear_breakpoint_conditions_and_commands): New declaration.
7058
e9dae05e
RR
70592014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
7060
7061 * linux-aarch64-low.c (asm/ptrace.h): Include.
7062
5876f503
JK
70632014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
7064
7065 Fix TLS access for -static -pthread.
7066 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
7067 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
7068 (thread_db_load_search, try_thread_db_load_1): Initialize it.
7069
802e8e6d
PA
70702014-05-20 Pedro Alves <palves@redhat.com>
7071
7072 * linux-aarch64-low.c (aarch64_insert_point)
7073 (aarch64_remove_point): No longer check whether the type is
7074 supported here. Adjust to new interface.
7075 (the_low_target): Install aarch64_supports_z_point_type as
7076 supports_z_point_type method.
7077 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
7078 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
7079 instead of a Z packet char. Adjust.
7080 (arm_supports_z_point_type): New function.
7081 (arm_insert_point, arm_remove_point): Adjust to new interface.
7082 (the_low_target): Install arm_supports_z_point_type.
7083 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
7084 (cris_insert_point, cris_remove_point): Adjust to new interface.
7085 Don't check whether the type is supported here.
7086 (the_low_target): Install cris_supports_z_point_type.
7087 * linux-low.c (linux_supports_z_point_type): New function.
7088 (linux_insert_point, linux_remove_point): Adjust to new interface.
7089 * linux-low.h (struct linux_target_ops) <insert_point,
7090 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
7091 raw_breakpoint pointer parameter.
7092 <supports_z_point_type>: New method.
7093 * linux-mips-low.c (mips_supports_z_point_type): New function.
7094 (mips_insert_point, mips_remove_point): Adjust to new interface.
7095 Use mips_supports_z_point_type.
7096 (the_low_target): Install mips_supports_z_point_type.
7097 * linux-ppc-low.c (the_low_target): Install NULL as
7098 supports_z_point_type method.
7099 * linux-s390-low.c (the_low_target): Install NULL as
7100 supports_z_point_type method.
7101 * linux-sparc-low.c (the_low_target): Install NULL as
7102 supports_z_point_type method.
7103 * linux-x86-low.c (x86_supports_z_point_type): New function.
7104 (x86_insert_point): Adjust to new insert_point interface. Use
7105 insert_memory_breakpoint. Adjust to new
7106 i386_low_insert_watchpoint interface.
7107 (x86_remove_point): Adjust to remove_point interface. Use
7108 remove_memory_breakpoint. Adjust to new
7109 i386_low_remove_watchpoint interface.
7110 (the_low_target): Install x86_supports_z_point_type.
7111 * lynx-low.c (lynx_target_ops): Install NULL as
7112 supports_z_point_type callback.
7113 * nto-low.c (nto_supports_z_point_type): New.
7114 (nto_insert_point, nto_remove_point): Adjust to new interface.
7115 (nto_target_ops): Install nto_supports_z_point_type.
7116 * mem-break.c: Adjust intro comment.
7117 (struct raw_breakpoint) <raw_type, size>: New fields.
7118 <inserted>: Update comment.
7119 <shlib_disabled>: Delete field.
7120 (enum bkpt_type) <gdb_breakpoint>: Delete value.
7121 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
7122 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
7123 (raw_bkpt_type_to_target_hw_bp_type): New function.
7124 (find_enabled_raw_code_breakpoint_at): New function.
7125 (find_raw_breakpoint_at): New type and size parameters. Use them.
7126 (insert_memory_breakpoint): New function, based off
7127 set_raw_breakpoint_at.
7128 (remove_memory_breakpoint): New function.
7129 (set_raw_breakpoint_at): Reimplement.
7130 (set_breakpoint): New, based on set_breakpoint_at.
7131 (set_breakpoint_at): Reimplement.
7132 (delete_raw_breakpoint): Go through the_target->remove_point
7133 instead of assuming memory breakpoints.
7134 (find_gdb_breakpoint_at): Delete.
7135 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
7136 (find_gdb_breakpoint): New function.
7137 (set_gdb_breakpoint_at): Delete.
7138 (z_type_supported): New function.
7139 (set_gdb_breakpoint_1): New function, loosely based off
7140 set_gdb_breakpoint_at.
7141 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
7142 (delete_gdb_breakpoint_at): Delete.
7143 (delete_gdb_breakpoint_1): New function, loosely based off
7144 delete_gdb_breakpoint_at.
7145 (delete_gdb_breakpoint): New function.
7146 (clear_gdb_breakpoint_conditions): Rename to ...
7147 (clear_breakpoint_conditions): ... this. Don't handle a NULL
7148 breakpoint.
7149 (add_condition_to_breakpoint): Make static.
7150 (add_breakpoint_condition): Take a struct breakpoint pointer
7151 instead of an address. Adjust.
7152 (gdb_condition_true_at_breakpoint): Rename to ...
7153 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
7154 z_type parameter.
7155 (gdb_condition_true_at_breakpoint): Reimplement.
7156 (add_breakpoint_commands): Take a struct breakpoint pointer
7157 instead of an address. Adjust.
7158 (gdb_no_commands_at_breakpoint): Rename to ...
7159 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
7160 parameter. Return true if no breakpoint was found. Change debug
7161 output.
7162 (gdb_no_commands_at_breakpoint): Reimplement.
7163 (run_breakpoint_commands): Rename to ...
7164 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
7165 and change return type to boolean.
7166 (run_breakpoint_commands): New function.
7167 (gdb_breakpoint_here): Also check for Z1 breakpoints.
7168 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
7169 breakpoint. Go through the_target->remove_point instead of
7170 assuming memory breakpoint.
7171 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
7172 software and hardware breakpoints.
7173 (reinsert_raw_breakpoint): Go through the_target->insert_point
7174 instead of assuming memory breakpoint.
7175 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
7176 software and hardware breakpoints.
7177 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
7178 Check both software and hardware breakpoints.
7179 (validate_inserted_breakpoint): Assert the breakpoint is a
7180 software breakpoint. Set the inserted flag to -1 instead of
7181 setting shlib_disabled.
7182 (delete_disabled_breakpoints): Adjust.
7183 (validate_breakpoints): Only validate software breakpoints.
7184 Adjust to inserted flag change.
7185 (check_mem_read, check_mem_write): Skip breakpoint types other
7186 than software breakpoints. Adjust to inserted flag change.
7187 * mem-break.h (enum raw_bkpt_type): New enum.
7188 (raw_breakpoint, struct process_info): Forward declare.
7189 (Z_packet_to_target_hw_bp_type): Delete declaration.
7190 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
7191 (set_gdb_breakpoint, delete_gdb_breakpoint)
7192 (clear_breakpoint_conditions): New declarations.
7193 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
7194 (breakpoint_inserted_here): Update comment.
7195 (add_breakpoint_condition, add_breakpoint_commands): Replace
7196 address parameter with a breakpoint pointer parameter.
7197 (gdb_breakpoint_here): Update comment.
7198 (delete_gdb_breakpoint_at): Delete.
7199 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
7200 * server.c (process_point_options): Take a struct breakpoint
7201 pointer instead of an address. Adjust.
7202 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
7203 delete_gdb_breakpoint.
7204 * spu-low.c (spu_target_ops): Install NULL as
7205 supports_z_point_type method.
7206 * target.h: Include mem-break.h.
7207 (struct target_ops) <prepare_to_access_memory>: Update comment.
7208 <supports_z_point_type>: New field.
7209 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
7210 instead of a char. Also take a raw breakpoint pointer.
7211 * win32-arm-low.c (the_low_target): Install NULL as
7212 supports_z_point_type.
7213 * win32-i386-low.c (i386_supports_z_point_type): New function.
7214 (i386_insert_point, i386_remove_point): Adjust to new interface.
7215 (the_low_target): Install i386_supports_z_point_type.
7216 * win32-low.c (win32_supports_z_point_type): New function.
7217 (win32_insert_point, win32_remove_point): Adjust to new interface.
7218 (win32_target_ops): Install win32_supports_z_point_type.
7219 * win32-low.h (struct win32_target_ops):
7220 <supports_z_point_type>: New method.
7221 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
7222 instead of a char. Also take a raw breakpoint pointer.
7223
932539e3
PA
72242014-05-20 Pedro Alves <palves@redhat.com>
7225
7226 * mem-break.h: Include break-common.h.
7227 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
7228 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
7229 (Z_packet_to_target_hw_bp_type): New declaration.
7230 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
7231 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
7232 (Z_PACKET_ACCESS_WP): Delete macros.
7233 (Z_packet_to_hw_type): Delete function.
7234 * i386-low.h: Don't include break-common.h here.
7235 (Z_packet_to_hw_type): Delete declaration.
7236 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
7237 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
7238 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
7239 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
7240 * linux-aarch64-low.c: Don't include break-common.h here.
7241 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
7242 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
7243 (Z_packet_to_target_hw_bp_type): Delete function.
7244 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
7245 function.
7246 (mips_insert_point, mips_remove_point): Use
7247 Z_packet_to_target_hw_bp_type.
7248
4ff0d3d8
PA
72492014-05-20 Pedro Alves <palves@redhat.com>
7250
7251 * linux-aarch64-low.c: Include break-common.h.
7252 (enum target_point_type): Delete.
7253 (Z_packet_to_point_type): Rename to ...
7254 (Z_packet_to_target_hw_bp_type): ... this, and return a
7255 target_hw_bp_type instead.
7256 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
7257 instead of an enum target_point_type.
7258 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
7259 breakpoint type.
7260 (aarch64_dr_state_insert_one_point)
7261 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
7262 (aarch64_handle_aligned_watchpoint)
7263 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
7264 Take an enum target_hw_bp_type instead of an enum
7265 target_point_type.
7266 (aarch64_supports_z_point_type): New function.
7267 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
7268 use Z_packet_to_target_hw_bp_type.
7269
786dc519
JB
72702014-05-20 Joel Brobecker <brobecker@adacore.com>
7271
7272 * configure.ac: Only use -Werror by default when DEVELOPMENT
7273 is true.
7274 * configure: Regenerate.
7275
9e0aa64f
JK
72762014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
7277
7278 Fix gdbserver qGetTLSAddr for x86_64 -m32.
7279 * linux-x86-low.c (X86_64_USER_REGS): New.
7280 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
7281
2b577b92
YQ
72822014-04-28 Yao Qi <yao@codesourcery.com>
7283
7284 * Makefile.in (i386-avx512.c): Fix the typo of generated file
7285 name.
7286
94611da2
PA
72872014-04-25 Pedro Alves <palves@redhat.com>
7288
7289 PR server/16255
7290 * linux-low.c (linux_attach_fail_reason_string): New function.
7291 (linux_attach_lwp): Delete.
7292 (linux_attach_lwp_1): Rename to ...
7293 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
7294 argument. Remove "initial" parameter. Return int instead of
7295 void. Don't error or warn here.
7296 (linux_attach): Adjust to call linux_attach_lwp. Call error on
7297 failure to attach to the tgid. Call warning when failing to
7298 attach to an lwp.
7299 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
7300 argument. Remove "initial" parameter. Return int instead of
7301 void. Don't error or warn here.
7302 (linux_attach_fail_reason_string): New declaration.
7303 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
7304 interface change. Use linux_attach_fail_reason_string.
7305
01f9f808
MS
73062014-04-24 Michael Sturm <michael.sturm@mintel.com>
7307 Walfred Tedeschi <walfred.tedeschi@intel.com>
7308
7309 * Makefile.in: Added rules to handle new files
7310 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
7311 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
7312 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
7313 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
7314 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
7315 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
7316 x32-avx512-linux.o.
7317 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
7318 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
7319 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
7320 i386/x32-avx512.xml.
7321 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
7322 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
7323 i386/x32-avx512-linux.xml.
7324 * i387-fp.c (num_avx512_k_registers): New constant for number
7325 of K registers.
7326 (num_avx512_zmmh_low_registers): New constant for number of
7327 lower ZMM registers (0-15).
7328 (num_avx512_zmmh_high_registers): New constant for number of
7329 higher ZMM registers (16-31).
7330 (num_avx512_ymmh_registers): New contant for number of higher
7331 YMM registers (ymm16-31 added by avx521 on x86_64).
7332 (num_avx512_xmm_registers): New constant for number of higher
7333 XMM registers (xmm16-31 added by AVX512 on x86_64).
7334 (struct i387_xsave): Add space for AVX512 registers.
7335 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
7336 Add code to handle AVX512 registers.
7337 (i387_xsave_to_cache): Add code to handle AVX512 registers.
7338 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
7339 prototypei from generated file.
7340 (tdesc_amd64_avx512_linux): Likewise.
7341 (init_registers_x32_avx512_linux): Likewise.
7342 (tdesc_x32_avx512_linux): Likewise.
7343 (init_registers_i386_avx512_linux): Likewise.
7344 (tdesc_i386_avx512_linux): Likewise.
7345 (x86_64_regmap): Add AVX512 registers.
7346 (x86_linux_read_description): Add code to handle AVX512 XSTATE
7347 mask.
7348 (initialize_low_arch): Add code to initialize AVX512 registers.
7349
51aa91f9
PA
73502014-04-23 Pedro Alves <palves@redhat.com>
7351
7352 * mem-break.c (find_gdb_breakpoint_at): Make static.
7353 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
7354
a4165e94
PA
73552014-04-23 Pedro Alves <palves@redhat.com>
7356
7357 * i386-low.c: Don't include break-common.h here.
7358 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
7359 prototype to take target_hw_bp_type as argument instead of a Z
7360 packet char.
7361 * i386-low.h: Include break-common.h here.
7362 (Z_packet_to_hw_type): Declare.
7363 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
7364 prototypes.
7365 * linux-x86-low.c (x86_insert_point): Convert the packet number to
7366 a target_hw_bp_type before calling i386_low_insert_watchpoint.
7367 (x86_remove_point): Convert the packet number to a
7368 target_hw_bp_type before calling i386_low_remove_watchpoint.
7369 * win32-i386-low.c (i386_insert_point): Convert the packet number
7370 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
7371 (i386_remove_point): Convert the packet number to a
7372 target_hw_bp_type before calling i386_low_remove_watchpoint.
7373
b8acf843
PA
73742014-04-23 Pedro Alves <palves@redhat.com>
7375
7376 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
7377
d708bcd1
PA
73782014-04-10 Pedro Alves <palves@redhat.com>
7379
7380 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
7381 Check if the condition or command is NULL before checking if the
7382 breakpoint is known. On success, return true.
7383 * mem-break.h (add_breakpoint_condition): Document return.
7384 (add_breakpoint_commands): Add describing comment.
7385 * server.c (skip_to_semicolon): New function.
7386 (process_point_options): Use it.
7387
2eec7d5b
PA
73882014-04-09 Pedro Alves <palves@redhat.com>
7389
7390 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
7391 to lwpid_of.
7392
fa96cb38
PA
73932014-02-27 Pedro Alves <palves@redhat.com>
7394
7395 PR 12702
7396 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
7397 macros.
7398 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
7399 output.
7400 (last_thread_of_process_p): Take a PID argument instead of a
7401 thread pointer.
7402 (linux_wait_for_lwp): Delete.
7403 (num_lwps, check_zombie_leaders, not_stopped_callback): New
7404 functions.
7405 (linux_low_filter_event): New function, party factored out from
7406 linux_wait_for_event.
7407 (linux_wait_for_event): Rename to ...
7408 (linux_wait_for_event_filtered): ... this. Add new filter ptid
7409 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
7410 sigsuspend. Check for zombie leaders.
7411 (linux_wait_for_event): Reimplement as wrapper around
7412 linux_wait_for_event_filtered.
7413 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
7414 a normal or signal exit is seen, it's the whole process exiting.
7415 (wait_for_sigstop): No longer a for_each_inferior callback.
7416 Rewrite on top of linux_wait_for_event_filtered.
7417 (stop_all_lwps): Call wait_for_sigstop directly.
7418 * server.c (resume, handle_target_event): Handle
7419 TARGET_WAITKIND_NO_RESUMED.
7420
d763de10
JB
74212014-02-26 Joel Brobecker <brobecker@adacore.com>
7422
7423 * win32-low.c (psapi_get_dll_name,
7424 * win32_CreateToolhelp32Snapshot): Delete.
7425 (win32_CreateToolhelp32Snapshot, win32_Module32First)
7426 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
7427 Delete.
7428 (handle_load_dll): Add function description.
7429 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
7430
850a0f76
JB
74312014-02-26 Joel Brobecker <brobecker@adacore.com>
7432
7433 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
7434 Add comment.
7435 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
7436 base address when calling win32_add_one_solib.
7437 (handle_load_dll): Delete local variable load_addr.
7438 Remove 0x1000 offset applied to DLL base address when calling
7439 win32_add_one_solib.
7440 (handle_unload_dll): Add comment.
7441
f25b3fc3
JB
74422014-02-26 Joel Brobecker <brobecker@adacore.com>
7443
7444 * win32-low.c (win32_add_all_dlls): Renames
7445 win32_ensure_ntdll_loaded. Rewrite function documentation.
7446 Adjust implementation to always load all DLLs.
7447 Add 0x1000 offset to DLL base address when calling
7448 win32_add_one_solib.
7449 (child_initialization_done): New static global.
7450 (do_initial_child_stuff): Set child_initialization_done to
7451 zero during child initialization, and 1 after. Replace call
7452 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
7453 Add comment.
7454 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
7455 (handle_unload_dll): Add function documentation.
7456 (get_child_debug_event): Ignore load and unload DLL events
7457 during child initialization.
7458
d86d4aaf
DE
74592014-02-20 Doug Evans <dje@google.com>
7460
3bc32da3 7461 Remove global all_lwps.
d86d4aaf
DE
7462 * inferiors.h (ptid_of): Move here from linux-low.h.
7463 (pid_of, lwpid_of): Ditto.
7464 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
7465 parameter is a struct thread_info * now.
7466 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
7467 directly. Pass &all_threads to find_inferior instead of &all_lwps.
7468 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
7469 directly.
7470 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
7471 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
7472 * linux-arm-low.c (update_registers_callback): Update, "entry"
7473 parameter is a struct thread_info * now.
7474 Fetch lwpid from current_inferior directly.
7475 (arm_insert_point): Pass &all_threads to find_inferior instead of
7476 &all_lwps.
7477 (arm_remove_point): Ditto.
7478 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
7479 (arm_prepare_to_resume): Fetch pid from thread.
7480 (arm_read_description): Fetch lwpid from current_inferior directly.
7481 * linux-low.c (all_lwps): Delete.
7482 (delete_lwp): Delete call to remove_inferior.
7483 (handle_extended_wait): Fetch lwpid from thread.
7484 (add_lwp): Don't set lwp->entry.id. Remove call to
7485 add_inferior_to_list.
7486 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
7487 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
7488 (kill_one_lwp_callback): Ditto.
7489 (linux_kill): Don't dereference NULL pointer.
7490 Fetch ptid,lwpid from thread.
7491 (get_detach_signal): Fetch ptid from thread.
7492 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
7493 Simplify call to regcache_invalidate_thread.
7494 (delete_lwp_callback): Update, "entry" parameter is a
7495 struct thread_info * now. Fetch pid from thread.
7496 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
7497 (status_pending_p_callback): Update, "entry" parameter is a
7498 struct thread_info * now. Fetch ptid from thread.
7499 (find_lwp_pid): Update, "entry" parameter is a
7500 struct thread_info * now.
7501 (linux_wait_for_lwp): Fetch pid from thread.
7502 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
7503 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
7504 (enqueue_one_deferred_signal): Fetch lwpid from thread.
7505 (dequeue_one_deferred_signal): Ditto.
7506 (cancel_breakpoint): Fetch ptid from current_inferior.
7507 (linux_wait_for_event): Pass &all_threads to find_inferior,
7508 not &all_lwps. Fetch ptid, lwpid from thread.
7509 (count_events_callback): Update, "entry" parameter is a
7510 struct thread_info * now.
7511 (select_singlestep_lwp_callback): Ditto.
7512 (select_event_lwp_callback): Ditto.
7513 (cancel_breakpoints_callback): Ditto.
7514 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
7515 not &all_lwps.
7516 (select_event_lwp): Ditto. Fetch ptid from event_thread.
7517 (unsuspend_one_lwp): Update, "entry" parameter is a
7518 struct thread_info * now.
7519 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
7520 not &all_lwps.
7521 (linux_stabilize_threads): Ditto. And for for_each_inferior.
7522 Fetch lwpid from thread, not lwp.
7523 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
7524 Pass &all_threads to find_inferior, not &all_lwps.
7525 (send_sigstop): Fetch lwpid from thread, not lwp.
7526 (send_sigstop_callback): Update, "entry" parameter is a
7527 struct thread_info * now.
7528 (suspend_and_send_sigstop_callback): Ditto.
7529 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
7530 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
7531 struct thread_info * now.
7532 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
7533 from thread, lwp.
7534 (lwp_running): Update, "entry" parameter is a
7535 struct thread_info * now.
7536 (stop_all_lwps): Fetch ptid from thread.
7537 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
7538 (linux_resume_one_lwp): Fetch lwpid from thread.
7539 (linux_set_resume_request): Update, "entry" parameter is a
7540 struct thread_info * now. Fetch pid, lwpid from thread.
7541 (resume_status_pending_p): Update, "entry" parameter is a
7542 struct thread_info * now.
7543 (need_step_over_p): Ditto. Fetch lwpid from thread.
7544 (start_step_over): Fetch lwpid from thread.
7545 (linux_resume_one_thread): Update, "entry" parameter is a
7546 struct thread_info * now. Fetch lwpid from thread.
7547 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
7548 (proceed_one_lwp): Update, "entry" parameter is a
7549 struct thread_info * now. Fetch lwpid from thread.
7550 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
7551 struct thread_info * now.
7552 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
7553 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
7554 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
7555 directly.
7556 (regsets_store_inferior_registers): Ditto.
7557 (fetch_register, store_register): Ditto.
7558 (linux_read_memory, linux_write_memory): Ditto.
7559 (linux_request_interrupt): Ditto.
7560 (linux_read_auxv): Ditto.
7561 (linux_xfer_siginfo): Ditto.
7562 (linux_qxfer_spu): Ditto.
7563 (linux_qxfer_libraries_svr4): Ditto.
7564 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
7565 moved to inferiors.h.
7566 (get_lwp): Delete.
7567 (get_thread_lwp): Update.
7568 (struct lwp_info): Delete member "entry". Simplify comment for
7569 member "thread".
7570 (all_lwps): Delete.
7571 * linux-mips-low.c (mips_read_description): Fetch lwpid from
7572 current_inferior directly.
7573 (update_watch_registers_callback): Update, "entry" parameter is a
7574 struct thread_info * now. Fetch pid from thread.
7575 (mips_linux_prepare_to_resume): Fetch ptid from thread.
7576 (mips_insert_point): Fetch lwpid from current_inferior.
7577 Pass &all_threads to find_inferior, not &all_lwps.
7578 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
7579 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
7580 directly.
7581 (mips_stopped_data_address): Ditto.
7582 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
7583 directly.
7584 * linux-tile-low.c (tile_arch_setup): Ditto.
7585 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
7586 (update_debug_registers_callback): Update, "entry" parameter is a
7587 struct thread_info * now. Fetch pid from thread.
7588 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
7589 Pass &all_threads to find_inferior, not &all_lwps.
7590 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
7591 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
7592 Pass &all_threads to find_inferior, not &all_lwps.
7593 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
7594 (i386_dr_low_get_status): Ditto.
7595 (x86_linux_prepare_to_resume): Fetch ptid from thread.
7596 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
7597 (x86_linux_read_description): Ditto.
7598 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
7599
3b8361aa
DE
76002014-02-20 Doug Evans <dje@google.com>
7601
7602 * inferiors.c (get_first_inferior): Fix buglet.
7603
f7667f0d
DE
76042014-02-19 Doug Evans <dje@google.com>
7605
7606 * gdbthread.h (add_thread): Change result type to struct thread_info *.
7607 * inferiors.c (add_thread): Change result type to struct thread_info *.
7608 All callers updated.
7609 (add_lwp): Call add_thread here instead of in callers.
7610 All callers updated.
7611 * linux-low.h (get_lwp_thread): Rewrite.
7612 (struct lwp_info): New member "thread".
7613
b3312d80
DE
76142014-02-19 Doug Evans <dje@google.com>
7615
7616 * linux-low.c (add_lwp): Change result to struct lwp_info *.
7617 All callers updated.
7618
ecc6f45c
DE
76192014-02-19 Doug Evans <dje@google.com>
7620
7621 * inferiors.c (add_thread): Fix whitespace.
7622
649ebbca
DE
76232014-02-19 Doug Evans <dje@google.com>
7624
7625 * dll.c (clear_dlls): Replace accessing list implemention details
7626 with API function.
7627 * gdbthread.h (get_first_thread): Declare.
7628 * inferiors.c (for_each_inferior_with_data): New function.
7629 (get_first_thread): New function.
7630 (find_thread_ptid): Simplify.
7631 (get_first_inferior): New function.
7632 (clear_list): Delete.
7633 (one_inferior_p): New function.
7634 (clear_inferior_list): New function.
7635 (clear_inferiors): Update.
7636 * inferiors.h (for_each_inferior_with_data): Declare.
7637 (clear_inferior_list): Declare.
7638 (one_inferior_p): Declare.
7639 (get_first_inferior): Declare.
7640 * linux-low.c (linux_wait_for_event): Replace accessing list
7641 implemention details with API function.
7642 * server.c (target_running): Ditto.
7643 (accumulate_file_name_length): New function.
7644 (emit_dll_description): New function.
7645 (handle_qxfer_libraries): Replace accessing list implemention
7646 details with API function.
7647 (handle_qxfer_threads_worker): New function.
7648 (handle_qxfer_threads_proper): Replace accessing list implemention
7649 details with API function.
7650 (handle_query): Ditto.
7651 (visit_actioned_threads_callback_ftype): New typedef.
7652 (visit_actioned_threads_data): New struct.
7653 (visit_actioned_threads): Rewrite to be find_inferior callback.
7654 (resume): Call find_inferior.
7655 (handle_status): Replace accessing list implemention
7656 details with API function.
7657 (process_serial_event): Replace accessing list implemention details
7658 with API function.
7659 * target.c (set_desired_inferior): Replace accessing list implemention
7660 details with API function.
7661 * tracepoint.c (same_process_p): New function.
7662 (gdb_agent_about_to_close): Replace accessing list implemention
7663 details with API function.
7664 * win32-low.c (child_delete_thread): Replace accessing list
7665 implemention details with API function.
7666 (match_dll_by_basename): New function.
7667 (dll_is_loaded_by_basename): New function.
7668 (win32_ensure_ntdll_loaded): Replace accessing list implemention
7669 details call to dll_is_loaded_by_basename.
7670
80894984
DE
76712014-02-19 Doug Evans <dje@google.com>
7672
7673 * dll.h (struct dll_info): Add comment.
7674 * gdbthread.h (struct thread_info): Add comment.
7675 (current_ptid): Simplify.
7676 * inferiors.c (add_process): Update.
7677 (remove_process): Update.
7678 * inferiors.h (struct process_info): Rename member "head" to "entry".
7679 * linux-low.c (delete_lwp): Update.
7680 (add_lwp): Update.
7681 (last_thread_of_process_p): Update.
7682 (kill_one_lwp_callback, linux_kill): Update.
7683 (status_pending_p_callback): Update.
7684 (wait_for_sigstop): Update. Simplify read of ptid.
7685 (start_step_over): Update.
7686 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
7687 (get_lwp_thread): Update.
7688 (struct lwp_info): Rename member "head" to "entry".
7689 * regcache.h (inferior_list_entry): Delete.
7690 * server.c (kill_inferior_callback): Update.
7691 (detach_or_kill_inferior_callback): Update.
7692 (print_started_pid): Update.
7693 (print_attached_pid): Update.
7694 (process_serial_event): Simplify read of ptid.
7695 * thread-db.c (thread_db_create_event): Update.
7696 (thread_db_get_tls_address): Update.
7697 * win32-low.c (current_inferior_ptid): Simplify.
7698
46917d26
TT
76992014-02-19 Tom Tromey <tromey@redhat.com>
7700
7701 * target.h (struct target_ops) <supports_btrace>: Add target_ops
7702 argument.
7703 (target_supports_btrace): Update.
7704
0759a81e
YQ
77052014-02-14 Yao Qi <yao@codesourcery.com>
7706
7707 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
7708 (rsp-low-ipa.o): New target.
7709
a7191e8b
TT
77102014-02-12 Tom Tromey <tromey@redhat.com>
7711
7712 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
7713 convert_ascii_to_int.
7714 * regcache.c (registers_to_string): Likewise.
7715 * remote-utils.c (decode_M_packet): Likewise.
7716 * server.c (process_serial_event): Likewise.
7717
ff0e980e
TT
77182014-02-12 Tom Tromey <tromey@redhat.com>
7719
7720 * server.c (handle_query, handle_v_run): Use hex2bin, not
7721 unhexify.
7722 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
7723
e9371aff
TT
77242014-02-12 Tom Tromey <tromey@redhat.com>
7725
7726 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
7727 convert_int_to_ascii.
7728 * regcache.c (registers_to_string, collect_register_as_string):
7729 Likewise.
7730 * remote-utils.c (look_up_one_symbol, relocate_instruction):
7731 Likewise.
7732 * server.c (process_serial_event): Likewise.
7733 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
7734 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
7735
971dc0b8
TT
77362014-02-12 Tom Tromey <tromey@redhat.com>
7737
7738 * remote-utils.c (look_up_one_symbol, monitor_output): Use
7739 bin2hex, not hexify.
7740 * tracepoint.c (cmd_qtstatus): Likewise.
7741
0a822afb
TT
77422014-02-12 Tom Tromey <tromey@redhat.com>
7743
7744 * remote-utils.c (monitor_output): Pass explicit length to
7745 hexify.
7746
9c3d6531
TT
77472014-02-12 Tom Tromey <tromey@redhat.com>
7748
7749 * tracepoint.c: Include rsp-low.h.
7750 * server.c: Include rsp-low.h.
7751 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
7752 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
7753 declare.
7754 * remote-utils.c: Include rsp-low.h.
7755 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
7756 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
7757 (convert_int_to_ascii, convert_ascii_to_int): Move to
7758 common/rsp-low.c.
7759 * regcache.c: Include rsp-low.h.
7760 * ax.c: Include rsp-low.h.
7761 * Makefile.in (SFILES): Add common/rsp-low.c.
7762 (OBS): Add rsp-low.o.
7763 (rsp-low.o): New target.
7764
01fd3ea5
TT
77652014-02-12 Tom Tromey <tromey@redhat.com>
7766
7767 * utils.h (pulongest, plongest, phex_nz): Don't declare.
7768 Include print-utils.h.
7769 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
7770 (plongest, thirty_two, phex_nz): Remove.
7771 * Makefile.in (SFILES): Add common/print-utils.c.
7772 (OBS): Add print-utils.o.
7773 (print-utils-ipa.o): New target.
7774 (print-utils.o): New target.
7775 (IPA_OBJS): Add print-utils-ipa.o.
7776
e99dc820
TT
77772014-02-06 Tom Tromey <tromey@redhat.com>
7778
7779 * Makefile.in (SFILES): Fix indentation.
7780
ee1e2d4f
DE
77812014-02-05 Doug Evans <dje@google.com>
7782
7783 * linux-low.c (linux_wait_for_event): Improve comment.
7784 (linux_wait_1): Keep current_inferior in sync with event_child.
7785
f5a02773
DE
77862014-01-22 Doug Evans <dje@google.com>
7787
7788 * gdbthread.h (gdb_id_to_thread): Delete, unused.
7789
87ce2a04
DE
77902014-01-22 Doug Evans <dje@google.com>
7791
7792 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
7793 * configure: Regenerate.
7794 * config.in: Regenerate.
7795 * Makefile.in (SFILES): Add debug.c.
7796 (OBS): Add debug.o.
7797 * debug.c: New file.
7798 * debug.h: New file.
7799 * linux-aarch64-low.c (*): Update all debugging printfs to use
7800 debug_printf instead of fprintf.
7801 * linux-arm-low.c (*): Ditto.
7802 * linux-cris-low.c (*): Ditto.
7803 * linux-crisv32-low.c (*): Ditto.
7804 * linux-m32r-low.c (*): Ditto.
7805 * linux-sparc-low.c (*): Ditto.
7806 * linux-x86.c (*): Ditto.
7807 * linux-low.c (*): Ditto.
7808 (linux_wait_1): Add calls to debug_enter, debug_exit.
7809 (linux_wait): Remove redundant debugging printf.
7810 (stop_all_lwps): Add calls to debug_enter, debug_exit.
7811 (linux_resume, unstop_all_lwps): Ditto.
7812 * mem-break.c (*): Update all debugging printfs to use
7813 debug_printf instead of fprintf.
7814 * remote-utils.c (*): Ditto.
7815 * thread-db.c (*): Ditto.
7816 * server.c #include <ctype.h>, "gdb_vecs.h".
7817 (debug_threads): Moved to debug.c.
7818 (*): Update all debugging printfs to use debug_printf instead of
7819 fprintf.
7820 (start_inferior): Replace call to fflush with call to debug_flush.
7821 (monitor_show_help): Mention set debug-format.
7822 (parse_debug_format_options): New function.
7823 (handle_monitor_command): Handle "monitor set debug-format".
7824 (gdbserver_usage): Mention --debug-format.
7825 (main): Parse --debug-format.
7826 * server.h (debug_threads): Declaration moved to debug.h.
7827 #include "debug.h".
7828 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
7829 trace_debug_1 that uses debug_printf.
7830 (tracepoint_look_up_symbols): Update all debugging printfs to use
7831 debug_printf instead of fprintf.
7832
e671835b
BS
78332014-01-20 Baruch Siach <baruch@tkos.co.il>
7834
7835 * linux-xtensa-low.c: Include asm/ptrace.h instead of
7836 sys/ptrace.h.
7837
b5737fa9
PA
78382014-01-17 Pedro Alves <palves@redhat.com>
7839
ea38d2a9 7840 PR build/16445
c7faa97a
PA
7841 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
7842 defined after including gdb_proc_service.h.
b5737fa9 7843
40ed484e
DE
78442014-01-16 Doug Evans <dje@google.com>
7845
7846 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
7847 (match_dll): Use it.
7848
969c39fb
MM
78492014-01-16 Markus Metzger <markus.t.metzger@intel.com>
7850
7851 * target.h (target_ops) <read_btrace>: Change parameters and
7852 return type to allow error reporting.
7853 * server.c (handle_qxfer_btrace): Support delta reads. Pass
7854 trace reading errors on.
7855 * linux-low.c (linux_low_read_btrace): Pass trace reading
7856 errors on.
7857 (linux_low_disable_btrace): New.
7858
ab7f45ba
DE
78592014-01-15 Doug Evans <dje@google.com>
7860
7861 * inferiors.c (thread_id_to_gdb_id): Delete.
7862 * inferiors.h (thread_id_to_gdb_id): Delete.
7863
66af0f44
EZ
78642014-01-13 Eli Zaretskii <eliz@gnu.org>
7865
7866 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
7867 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
7868 versions.
7869
9939e131
PA
78702014-01-08 Pedro Alves <palves@redhat.com>
7871
7872 * server.c (handle_status): Don't discard previous queued stop
7873 replies or thread's pending status here.
7874 (main) <disconnection>: Do it here instead.
7875
b7ea362b
PA
78762014-01-08 Pedro Alves <palves@redhat.com>
7877
7878 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
7879 * server.c (visit_actioned_threads, handle_pending_status): New
7880 function.
7881 (handle_v_cont): Factor out parts to ...
7882 (resume): ... this new function. If in all-stop, and a thread
7883 being resumed has a pending status, report it without actually
7884 resuming.
7885 (myresume): Adjust to use the new 'resume' function.
7886 (clear_pending_status_callback, set_pending_status_callback)
7887 (find_status_pending_thread_callback): New functions.
7888 (handle_status): Handle the case of multiple threads having
7889 interesting statuses to report. Report threads' real last signal
7890 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
7891 with an interesting thread to report the status for, instead of
7892 always reporting the status of the first thread.
7893
28498c42
JB
78942014-01-01 Joel Brobecker <brobecker@adacore.com>
7895
7896 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
7897 * gdbreplay.c (gdbreplay_version): Likewise.
7898
f45c82da
YZ
78992013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
7900
7901 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
7902 iov.iov_len with the real length in use.
7903
379a5e2d
JB
79042013-12-13 Joel Brobecker <brobecker@adacore.com>
7905
7906 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
7907 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
7908 for all targets that use win32-low.c.
7909 * win32-low.c (win32_ensure_ntdll_loaded): New function.
7910 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
7911
4210d83e
PA
79122013-12-13 Pedro Alves <palves@redhat.com>
7913
7914 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
7915 if equal to TARGET_WAITKIND_LOADED.
7916 * win32-low.c (cached_status): New static global.
7917 (win32_wait): Add declaration.
7918 (do_initial_child_stuff): Flush all initial pending debug events
7919 up to the initial breakpoint.
7920 (win32_wait): If CACHED_STATUS was set, return that instead
7921 of doing a real wait. Remove the code resuming the execution
7922 of the inferior after receiving a TARGET_WAITKIND_LOADED event
7923 during the initial phase. Also remove the code changing
7924 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
7925 TARGET_WAITKIND_STOPPED.
7926
e7f0d979
YQ
79272013-12-11 Yao Qi <yao@codesourcery.com>
7928
7929 * notif.c (handle_notif_ack): Return 0 if no notification
7930 matches.
7931
ebcf782c
DE
79322013-11-20 Doug Evans <dje@google.com>
7933
7934 * linux-low.c (linux_set_resume_request): Fix comment.
7935
20ad9378
DE
79362013-11-20 Doug Evans <dje@google.com>
7937
7938 * linux-low.c (resume_status_pending_p): Tweak comment.
7939
a196ebeb
WT
79402013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
7941
7942 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
7943 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
7944 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
7945 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
7946 (srv_amd64_regobj): Add amd64-mpx.o.
7947 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
7948 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
7949 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
7950 * i387-fp.c (num_pl_bnd_register) Added constant.
7951 (num_pl_bnd_cfg_registers) Added constant.
7952 (struct i387_xsave) Added reserved area and MPX fields.
7953 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
7954 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
7955 function.
7956 (tdesc_i386_mpx_linux): Add MPX amd64 target.
7957 (init_registers_amd64_mpx_linux): Declare new function.
7958 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
7959 (x86_64_regmap): Add MPX registers.
7960 (x86_linux_read_description): Add MPX case.
7961 (initialize_low_arch): Initialize MPX targets.
7962
0080a2f6
TT
79632013-11-18 Tom Tromey <tromey@redhat.com>
7964
7965 * configure: Rebuild.
7966 * configure.ac: Don't check for stdlib.h.
7967 * gdbreplay.c: Unconditionally include stdlib.h.
7968
2978b111
TT
79692013-11-18 Tom Tromey <tromey@redhat.com>
7970
7971 * config.in: Rebuild.
7972 * configure: Rebuild.
7973 * configure.ac: Don't use AC_HEADER_DIRENT.
7974
a3d08894
TT
79752013-11-18 Tom Tromey <tromey@redhat.com>
7976
7977 * server.h: Don't check HAVE_STRING_H.
7978 * gdbreplay.c: Don't check HAVE_STRING_H.
7979 * configure: Rebuild.
7980
0a5dd17d
TT
79812013-11-18 Tom Tromey <tromey@redhat.com>
7982
7983 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
7984 LIBGNU.
7985
1bd2f0ba
TT
79862013-11-08 Tom Tromey <tromey@redhat.com>
7987
7988 * configure, config.in: Rebuild.
7989 * configure.ac: Remove unused configury.
7990
3266f10b
TT
79912013-11-08 Tom Tromey <tromey@redhat.com>
7992
7993 * acinclude.m4: Include common.m4, codeset.m4.
7994 * configure, config.in: Rebuild.
7995 * configure.ac: Use GDB_AC_COMMON.
7996
6682d959
AA
79972013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
7998
7999 * linux-s390-low.c (HWCAP_S390_TE): New define.
8000 (s390_arch_setup): Consider the TE field in the HWCAP for
8001 determining 'have_regset_tdb'.
8002
fd0a4d76
SDJ
80032013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
8004
8005 PR gdb/16014
8006 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
8007 call to sizeof.
8008
1a3d890b
PA
80092013-10-02 Pedro Alves <palves@redhat.com>
8010
8011 * server.c (process_serial_event): Don't output "GDBserver
8012 exiting" if GDB is connected through stdio.
8013 * target.c (mywait): Likewise, be silent if GDB is connected
8014 through stdio.
8015
97ad4581
JB
80162013-10-01 Joel Brobecker <brobecker@adacore.com>
8017
8018 * lynx-low.c (lynx_add_threads_after_attach): New function.
8019 (lynx_attach): Remove call to add_thread. Add call to
8020 lynx_add_threads_after_attach instead.
8021
5b4e221c
MF
80222013-09-28 Mike Frysinger <vapier@gentoo.org>
8023
8024 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
8025 * config.in, configure: Regenerated.
8026
ee47b2f8
YQ
80272013-09-18 Yao Qi <yao@codesourcery.com>
8028
8029 PR server/15959
8030 * server.c (start_inferior): Clear 'resume_info'.
8031
d6707650 80322013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 8033
d6707650
JW
8034 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
8035 for each register.
8036
9243dd0e 80372013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 8038
9243dd0e
JW
8039 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
8040 linux-tile-low.o to srv_tgtobj.
8041
c623a6ef
WN
80422013-09-16 Will Newton <will.newton@linaro.org>
8043
8044 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
8045 out regs.
8046
fb71d39e
PA
80472013-09-06 Pedro Alves <palves@redhat.com>
8048
8049 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
8050 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
8051 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
8052 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
8053 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
8054 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
8055
8e7e9910
PA
80562013-09-06 Pedro Alves <palves@redhat.com>
8057
8058 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
8059 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
8060
7c3a12ca
PA
80612013-09-06 Pedro Alves <palves@redhat.com>
8062
8063 * linux-amd64-ipa.c: Include tracepoint.h.
8064 * linux-i386-ipa.c: Include tracepoint.h.
8065
8eb3d7b6
RW
80662013-09-06 Ricard Wanderlof <ricardw@axis.com>
8067
8068 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
8069 (ps_get_thread_area): New function.
8070
eddddb9d
RW
80712013-09-06 Ricard Wanderlof <ricardw@axis.com>
8072
8073 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
8074 (initialize_low_arch): Call init_registers_crisv32 rather than
8075 init_register_crisv32.
8076
533b0600
PA
80772013-09-05 Pedro Alves <palves@redhat.com>
8078
8079 * server.h (handle_vFile, hostio_last_error_from_errno): Move
8080 to ...
8081 * hostio.h: ... this new file.
8082 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
8083 win32-low.c: Include hostio.h.
8084
0ce3d3b5
PA
80852013-09-05 Pedro Alves <palves@redhat.com>
8086
8087 * server.h (gdb_client_data, handler_func, callback_handler_func)
8088 (delete_file_handler, add_file_handler, append_callback_event)
8089 (delete_callback_event, start_event_loop, initialize_event_loop):
8090 Move to event-loop.h and include it.
8091 * event-loop.h: New file.
8092
799cdc37
PA
80932013-09-05 Pedro Alves <palves@redhat.com>
8094
8095 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
8096 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
8097 (loaded_dll, unloaded_dll): Move to ...
8098 * dll.h: ... this new file.
8099 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
8100
6a6bbd9d
PA
81012013-09-05 Pedro Alves <palves@redhat.com>
8102
8103 * server.h (current_process, get_thread_process, all_processes)
8104 (add_inferior_to_list, for_each_inferior, current_inferior)
8105 (remove_inferior, add_process, remove_process, find_process_pid)
8106 (have_started_inferiors_p, have_attached_inferiors_p)
8107 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
8108 (clear_inferiors, find_inferior, find_inferior_id)
8109 (inferior_target_data, set_inferior_target_data)
8110 (inferior_regcache_data, set_inferior_regcache_data): Move to
8111 inferiors.h, and include it.
8112 * inferiors.h: New file.
8113
f699aaba
PA
81142013-09-05 Pedro Alves <palves@redhat.com>
8115
8116 * server.h (struct emit_ops, current_insn_ptr, emit_error):
8117 Move ...
72f4393d 8118 * ax.h: ... here.
f699aaba 8119
c144c7a0
PA
81202013-09-05 Pedro Alves <palves@redhat.com>
8121
8122 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
8123 tracepoint.h.
8124 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
8125 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
8126 (handle_tracepoint_general_set, handle_tracepoint_query)
8127 (tracepoint_finished_step, tracepoint_was_hit)
8128 (release_while_stepping_state_list, current_traceframe)
8129 (in_readonly_region, traceframe_read_mem)
8130 (fetch_traceframe_registers, traceframe_read_sdata)
8131 (traceframe_read_info, struct fast_tpoint_collect_status)
8132 (fast_tracepoint_collecting, force_unlock_trace_buffer)
8133 (handle_tracepoit_bkpts, initialize_low_tracepoint)
8134 (supply_fast_tracepoint_registers)
8135 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
8136 (ipa_tdesc, claim_trampoline_space)
8137 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
8138 (agent_mem_read, agent_get_trace_state_variable_value)
8139 (agent_set_trace_state_variable_value, agent_tsv_read)
8140 (agent_mem_read_string, get_raw_reg_func_addr)
8141 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
8142 * tracepoint.h: ... this new file.
8143
ff42e6ab
PA
81442013-09-05 Pedro Alves <palves@redhat.com>
8145
8146 * server.h (perror_with_name, error, fatal, warning, paddress)
8147 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
8148 include it.
8149 * utils.h: New file.
8150
541af0f4
PA
81512013-09-05 Pedro Alves <palves@redhat.com>
8152
8153 * server.h (remote_debug, noack_mode, transport_is_reliable)
8154 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
8155 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
8156 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
8157 (write_enn, initialize_async_io, enable_async_io)
8158 (disable_async_io, check_remote_input_interrupt_request)
8159 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
8160 (dead_thread_notify, prepare_resume_reply)
8161 (decode_address_to_semicolon, decode_address, decode_m_packet)
8162 (decode_M_packet, decode_X_packet, decode_xfer_write)
8163 (decode_search_memory_packet, unhexify, hexify)
8164 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
8165 (look_up_one_symbol, relocate_instruction)
8166 (monitor_output): Move to remote-utils.h, and include it.
8167 * remote-utils.h: New file.
8168
eebdf26b
PA
81692013-09-05 Pedro Alves <palves@redhat.com>
8170
8171 * server.h (_): Delete.
8172
3aafd2ff
PA
81732013-09-02 Pedro Alves <palves@redhat.com>
8174
8175 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
8176 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
8177 allocated.
8178 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
8179
cee83bcb
PM
81802013-09-02 Pierre Muller <muller@sourceware.org>
8181
8182 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
8183 or WriteProcessMemory complete successfully and handle
8184 ERROR_PARTIAL_COPY error.
8185
9a13b2fa
PA
81862013-09-02 Pedro Alves <palves@redhat.com>
8187
8188 * server.c (gdb_read_memory): Return -1 on traceframe memory read
8189 error instead of EIO.
8190
602e3198
JK
81912013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
8192
8193 PR server/15604
8194 * linux-low.c: Include filestuff.h.
8195 (linux_create_inferior) <pid == 0>: Call close_most_fds.
8196 * lynx-low.c: Include filestuff.h.
8197 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
8198 * server.c: Include filestuff.h.
8199 (main): Call notice_open_fds.
8200 * spu-low.c: Include filestuff.h.
8201 (spu_create_inferior) <pid == 0>: Call close_most_fds.
8202
96d7229d
LM
82032013-08-22 Luis Machado <lgustavo@codesourcery.com>
8204
8205 * Makefile.in: Explain why ../target and ../nat are not
8206 listed as include file search paths.
8207 (linux-waitpid.o): New object file rule.
8208 * configure.srv (srv_native_linux_obj): New variable.
8209 Replace all occurrences of linux native object files with
8210 $srv_native_linux_obj.
8211 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
8212 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
8213 (linux_enable_event_reporting): Remove declaration.
8214 (my_waitpid): Moved to common/linux-waitpid.c.
8215 (linux_wait_for_event): Pass ptid when calling
8216 linux_enable_event_reporting.
8217 (linux_supports_tracefork_flag): Remove.
8218 (linux_enable_event_reporting): Likewise.
8219 (linux_tracefork_grandchild): Remove.
8220 (STACK_SIZE): Moved to common/linux-ptrace.c.
8221 (linux_tracefork_child): Remove.
8222 (linux_test_for_tracefork): Remove.
8223 (linux_look_up_symbols): Call linux_supports_traceclone.
8224 (initialize_low): Remove call to linux_test_for_tracefork.
8225 * linux-low.h (PTRACE_TYPE_ARG3): Move to
8226 common/linux-ptrace.h.
8227 (PTRACE_TYPE_ARG4): Likewise.
8228 Include linux-ptrace.h.
8229
32940073
PA
82302013-08-21 Pedro Alves <palves@redhat.com>
8231
8232 * config.in: Renegerate.
8233
33b60d58 82342013-08-19 Luis Machado <lgustavo@codesourcery.com>
a261b8f5 8235
33b60d58
LM
8236 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
8237 (SFILES): Remove $(srcdir)/common/target-common.c and
8238 add $(srcdir)/target/waitstatus.c.
8239 (OBS): Remove target-common.o and add waitstatus.o.
8240 (server_h): Remove $(srcdir)/../common/target-common.h and
8241 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
8242 and $(srcdir)/../target/waitstatus.h.
8243 (target-common.o): Remove.
8244 (waitstatus.o): New target object file.
8245 * target.h: Do not include target-common.h and
8246 include target/resume.h, target/wait.h and
8247 target/waitstatus.h.
8248
b8e1b30e
LM
82492013-08-13 Luis Machado <lgustavo@codesourcery.com>
8250
8251 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
8252 to PTRACE_TYPE_ARG3.
8253 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
8254 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
8255 PTRACE_TYPE_ARG4.
8256 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
8257 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
8258
7a60ad40
YQ
82592013-07-27 Jie Zhang <jie@codesourcery.com>
8260 Daniel Jacobowitz <dan@codesourcery.com>
8261 Yao Qi <yao@codesourcery.com>
8262
8263 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
8264 (mips-linux-watch.o): New rule.
8265 (mips_linux_watch_h): New variable.
8266 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
8267 srv_tgtobj.
8268 * linux-mips-low.c: Include mips-linux-watch.h.
8269 (struct arch_process_info, struct arch_lwp_info): New.
8270 (update_watch_registers_callback): New function.
8271 (mips_linux_new_process, mips_linux_new_thread) New functions.
8272 (mips_linux_prepare_to_resume, mips_insert_point): New
8273 functions.
8274 (mips_remove_point, mips_stopped_by_watchpoint): New
8275 functions.
8276 (rsp_bp_type_to_target_hw_bp_type): New function.
8277 (mips_stopped_data_address): New function.
8278 (the_low_target): Add watchpoint support functions.
8279
de6f69ad
YQ
82802013-07-27 Yao Qi <yao@codesourcery.com>
8281
8282 * i386-low.c: Include break-common.h.
8283 (enum target_hw_bp_type): Remove.
8284
3360c0bf
LM
82852013-07-24 Luis Machado <lgustavo@codesourcery.com>
8286
8287 * Makefile.in (SFILES): /common/target-common.c.
8288 (OBS): Add target-common.o.
8289 (server_h): Add $(srcdir)/../common/target-common.h.
8290 (target-common.o): New target.
8291 * server.c (queue_stop_reply_callback): Free
8292 status string after use.
8293 * target.c (target_waitstatus_to_string): Remove.
8294 * target.h: Include target-common.h.
8295 (resume_kind): Likewise.
8296 (target_waitkind): Likewise.
8297 (target_waitstatus): Likewise.
8298 (TARGET_WNOHANG): Likewise.
8299
bd885420
YQ
83002013-07-04 Yao Qi <yao@codesourcery.com>
8301
8302 * Makefile.in (host_alias): Use @host_noncanonical@.
8303 (target_alias): Use @target_noncanonical@.
8304 * configure.ac: Use ACX_NONCANONICAL_TARGET and
8305 ACX_NONCANONICAL_HOST.
8306 * configure: Regenerated.
8307
8308 Revert:
8309 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
8310
8311 * configure.ac (version_host, version_target): Set and AC_SUBST them.
8312 * configure: Rebuild.
8313 * Makefile.in (version_host, version_target): Get from configure.
8314 (version.c): Use $(version_host) and $(version_target).
8315
17ef446e
PA
83162013-07-03 Pedro Alves <palves@redhat.com>
8317
8318 * Makefile.in (config.status): Depend on development.sh.
8319 * acinclude.m4: Include libmcheck.m4.
8320 * configure: Regenerate.
8321
7a9a7487
MG
83222013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
8323
8324 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
8325 attribute inside the parentheses.
8326 (winapi_DebugSetProcessKillOnExit): Ditto.
8327 (winapi_DebugBreakProcess): Ditto.
8328 (winapi_GenerateConsoleCtrlEvent): Ditto.
a261b8f5 8329
49b64de6
MG
83302013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
8331
8332 * notif.h (notif_event): Add a dummy member to avoid compiler
8333 errors.
8334
d5749ee7
PA
83352013-07-01 Pedro Alves <palves@redhat.com>
8336
8337 * hostio.c (HOSTIO_PATH_MAX): Define.
8338 (require_filename, handle_open, handle_unlink, handle_readlink):
8339 Use it.
8340
d8d2a3ee
PA
83412013-07-01 Pedro Alves <palves@redhat.com>
8342
8343 * server.h: Include "pathmax.h".
8344 * linux-low.c: Don't include sys/param.h.
8345 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
8346 MAXPATHLEN.
8347 * win32-low.c: Don't include sys/param.h.
8348 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
8349
bc7dea8d
PA
83502013-07-01 Pedro Alves <palves@redhat.com>
8351
8352 * event-loop.c: Don't check HAVE_UNISTD_H before including
8353 <unistd.h>.
8354 * gdbreplay.c: Likewise.
8355 * remote-utils.c: Likewise.
8356 * server.c: Likewise.
8357 * configure.ac: Don't check for unistd.h.
8358 * configure: Regenerate.
8359
d6c2da54
TT
83602013-06-28 Tom Tromey <tromey@redhat.com>
8361
8362 * Makefile.in (version.c): Use version.in, not
8363 common/version.in.
8364
257b6bec
MG
83652013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
8366
8367 * configure.ac (version_host, version_target): Set and AC_SUBST them.
8368 * configure: Rebuild.
8369 * Makefile.in (version_host, version_target): Get from configure.
8370 (version.c): Use $(version_host) and $(version_target).
8371
86ebe149
DK
83722013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
8373
8374 Fix trace-status to output user name without trailing colon.
8375 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
8376
f30aa5af
DK
83772013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
8378
8379 Fix trace-status to output proper start-time and stop-time.
8380 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
8381 output start time and stop time in hex as gdb expects.
8382
28a93511
YQ
83832013-06-26 Pedro Alves <pedro@codesourcery.com>
8384
8385 * tracepoint.c (build_traceframe_info_xml): Output trace state
8386 variables present in the trace buffer.
8387
01208463
TT
83882013-06-24 Tom Tromey <tromey@redhat.com>
8389
8390 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
8391 create-version.sh.
8392 (version.o): Remove.
8393 * gdbreplay.c: Include version.h.
8394 (version, host_name): Don't declare.
8395 * server.h: Include version.h.
8396 (version, host_name): Don't declare.
8397
760256f9
PA
83982013-06-12 Pedro Alves <palves@redhat.com>
8399
8400 * linux-x86-low.c (linux_is_elf64): Delete global.
8401 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
8402 with local linux_pid_exe_is_elf_64_file use.
8403
030031ee
PA
84042013-06-11 Pedro Alves <palves@redhat.com>
8405
8406 * linux-low.c (regset_disabled, disable_regset): New functions.
8407 (regsets_fetch_inferior_registers)
8408 (regsets_store_inferior_registers): Use them.
8409 (initialize_regsets_info); Don't allocate the disabled_regsets
8410 array here.
8411 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
8412 comment.
8413
5da6eb0a
PA
84142013-06-11 Pedro Alves <palves@redhat.com>
8415
8416 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
8417 xmalloc.
8418
7e5aaa09
PA
84192013-06-11 Pedro Alves <palves@redhat.com>
8420
8421 * linux-x86-low.c (initialize_low_arch): Call
8422 init_registers_x32_avx_linux.
8423
d878444c
JK
84242013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
8425
8426 Fix compatibility with Android Bionic.
8427 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
8428 it is not empty.
8429
3aee8918
PA
84302013-06-07 Pedro Alves <palves@redhat.com>
8431
5f2b57b5 8432 PR server/14823
3aee8918
PA
8433 * Makefile.in (OBS): Add tdesc.o.
8434 (IPA_OBJS): Add tdesc-ipa.o.
8435 (tdesc-ipa.o): New rule.
8436 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
8437 interface.
8438 * linux-low.c (new_inferior): Delete.
8439 (disabled_regsets, num_regsets): Delete.
8440 (linux_add_process): Adjust to set the new per-process
8441 new_inferior flag.
8442 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
8443 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
8444 was a stop. When calling arch_setup, switch the current inferior
8445 to the thread that got an event.
8446 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
8447 (regsets_fetch_inferior_registers)
8448 (regsets_store_inferior_registers): New regsets_info parameter.
8449 Adjust to use it.
8450 (linux_register_in_regsets): New regs_info parameter. Adjust to
8451 use it.
8452 (register_addr, fetch_register, store_register): New usrregs_info
8453 parameter. Adjust to use it.
8454 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
8455 parameter regs_info. Adjust to use it.
8456 (linux_fetch_registers): Get the current inferior's regs_info, and
8457 adjust to use it.
8458 (linux_store_registers): Ditto.
8459 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
8460 (initialize_low): Don't initialize the target_regsets here. Call
8461 initialize_low_arch.
8462 * linux-low.h (target_regsets): Delete declaration.
8463 (struct regsets_info): New.
8464 (struct usrregs_info): New.
8465 (struct regs_info): New.
8466 (struct process_info_private) <new_inferior>: New field.
8467 (struct linux_target_ops): Delete the num_regs, regmap, and
8468 regset_bitmap fields. New field regs_info.
8469 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
8470 * i387-fp.c (num_xmm_registers): Delete.
8471 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
8472 calls to new interface.
8473 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
8474 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
8475 Infer the number of xmm registers from the regcache's target
8476 description.
8477 * i387-fp.h (num_xmm_registers): Delete.
8478 * inferiors.c (add_thread): Don't install the thread's regcache
8479 here.
8480 * proc-service.c (gregset_info): Fetch the current inferior's
8481 regs_info. Adjust to use it.
8482 * regcache.c: Include tdesc.h.
8483 (register_bytes, reg_defs, num_registers)
8484 (gdbserver_expedite_regs): Delete.
8485 (get_thread_regcache): If the thread doesn't have a regcache yet,
8486 create one, instead of aborting gdbserver.
8487 (regcache_invalidate_one): Rename to ...
8488 (regcache_invalidate_thread): ... this.
8489 (regcache_invalidate_one): New.
8490 (regcache_invalidate): Only invalidate registers of the current
8491 process.
8492 (init_register_cache): Add target_desc parameter, and use it.
8493 (new_register_cache): Ditto. Assert the target description has a
8494 non zero registers_size.
8495 (regcache_cpy): Add assertions. Adjust.
8496 (realloc_register_cache, set_register_cache): Delete.
8497 (registers_to_string, registers_from_string): Adjust.
8498 (find_register_by_name, find_regno, find_register_by_number)
8499 (register_cache_size): Add target_desc parameter, and use it.
8500 (free_register_cache_thread, free_register_cache_thread_one)
8501 (regcache_release, register_cache_size): New.
8502 (register_size): Add target_desc parameter, and use it.
8503 (register_data, supply_register, supply_register_zeroed)
8504 (supply_regblock, supply_register_by_name, collect_register)
8505 (collect_register_as_string, collect_register_by_name): Adjust.
8506 * regcache.h (struct target_desc): Forward declare.
8507 (struct regcache) <tdesc>: New field.
8508 (init_register_cache, new_register_cache): Add target_desc
8509 parameter.
8510 (regcache_invalidate_thread): Declare.
8511 (regcache_invalidate_one): Delete declaration.
8512 (regcache_release): Declare.
8513 (find_register_by_number, register_cache_size, register_size)
8514 (find_regno): Add target_desc parameter.
8515 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
8516 declarations.
8517 * remote-utils.c: Include tdesc.h.
8518 (outreg, prepare_resume_reply): Adjust.
8519 * server.c: Include tdesc.h.
8520 (gdbserver_xmltarget): Delete declaration.
8521 (get_features_xml, process_serial_event): Adjust.
8522 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
8523 declare.
8524 (struct process_info) <tdesc>: New field.
8525 (ipa_tdesc): Declare.
8526 * tdesc.c: New file.
8527 * tdesc.h: New file.
8528 * tracepoint.c: Include tdesc.h.
8529 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
8530 (get_context_regcache): Adjust to pass ipa_tdesc down.
8531 (do_action_at_tracepoint): Adjust to get the register cache size
8532 from the context regcache's description.
8533 (traceframe_walk_blocks): Adjust to get the register cache size
8534 from the current trace frame's description.
8535 (traceframe_get_pc): Adjust to get current trace frame's
8536 description and pass it down.
8537 (gdb_collect): Adjust to get the register cache size from the
8538 IPA's description.
8539 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
8540 (gdbserver_xmltarget): Delete.
8541 (initialize_low_tracepoint): Set the ipa's target description.
8542 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
8543 (initialize_low_tracepoint): Set the ipa's target description.
8544 * linux-x86-low.c: Include tdesc.h.
8545 [__x86_64__] (is_64bit_tdesc): New.
8546 (ps_get_thread_area, x86_get_thread_area): Use it.
8547 (i386_cannot_store_register): Rename to ...
8548 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
8549 (i386_cannot_fetch_register): Rename to ...
8550 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
8551 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
8552 to new interface.
8553 (target_regsets): Rename to ...
8554 (x86_regsets): ... this.
8555 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
8556 interface.
8557 (x86_siginfo_fixup): Use is_64bit_tdesc.
8558 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
8559 (tdesc_x32_avx_linux, tdesc_x32_linux)
8560 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
8561 Declare.
8562 (x86_linux_update_xmltarget): Delete.
8563 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
8564 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
8565 (AMD64_LINUX_USER64_CS): New.
8566 (x86_linux_read_description): New, based on
8567 x86_linux_update_xmltarget.
8568 (same_process_callback): New.
8569 (x86_arch_setup_process_callback): New.
8570 (x86_linux_update_xmltarget): New.
8571 (x86_regsets_info): New.
8572 (amd64_linux_regs_info): New.
8573 (i386_linux_usrregs_info): New.
8574 (i386_linux_regs_info): New.
8575 (x86_linux_regs_info): New.
8576 (x86_arch_setup): Reimplement.
8577 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
8578 (x86_emit_ops): Ditto.
8579 (the_low_target): Adjust. Install x86_linux_regs_info,
8580 x86_cannot_fetch_register, and x86_cannot_store_register.
8581 (initialize_low_arch): New.
8582 * linux-ia64-low.c (tdesc_ia64): Declare.
8583 (ia64_fetch_register): Adjust.
8584 (ia64_usrregs_info, regs_info): New globals.
8585 (ia64_regs_info): New function.
8586 (the_low_target): Adjust.
8587 (initialize_low_arch): New function.
8588 * linux-sparc-low.c (tdesc_sparc64): Declare.
8589 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
8590 Adjust.
8591 (sparc_arch_setup): New function.
8592 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
8593 (the_low_target): Adjust.
8594 (initialize_low_arch): New function.
8595 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
8596 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
8597 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
8598 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
8599 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
8600 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
8601 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
8602 (tdesc_powerpc_isa205_vsx64l): Declare.
8603 (ppc_cannot_store_register, ppc_collect_ptrace_register)
8604 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
8605 (ppc_set_pc, ppc_get_hwcap): Adjust.
8606 (ppc_usrregs_info): Forward declare.
8607 (!__powerpc64__) ppc_regmap_adjusted: New global.
8608 (ppc_arch_setup): Adjust to the current process'es target
8609 description.
8610 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
8611 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
8612 (ppc_store_evrregset): Adjust.
8613 (target_regsets): Rename to ...
8614 (ppc_regsets): ... this, and make static.
8615 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
8616 (ppc_regs_info): New function.
8617 (the_low_target): Adjust.
8618 (initialize_low_arch): New function.
8619 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
8620 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
8621 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
8622 (tdesc_s390x_linux64v2): Declare.
8623 (s390_collect_ptrace_register, s390_supply_ptrace_register)
8624 (s390_fill_gregset, s390_store_last_break): Adjust.
8625 (target_regsets): Rename to ...
8626 (s390_regsets): ... this, and make static.
8627 (s390_get_pc, s390_set_pc): Adjust.
8628 (s390_get_hwcap): New target_desc parameter, and use it.
8629 [__s390x__] (have_hwcap_s390_high_gprs): New global.
8630 (s390_arch_setup): Adjust to set the current process'es target
8631 description. Don't adjust the regmap.
8632 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
8633 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
8634 (regs_info_3264): New globals.
8635 (s390_regs_info): New function.
8636 (the_low_target): Adjust.
8637 (initialize_low_arch): New function.
8638 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
8639 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
8640 [__mips64] (init_registers_mips_linux)
8641 (init_registers_mips_dsp_linux): Delete defines.
8642 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
8643 (have_dsp): New global.
8644 (mips_read_description): New, based on mips_arch_setup.
8645 (mips_arch_setup): Reimplement.
8646 (get_usrregs_info): New function.
8647 (mips_cannot_fetch_register, mips_cannot_store_register)
8648 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
8649 (mips_fill_fpregset, mips_store_fpregset): Adjust.
8650 (target_regsets): Rename to ...
8651 (mips_regsets): ... this, and make static.
8652 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
8653 (dsp_regs_info, regs_info): New globals.
8654 (mips_regs_info): New function.
8655 (the_low_target): Adjust.
8656 (initialize_low_arch): New function.
8657 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
8658 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
8659 Declare.
8660 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
8661 (arm_read_description): New, with bits factored from
8662 arm_arch_setup.
8663 (arm_arch_setup): Reimplement.
8664 (target_regsets): Rename to ...
8665 (arm_regsets): ... this, and make static.
8666 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
8667 (arm_regs_info): New function.
8668 (the_low_target): Adjust.
8669 (initialize_low_arch): New function.
8670 * linux-m68k-low.c (tdesc_m68k): Declare.
8671 (target_regsets): Rename to ...
8672 (m68k_regsets): ... this, and make static.
8673 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
8674 (m68k_regs_info): New function.
8675 (m68k_arch_setup): New function.
8676 (the_low_target): Adjust.
8677 (initialize_low_arch): New function.
8678 * linux-sh-low.c (tdesc_sharch): Declare.
8679 (target_regsets): Rename to ...
8680 (sh_regsets): ... this, and make static.
8681 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
8682 (sh_regs_info, sh_arch_setup): New functions.
8683 (the_low_target): Adjust.
8684 (initialize_low_arch): New function.
8685 * linux-bfin-low.c (tdesc_bfin): Declare.
8686 (bfin_arch_setup): New function.
8687 (bfin_usrregs_info, regs_info): New globals.
8688 (bfin_regs_info): New function.
8689 (the_low_target): Adjust.
8690 (initialize_low_arch): New function.
8691 * linux-cris-low.c (tdesc_cris): Declare.
8692 (cris_arch_setup): New function.
8693 (cris_usrregs_info, regs_info): New globals.
8694 (cris_regs_info): New function.
8695 (the_low_target): Adjust.
8696 (initialize_low_arch): New function.
8697 * linux-cris-low.c (tdesc_crisv32): Declare.
8698 (cris_arch_setup): New function.
8699 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
8700 (cris_regs_info): New function.
8701 (the_low_target): Adjust.
8702 (initialize_low_arch): New function.
8703 * linux-m32r-low.c (tdesc_m32r): Declare.
8704 (m32r_arch_setup): New function.
8705 (m32r_usrregs_info, regs_info): New globals.
8706 (m32r_regs_info): Adjust.
8707 (initialize_low_arch): New function.
8708 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
8709 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
8710 (tic6x_usrregs_info): Forward declare.
8711 (tic6x_read_description): New function, based on ...
8712 (tic6x_arch_setup): ... this. Reimplement.
8713 (target_regsets): Rename to ...
8714 (tic6x_regsets): ... this, and make static.
8715 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
8716 (tic6x_regs_info): New function.
8717 (the_low_target): Adjust.
8718 (initialize_low_arch): New function.
8719 * linux-xtensa-low.c (tdesc_xtensa): Declare.
8720 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
8721 (target_regsets): Rename to ...
8722 (xtensa_regsets): ... this, and make static.
8723 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
8724 globals.
8725 (xtensa_arch_setup, xtensa_regs_info): New functions.
8726 (the_low_target): Adjust.
8727 (initialize_low_arch): New function.
8728 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
8729 (nios2_arch_setup): Set the current process'es tdesc.
8730 (target_regsets): Rename to ...
8731 (nios2_regsets): ... this.
8732 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
8733 (nios2_regs_info): New function.
8734 (the_low_target): Adjust.
8735 (initialize_low_arch): New function.
a261b8f5
PA
8736 * linux-aarch64-low.c (tdesc_aarch64): Declare.
8737 (aarch64_arch_setup): Set the current process'es tdesc.
8738 (target_regsets): Rename to ...
8739 (aarch64_regsets): ... this.
8740 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
8741 (aarch64_regs_info): New function.
8742 (the_low_target): Adjust.
8743 (initialize_low_arch): New function.
3aee8918
PA
8744 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
8745 globals.
8746 (target_regsets): Rename to ...
8747 (tile_regsets): ... this.
8748 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
8749 (tile_regs_info): New function.
8750 (tile_arch_setup): Set the current process'es tdesc.
8751 (the_low_target): Adjust.
8752 (initialize_low_arch): New function.
8753 * spu-low.c (tdesc_spu): Declare.
8754 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
8755 * win32-arm-low.c (tdesc_arm): Declare.
8756 (arm_arch_setup): New function.
8757 (the_low_target): Install arm_arch_setup instead of
8758 init_registers_arm.
8759 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
8760 (init_windows_x86): Rename to ...
8761 (i386_arch_setup): ... this. Set `win32_tdesc'.
8762 (the_low_target): Adjust.
8763 * win32-low.c (win32_tdesc): New global.
8764 (child_add_thread): Don't create the thread cache here.
8765 (do_initial_child_stuff): Set the new process'es tdesc.
8766 * win32-low.h (struct target_desc): Forward declare.
8767 (win32_tdesc): Declare.
8768 * lynx-i386-low.c (tdesc_i386): Declare global.
8769 (lynx_i386_arch_setup): Set `lynx_tdesc'.
8770 * lynx-low.c (lynx_tdesc): New global.
8771 (lynx_add_process): Set the new process'es tdesc.
8772 * lynx-low.h (struct target_desc): Forward declare.
8773 (lynx_tdesc): Declare global.
8774 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
8775 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
8776 * nto-low.c (nto_tdesc): New global.
8777 (do_attach): Set the new process'es tdesc.
8778 * nto-low.h (struct target_desc): Forward declare.
8779 (nto_tdesc): Declare.
8780 * nto-x86-low.c (tdesc_i386): Declare.
8781 (nto_x86_arch_setup): Set `nto_tdesc'.
8782
b1fbec62
GB
87832013-06-04 Gary Benson <gbenson@redhat.com>
8784
8785 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
8786 to qSupported response when appropriate.
8787 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
8788 with nonzero-length annex.
8789 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
8790 arguments supplied in annex.
8791
d1ec4ce7
DE
87922013-05-31 Doug Evans <dje@google.com>
8793
ac44adcb 8794 PR server/15594
d1ec4ce7
DE
8795 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
8796 64 bits in 64-cross-32 environment.
8797
9b25f2d3
PA
87982013-05-28 Pedro Alves <palves@redhat.com>
8799
8800 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
8801 (aarch64-without-fpu.c): Delete rule.
8802 * configure.srv (aarch64*-*-linux*): Remove references to
8803 aarch64-without-fpu.o and aarch64-without-fpu.xml.
8804 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
8805 declaration.
8806
6740dc9c
PA
88072013-05-24 Pedro Alves <palves@redhat.com>
8808
8809 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
8810 instead of strchr/decode_address. Error if the range isn't split
8811 with a ','. Don't assume there's be a ':' in the action.
8812
c2d6af84
PA
88132013-05-23 Yao Qi <yao@codesourcery.com>
8814 Pedro Alves <palves@redhat.com>
8815
8816 * linux-low.c (lwp_in_step_range): New function.
8817 (linux_wait_1): If the thread was range stepping and stopped
8818 outside the stepping range, report the stop to GDB. Otherwise,
8819 continue stepping. Add range stepping debug output.
8820 (linux_set_resume_request): Copy the step range from the resume
8821 request to the lwp.
8822 (linux_supports_range_stepping): New.
8823 (linux_target_ops) <supports_range_stepping>: Set to
8824 linux_supports_range_stepping.
8825 * linux-low.h (struct linux_target_ops)
8826 <supports_range_stepping>: New field.
8827 (struct lwp_info) <step_range_start, step_range_end>: New fields.
8828 * linux-x86-low.c (x86_supports_range_stepping): New.
8829 (the_low_target) <supports_range_stepping>: Set to
8830 x86_supports_range_stepping.
8831 * server.c (handle_v_cont): Handle 'r' action.
8832 (handle_v_requests): Append ";r" if the target supports range
8833 stepping.
8834 * target.h (struct thread_resume) <step_range_start,
8835 step_range_end>: New fields.
8836 (struct target_ops) <supports_range_stepping>:
8837 New field.
8838 (target_supports_range_stepping): New macro.
8839
58794e1a
JB
88402013-05-17 Joel Brobecker <brobecker@adacore.com>
8841
8842 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
8843 confusion in comment.
8844
d631c5a7
JB
88452013-05-17 Joel Brobecker <brobecker@adacore.com>
8846
8847 * lynx-low.c (struct process_info_private): New type.
8848 (lynx_add_process): New function.
8849 (lynx_create_inferior, lynx_attach): Replace calls to
8850 add_process by calls to lynx_add_process.
8851 (lynx_resume): If PTID is null, then try using
8852 current_process()->private->last_wait_event_ptid.
8853 Add comments.
8854 (lynx_clear_inferiors): Delete. The contents of that function
8855 has been inlined in lynx_mourn;
8856 (lynx_wait_1): Save the ptid in the process's private data.
8857 (lynx_mourn): Free the process' private data. Replace call
8858 to lynx_clear_inferiors by call to clear_inferiors.
8859
96f7a20f
YQ
88602013-05-17 Yao Qi <yao@codesourcery.com>
8861
8862 * i386-low.c (i386_length_and_rw_bits): Move the comment to
8863 the right place.
8864
db0dfaa0
LM
88652013-05-16 Luis Machado <lgustavo@codesourcery.com>
8866
8867 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
8868 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
8869 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
8870 PT_TEXT_END_ADDR guards. Update comments.
8871 (linux_target_op) <read_offsets>: Conditionally define to
8872 linux_read_offsets if the target is UCLIBC and if it defines
8873 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
8874
68f5f838
SL
88752013-05-06 Sandra Loosemore <sandra@codesourcery.com>
8876 Andrew Jenner <andrew@codesourcery.com>
8877
8878 * Makefile.in (SFILES): Add linux-nios2-low.c.
8879 (clean): Add action to delete nios2-linux.c.
8880 (nios2-linux.c): New rule.
8881 * configure.srv: Add nios2*-*-linux*.
8882 * linux-nios2-low.c: New.
8883
1ebff1fd
HAQ
88842013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
8885
8886 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
8887
f6150862
HZ
88882013-04-25 Hui Zhu <hui@codesourcery.com>
8889
8890 PR gdb/15186
f6150862
HZ
8891 * ax.c (ax_printf): Add fflush.
8892
614c279d
TT
88932013-04-22 Tom Tromey <tromey@redhat.com>
8894
8895 * Makefile.in (SFILES): Add filestuff.c.
8896 (OBS): Add filestuff.o.
8897 (filestuff.o): New target.
8898 * config.in, configure: Rebuild.
8899 * configure.ac: Check for fdwalk, pipe2.
8900
7d4e5717
PA
89012013-04-17 Pedro Alves <palves@redhat.com>
8902
8903 * configure.ac (USE_THREAD_DB): Delete variable.
8904 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
8905 Don't AC_SUBST USE_THREAD_DB.
8906 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
8907 * config.in, configure: Regenerate.
8908
d5c93e41
PA
89092013-04-16 Pedro Alves <palves@redhat.com>
8910
8911 * linux-low.h (struct lwp_info) <thread_known>: Move under
8912 the USE_THREAD_DB #ifdef.
8913
04f5fe89
PA
89142013-04-16 Pedro Alves <palves@redhat.com>
8915
8916 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
8917 (linux-low.o): Delete rule.
8918 * linux-low.h: Always include "gdb_thread_db.h" instead of
8919 conditionally including thread_db.h.
8920 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
8921 HAVE_THREAD_DB_H.
8922
480b27bf
JK
89232013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
8924
8925 * Makefile.in (install-only): Fix make install regression.
8926
43662968
JK
89272013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
8928
8929 Convert man pages to texinfo, new gdbinit.5 texinfo page.
8930 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
8931 installation.
8932 * gdbserver.1: Remove.
8933
3e74e146
PA
89342013-03-22 Pedro Alves <palves@redhat.com>
8935
8936 * linux-low.c (handle_extended_wait): Don't call
8937 linux_enable_event_reporting.
8938
a8347a2a
TT
89392013-03-15 Tony Theodore <tonyt@logyst.com>
8940
8941 PR build/9098:
8942 * Makefile.in (SHELL): Use @SHELL@.
8943
eeb56fa7
SDJ
89442013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
8945
8946 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
8947 compiler warning.
8948
4fa7e2ff
JB
89492013-03-13 Joel Brobecker <brobecker@adacore.com>
8950
8951 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
8952 Remove extraneous NULL element.
8953
8ddb1965
YQ
89542013-03-13 Yao Qi <yao@codesourcery.com>
8955
8956 * tracepoint.c (traceframe_read_tsv): Look for the last matched
8957 'V' block in trace frame.
8958
9accd112
MM
89592013-03-11 Markus Metzger <markus.t.metzger@intel.com>
8960
8961 * target.h (struct target_ops): Add btrace ops.
8962 (target_supports_btrace): New macro.
8963 (target_enable_btrace): New macro.
8964 (target_disable_btrace): New macro.
8965 (target_read_btrace): New macro.
8966 * gdbthread.h (struct thread_info): Add btrace field.
8967 * server.c: Include btrace-common.h.
8968 (handle_btrace_general_set): New function.
8969 (handle_btrace_enable): New function.
8970 (handle_btrace_disable): New function.
8971 (handle_general_set): Call handle_btrace_general_set.
8972 (handle_qxfer_btrace): New function.
8973 (struct qxfer qxfer_packets[]): Add btrace entry.
8974 * inferiors.c (remove_thread): Disable btrace.
8975 * linux-low: Include linux-btrace.h.
8976 (linux_low_enable_btrace): New function.
8977 (linux_low_read_btrace): New function.
8978 (linux_target_ops): Add btrace ops.
8979 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
8980 Add srv_linux_btrace=yes.
8981 (x86_64-*-linux*): Add linux-btrace.o.
8982 Add srv_linux_btrace=yes.
8983 * configure.ac: Define HAVE_LINUX_BTRACE.
8984 * config.in: Regenerated.
8985 * configure: Regenerated.
8986
5cc22e4c
MM
89872013-03-11 Markus Metzger <markus.t.metzger@intel.com>
8988
8989 * server.c (handle_qxfer): Preserve error message if -3 is
8990 returned.
8991 (qxfer): Document the -3 return value.
8992
7c97f91e
MM
89932013-03-11 Markus Metzger <markus.t.metzger@intel.com>
8994
8995 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
8996 (linux_btrace_h): New variable.
8997 (linux-btrace.o): New rule.
8998
be9a119c 89992013-03-08 Stan Shebs <stan@codesourcery.com>
f6f899bf
HAQ
9000 Hafiz Abid Qadeer <abidh@codesourcery.com>
9001
9002 * tracepoint.c (trace_buffer_size): New global.
9003 (DEFAULT_TRACE_BUFFER_SIZE): New define.
9004 (init_trace_buffer): Change to one-argument function. Allocate
9005 trace buffer memory.
9006 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
9007 handle QTBuffer:size packet.
9008 (cmd_bigqtbuffer_size): New function.
9009 (initialize_tracepoint): Call init_trace_buffer with
9010 DEFAULT_TRACE_BUFFER_SIZE.
9011 * server.c (handle_query): Add QTBuffer:size in the
9012 supported packets.
9013
e64f7499
YQ
90142013-03-07 Yao Qi <yao@codesourcery.com>
9015
9016 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
9017 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
9018 of -1.
9019 (cmd_qtsp): Adjust condition. Do post increment.
9020 Set cur_action and cur_step_action back to 0.
9021
f0ae6fc3
PA
90222013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
9023
9024 PR server/15236
9025 * linux-low.c (linux_write_memory): Return early success if LEN is
9026 zero.
9027
b5b0b0af
CV
90282013-03-05 Corinna Vinschen <vinschen@redhat.de>
9029
334ad4a8 9030 * configure.srv: Add x86_64-*-cygwin* as target.
b5b0b0af 9031
589bc927
TT
90322013-02-28 Tom Tromey <tromey@redhat.com>
9033
9034 * configure.ac: Invoke AC_SYS_LARGEFILE.
9035 * configure, config.in: Rebuild.
9036
dfe07582
CV
90372013-02-28 Corinna Vinschen <vinschen@redhat.com>
9038
9039 * win32-low.c: Throughout, fix format strings and casts of
9040 printf-like functions to avoid type related warnings on all
9041 platforms.
9042 (get_child_debug_event): Print dwDebugEventCode as hex since
9043 that's how it's usually documented.
9044
736cd585
YQ
90452013-02-28 Yao Qi <yao@codesourcery.com>
9046
9047 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
9048 pulongest.
9049
e1f58301
JW
90502013-02-27 Jiong Wang <jiwang@tilera.com>
9051
9052 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
9053 (reg-tilegx32.c): New rule.
9054 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
9055 * linux-tile-low.c (tile_arch_setup): New function. Invoke
9056 different register info initializer according to elf class.
9057 (init_registers_tilgx32): New function. The tilegx32 register info
9058 initializer.
9059 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
9060 (tile_store_gregset): Likewise.
9061
d171ca78
YQ
90622013-02-27 Yao Qi <yao@codesourcery.com>
9063
9064 * server.c (process_point_options): Print debug message when
9065 debug_threads is true.
9066
282bbdf3
YQ
90672013-02-26 Yao Qi <yao@codesourcery.com>
9068
9069 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
9070
aca22551
PA
90712013-02-19 Pedro Alves <palves@redhat.com>
9072 Kai Tietz <ktietz@redhat.com>
9073
9074 PR gdb/15161
9075
9076 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
9077 instead of strtoul to extract address from packet.
9078 (process_serial_event) <'z'>: Likewise.
9079
4f3cee1c
YQ
90802013-02-18 Yao Qi <yao@codesourcery.com>
9081
9082 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
9083
8e1d55a3
PA
90842013-02-14 Pedro Alves <palves@redhat.com>
9085
9086 Plug memory leak.
9087
9088 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
9089 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
9090
458820da
PA
90912013-02-14 Pedro Alves <palves@redhat.com>
9092
9093 * tracepoint.c (cmd_qtdpsrc): Use savestring.
9094
baea0dae
PA
90952013-02-14 Pedro Alves <palves@redhat.com>
9096
9097 * tracepoint.c (save_string): Delete.
9098 (add_tracepoint_action): Use savestring instead of save_string.
9099
0b1afbb3
PA
91002013-02-12 Pedro Alves <palves@redhat.com>
9101
9102 * linux-xtensa-low.c: Ditto.
9103 * xtensa-xtregs.c: Ditto.
9104
8a4ac37e
PA
91052013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
9106
9107 * thread-db.c (thread_db_get_tls_address): NULL pointer check
9108 thread_db.
9109
148de6bb
MS
91102013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
9111
9112 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
9113 aarch64_num_wp_regs and aarch64_num_bp_regs to
9114 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
9115
55fac6e0
MS
91162013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
9117
9118 * linux-aarch64-low.c (ps_get_thread_area): Replace
9119 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
9120
176eb98c
MS
91212013-02-04 Jim MacArthur <jim.macarthur@arm.com>
9122 Marcus Shawcroft <marcus.shawcroft@arm.com>
9123 Nigel Stephens <nigel.stephens@arm.com>
9124 Yufeng Zhang <yufeng.zhang@arm.com>
9125
9126 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
9127 (aarch64.c, aarch64-without-fpu.c): New targets.
9128 * configure.srv (aarch64*-*-linux*): New.
9129 * linux-aarch64-low.c: New file.
9130
56f7af9c
MS
91312013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
9132
43aaf8b6 9133 * linux-low.c (handle_extended_wait, linux_create_inferior)
56f7af9c
MS
9134 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
9135 (dequeue_one_deferred_signal, linux_resume_one_thread)
9136 (fetch_register, linux_write_memory, linux_enable_event_reporting)
9137 (linux_tracefork_grandchild, linux_test_for_tracefork)
9138 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
9139 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
9140 where the argument is 0.
9141
60f662b0
YQ
91422013-01-25 Yao Qi <yao@codesourcery.com>
9143
9144 * event-loop.c: Include "queue.h".
9145 (gdb_event_p): New typedef.
9146 (struct gdb_event) <next_event>: Remove.
9147 (event_queue): Change to QUEUE(gdb_event_p).
9148 (async_queue_event): Remove.
9149 (gdb_event_xfree): New.
9150 (initialize_event_loop): New.
9151 (process_event): Use API from QUEUE.
9152 (wait_for_event): Likewise.
9153 * server.c (main): Call initialize_event_loop.
9154 * server.h (initialize_event_loop): Declare.
9155
5ae4861a
YQ
91562013-01-18 Yao Qi <yao@codesourcery.com>
9157
9158 * ax.h (struct eval_agent_expr_context): New.
9159 (gdb_eval_agent_expr): Update declaration.
9160 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
9161 TFRAME. Add new argument CTX.
9162 * server.h (struct eval_agent_expr_context): Declare.
9163 (agent_mem_read, agent_tsv_read): Update declaration.
9164 (agent_mem_read_string): Likewise.
9165 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
9166 (add_traceframe_block): Add new argument TPOINT.
9167 Increase TPOINT->traceframe_usage.
9168 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
9169 eval_tracepoint_agent_expr.
9170 (condition_true_at_tracepoint): Likewise.
9171 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
9172 (agent_mem_read_string, agent_tsv_read): Likewise.
9173
85e00e85
YQ
91742013-01-16 Yao Qi <yao@codesourcery.com>
9175
9176 * linux-low.c (linux_resume_one_lwp): Don't check
9177 'lwp->bp_reinsert != 0'.
9178
4039cf45
JB
91792013-01-07 Joel Brobecker <brobecker@adacore.com>
9180 Pedro Alves <palves@redhat.com>
9181
9182 * lynx-low.c (ptrace_request_to_str): Define a temporary
9183 macro and use it to simplify this function's implementation.
9184
9044dee2
JB
91852013-01-07 Joel Brobecker <brobecker@adacore.com>
9186
9187 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
9188 sets errno.
9189
e6352c8f
JB
91902013-01-07 Joel Brobecker <brobecker@adacore.com>
9191
9192 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
9193
50681a27
JB
91942013-01-07 Joel Brobecker <brobecker@adacore.com>
9195
9196 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
9197
3f6e77ef
JB
91982013-01-07 Joel Brobecker <brobecker@adacore.com>
9199
9200 * lynx-low.c (lynx_resume): Use the resume_info parameter
9201 to determine the ptid for the lynx_ptrace call, unless
9202 it is equal to minus_one_ptid, in which case we use the
9203 ptid of the current_inferior.
9204 (lynx_wait_1): After having received a thread create/exit
9205 event, resume the inferior's execution using the signaling
9206 thread's ptid, rather than the old ptid.
9207
7fda33ae
JB
92082013-01-07 Joel Brobecker <brobecker@adacore.com>
9209
9210 * lynx-low.c (lynx_resume): Delete variable ret.
9211
b9786c74
JB
92122013-01-01 Joel Brobecker <brobecker@adacore.com>
9213
9214 * gdbreplay.c (gdbreplay_version): Update copyright year.
9215 * server.c (gdbserver_version): Likewise.
9216
8b93d60f
JB
92172012-12-17 Joel Brobecker <brobecker@adacore.com>
9218
9219 * lynx-low.c (lynx_wait_1): Add debug trace before adding
9220 new thread.
9221
037335a7
JB
92222012-12-17 Joel Brobecker <brobecker@adacore.com>
9223
9224 * lynx-low.c (ptrace_request_to_str): Add handling for
9225 PTRACE_GETTRACESIG.
9226
52d4cbd8
JB
92272012-12-17 Joel Brobecker <brobecker@adacore.com>
9228
9229 * lynx-low.c (lynx_attach): Delete variable new_process.
9230
ab8f6ca9
JB
92312012-12-17 Joel Brobecker <brobecker@adacore.com>
9232
9233 * lynx-low.c (lynx_create_inferior): Delete variable
9234 new_process.
9235
78cbc024
JB
92362012-12-17 Joel Brobecker <brobecker@adacore.com>
9237
9238 * lynx-low.c (ptrace_request_to_str): Do not handle
9239 PTRACE_GETTHREADLIST if this macro does not exist.
9240
14a00470
YQ
92412012-12-15 Yao Qi <yao@codesourcery.com>
9242
9243 * Makefile.in (OBS): Add notif.o.
9244 * notif.c, notif.h: New.
9245 * server.c: Include "notif.h".
9246 (struct vstop_notif) <next>: Remove.
9247 <base>: New field.
9248 (queue_stop_reply): Update.
9249 (push_event, send_next_stop_reply): Remove.
9250 (discard_queued_stop_replies): Update.
9251 (notif_stop): New variable.
9252 (handle_v_stopped): Remove.
9253 (handle_v_requests): Don't call handle_v_stopped. Call
9254 handle_ack_notif instead.
9255 (queue_stop_reply_callback): Call notif_event_enque instead
9256 of queue_stop_reply.
9257 (handle_status): Don't call send_next_stop_reply, call
9258 notif_write_event instead.
9259 (kill_inferior_callback): Likewise.
9260 (detach_or_kill_inferior_callback): Likewise.
9261 (main): Call initialize_notif.
9262 (process_serial_event): Call QUEUE_is_empty.
9263 (handle_target_event): Call notif_push instead of push event.
9264 * server.h (push_event): Remove declaration.
9265
61c125b9
TT
92662012-12-10 Tom Tromey <tromey@redhat.com>
9267
9268 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
9269 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
9270 macros.
9271 (.c.o): Rewrite.
9272 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
9273 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
9274 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
9275 (amd64-linux-ipa.o, ax.o): Rewrite.
9276 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
9277 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
9278 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
9279 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
9280 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
9281 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
9282 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
9283 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
9284 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
9285 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
9286 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
9287 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
9288 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
9289 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
9290 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
9291 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
9292 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
9293 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
9294 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
9295 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
9296 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
9297 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
9298 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
9299 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
9300 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
9301 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
9302 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
9303 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
9304 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
9305 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
9306 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
9307 (reg-tilegx.o): Remove.
9308 (all_object_files): New macro.
9309 Include .deps files.
9310 * aclocal.m4, configure: Rebuild.
9311 * acinclude.m4: Include depstand.m4, lead-dot.m4.
9312 * configure.ac: Invoke ZW_CREATE_DEPDIR,
9313 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
9314
e90e9ad9
TT
93152012-12-05 Tom Tromey <tromey@redhat.com>
9316
9317 PR gdb/14917:
9318 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
9319
02d403bf 93202012-11-28 Markus Metzger <markus.t.metzger@intel.com>
945bf713
MM
9321
9322 * configure.ac: Check for linux/perf_event.h.
9323 * config.in: Regenerated.
9324 * configure: Regenerated.
9325
0270a750
PA
93262012-11-26 Maxime Villard <rustyBSD@gmx.fr>
9327
9328 * hostio.c (handle_readlink): Decrease buffer size
9329 parameter passed to readlink by one byte.
9330
8c29b58e
YQ
93312012-11-26 Yao Qi <yao@codesourcery.com>
9332
9333 * configure.ac (build_warnings): Append '-Wempty-body'.
9334 * configure: Regenerated.
9335 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
9336 body.
9337
8bdce1ff
PM
93382012-11-15 Pierre Muller <muller@sourceware.org>
9339
9340 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
9341 * config.in: Regenerate.
9342 * configure: Regenerate.
9343 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
9344 Use "gdb_wait.h" header instead of <sys/wait.h> header.
9345 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
9346 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
9347 header.
9348 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
9349 instead of <sys/wait.h> header.
9350 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
9351
02d403bf 93522012-11-13 Markus Metzger <markus.t.metzger@intel.com>
3ba6ad0f
MM
9353
9354 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
9355 (various make rules): Remove -DGDBSERVER
9356
fbd5db48
YQ
93572012-11-09 Yao Qi <yao@codesourcery.com>
9358
9359 * spu-low.c (current_ptid): Move it to ..
9360 * gdbthread.h: ... here. New.
9361 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
9362 * server.c (myresume, process_serial_event): Likewise.
9363 * thread-db.c (thread_db_find_new_threads): Likewise.
9364 * tracepoint.c (run_inferior_command): Likewise.
9365
b3dc46ff
AB
93662012-10-01 Andrew Burgess <aburgess@broadcom.com>
9367
9368 * server.c (handle_search_memory_1): Include access length in
9369 warning message.
9370
07c04788
HPN
93712012-09-05 Michael Brandt <michael.brandt@axis.com>
9372
9373 * linux-crisv32-low.c: Fix compile errors.
9374
918d227b
YQ
93752012-09-04 Yao Qi <yao@codesourcery.com>
9376
9377 * tracepoint.c (cmd_qtsv): Adjust debug message.
9378 Don't check CUR_TPOINT.
9379
18c1b81a
YQ
93802012-08-28 Yao Qi <yao@codesourcery.com>
9381
9382 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
9383 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
9384 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
9385 Remove declarations of xmalloc, xreallloc, xstrdup and
9386 freeargv.
9387 * Makefile.in (libiberty_h): New.
9388 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
9389 (linux-bfin-low.o): Append dependency 'libiberty.h'.
9390
dc82f37b
YQ
93912012-08-23 Yao Qi <yao@codesourcery.com>
9392
9393 * server.h: Remove declaration of 'xsnprintf'.
9394
406b1477
KS
93952012-08-22 Keith Seitz <keiths@redhat.com>
9396
9397 * server.h: Include build-gnulib-gbserver/config.h.
9398 * gdbreplay.c: Likewise.
9399
e6712ff1
DE
94002012-08-08 Doug Evans <dje@google.com>
9401
9402 * Makefile.in (SFILES): Add gdb_vecs.c.
9403 (OBS): Add gdb_vecs.o.
9404 (gdb_vecs_h, host_defs_h): New variables.
9405 (thread-db.o): Add $(gdb_vecs_h) dependency.
9406 (gdb_vecs.o): New rule.
9407 * thread-db.c: #include "gdb_vecs.h".
9408 (thread_db_load_search): Use a vector to iterate over path elements.
9409 Handle text appearing after "$pdir".
9410
9411 * configure.ac: Add check for strstr.
9412 * config.in: Regenerate.
9413 * configure: Regenerate.
9414
7c3270ae
UW
94152012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
9416
9417 * hostio.c (handle_pread): If pread fails, fall back to attempting
9418 lseek/read.
9419 (handle_pwrite): Likewise for pwrite.
9420
b62e2b27
UW
94212012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
9422
9423 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
9424 between unsupported TYPE and unimplementable ADDR/LEN combination.
9425 (arm_insert_point): Act on new return value.
9426
78a99e91
PA
94272012-07-31 Pedro Alves <palves@redhat.com>
9428
9429 * server.c (process_point_options): Only skip tokens if we find
9430 one that is unrecognized. Don't treat 'X' specially while
9431 skipping unrecognized tokens.
9432
fcf303ab
UW
94332012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
9434
9435 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
9436 to 4-byte-align HW breakpoint addresses for Thumb.
9437
7255706c
YQ
94382012-07-27 Yao Qi <yao@codesourcery.com>
9439
9440 PR remote/14161.
9441
9442 * server.h: Declare gdb_agent_about_to_close.
9443 * target.c (kill_inferior): Include "agent.h".
9444 New. Send command 'kill'.
9445 * target.h (kill_inferior): Removed macro.
9446 * tracepoint.c (gdb_agent_about_to_close): New.
9447 (gdb_agent_helper_thread): Handle command 'close'.
9448 Wait endlessly until the inferior stops.
9449 Install gdb_agent_remove_socket to atexit hook.
9450 (agent_socket_name): New static variable.
9451 (gdb_agent_socket_init): Replace local variable 'name' with
9452 'agent_socket_name'.
9453 (gdb_agent_remove_socket): New.
9454
5a3f286f
YQ
94552012-07-27 Yao Qi <yao@codesourcery.com>
9456
9457 * server.c (process_point_options): Stop at 'X' when parsing.
9458
961bd387
ME
94592012-07-19 Michael Eager <eager@eagercon.com>
9460
a261b8f5 9461 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
961bd387
ME
9462 to hw_execute.
9463 * linux-x86-low.c (x86_insert_point, x86_remove_point):
9464 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
9465 hardware breakpoint.
9466
aa7c7447
JK
94672012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
9468
9469 * gdbserver/linux-low.c (initialize_low): Call
9470 linux_ptrace_init_warnings.
9471
7f216e7c
DE
94722012-07-02 Doug Evans <dje@google.com>
9473
9474 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
9475 pointer to int.
9476
d3ce09f5
SS
94772012-07-02 Stan Shebs <stan@codesourcery.com>
9478
9479 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
9480 (ax.o): Add it to build rule.
9481 (ax-ipa.o): Ditto.
9482 (OBS): Add format.o.
9483 (IPA_OBS): Add format.o.
9484 * server.c (handle_query): Claim support for breakpoint commands.
9485 (process_point_options): Add command case.
9486 (process_serial_event): Leave running if there are printfs in
9487 effect.
9488 * mem-break.h (any_persistent_commands): Declare.
9489 (add_breakpoint_commands): Declare.
9490 (gdb_no_commands_at_breakpoint): Declare.
9491 (run_breakpoint_commands): Declare.
9492 * mem-break.c (struct point_command_list): New struct.
9493 (struct breakpoint): New field command_list.
9494 (any_persistent_commands): New function.
9495 (add_commands_to_breakpoint): New function.
9496 (add_breakpoint_commands): New function.
9497 (gdb_no_commands_at_breakpoint): New function.
9498 (run_breakpoint_commands): New function.
9499 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
9500 locally.
9501 * ax.c: Include format.h.
9502 (ax_printf): New function.
9503 (gdb_eval_agent_expr): Add printf opcode.
9504
2f8f6aed
YQ
95052012-06-13 Yao Qi <yao@codesourcery.com>
9506
9507 * server.c (start_inferior): Remove duplicated writes to fields
9508 'last_resume_kind' and 'last_status' of 'current_inferior'.
9509
0c9070b3
YQ
95102012-06-12 Yao Qi <yao@codesourcery.com>
9511 Pedro Alves <palves@redhat.com>
9512
9513 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
9514 comment.
9515 * server.c (handle_v_cont): Extend comment.
9516
c52daf70
YQ
95172012-06-11 Yao Qi <yao@codesourcery.com>
9518
9519 * linux-low.c (linux_attach): Add 'static'.
9520
d38bbb0a
YQ
95212012-06-06 Yao Qi <yao@codesourcery.com>
9522
9523 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
9524
89dc0afd
JK
95252012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
9526
9527 Fix gcc -flto compilation warning.
9528 * server.c (main): Make variable multi_mode and attach volatile.
9529
75f62ce7
TJB
95302012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9531
9532 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
9533 if the platform doesn't know about it.
9534
65f479b6
PA
95352012-05-30 Jeff Kenton <jkenton@tilera.com>
9536
9537 * Makefile.in (SFILES): Add linux-tile-low.c.
9538 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
9539 * configure.srv: Handle tilegx-*-linux*.
9540 * linux-tile-low.c: New file.
9541
0c5bf5a9
JK
95422012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
9543
9544 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
9545
a493e3e2
PA
95462012-05-24 Pedro Alves <palves@redhat.com>
9547
9548 PR gdb/7205
9549
43aaf8b6 9550 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
a493e3e2 9551
2ea28649
PA
95522012-05-24 Pedro Alves <palves@redhat.com>
9553
9554 PR gdb/7205
9555
9556 Replace target_signal with gdb_signal throughout.
9557
8d409d16
MR
95582012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
9559
9560 * linux-low.c (linux_store_registers): Avoid the copying sequence
9561 when no data has been retrieved by ptrace.
9562
23512c01
MGD
95632012-05-22 Will Deacon <will.deacon@arm.com>
9564
9565 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
9566 Include asm/ptrace.h.
9567 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
9568 already defined.
9569
4934b29e
MR
95702012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
9571
9572 * linux-low.c (linux_store_registers): Don't re-retrieve data
9573 with ptrace that has already been obtained from /proc. Always
9574 copy any data retrieved with ptrace to the buffer supplied.
9575
bde24c0a
PA
95762012-05-11 Yao Qi <yao@codesourcery.com>
9577 Pedro Alves <palves@redhat.com>
9578
9579 * linux-low.c (enum stopping_threads_kind): New.
9580 (stopping_threads): Change type to `enum stopping_threads_kind'.
9581 (handle_extended_wait): If stopping and suspending threads, leave
9582 the new_lwp suspended too.
9583 (linux_wait_for_event): Adjust.
9584 (stop_all_lwps): Set `stopping_threads' to
9585 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
9586 whether we're suspending threads or just stopping them. Assert no
9587 recursion happens.
9588
623b6bdf
YQ
95892012-04-29 Yao Qi <yao@codesourcery.com>
9590
9591 * server.h: Move some code to ...
9592 * gdbthread.h: ... here. New.
9593 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
9594 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
9595 (nto-low.o, win32-low.o): Likewise.
9596 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
9597 * regcache.c, remote-utils.c, server.c: Likewise.
9598 * target.c, tracepoint.c, win32-low.c: Likewise.
9599
f15f9948
TJB
96002012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9601
9602 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
9603 (PTRACE_ARG4_TYPE): Likewise.
9604 (PTRACE_XFER_TYPE): Likewise.
9605 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
9606 ptrace to PTRACE_ARG3_TYPE.
9607 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
9608 (PTRACE_ARG4_TYPE): Likewise.
9609 (PTRACE_XFER_TYPE): Likewise.
9610 (linux_detach_one_lwp): Cast fourth argument of
9611 ptrace to long then PTRACE_ARG4_TYPE.
9612 (regsets_fetch_inferior_registers): Cast third argument of
9613 ptrace to long then PTRACE_ARG3_TYPE.
9614 (regsets_store_inferior_registers): Likewise.
9615
38ea300a
PA
96162012-04-20 Pedro Alves <palves@redhat.com>
9617
9618 * configure: Regenerate.
9619
c971b7fa
PA
96202012-04-19 Pedro Alves <palves@redhat.com>
9621
43aaf8b6 9622 * Makefile.in (GNULIB_BUILDDIR): New.
c971b7fa 9623 (LIBGNU, INCGNU, GNULIB_H): Adjust.
43aaf8b6
PA
9624 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
9625 (all, install-only, uninstall, clean-info, all-lib, clean): No
9626 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
9627 (maintainer-clean realclean distclean): Use subdir_do.
9628 (subdir_do): New.
9629 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
c971b7fa 9630 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
43aaf8b6
PA
9631 * acinclude.m4: Include acx_configure_dir.m4.
9632 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
9633 calls. Call AC_PROG_RANLIB. Configure gnulib using
9634 ACX_CONFIGURE_DIR.
9635 (GNULIB): New.
9636 (GNULIB_STDINT_H): Adjust.
9637 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
9638 * gdbreplay.c: Include build-gnulib/config.h.
9639 * server.h: Likewise.
9640 * aclocal.m4: Regenerate.
9641 * config.in: Regenerate.
9642 * configure: Regenerate.
c971b7fa 9643
809277f8
PA
96442012-04-19 Pedro Alves <palves@redhat.com>
9645
9646 * Makefile.in (LIBGNU, INCGNU): Adjust.
9647 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
9648 (all, install-only, uninstall, clean-info, all-lib, clean)
9649 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
9650 * configure.ac: Adjust AC_OUTPUT output.
9651 * aclocal.m4: Regenerate.
9652 * configure: Regenerate.
9653
fd9bb8b8
PA
96542012-04-19 Pedro Alves <palves@redhat.com>
9655
9656 * Makefile.in (generated_files): New.
9657 (server_h): Remove the explicit dependency on config.h, and depend
9658 on $generated_files.
9659
1c298c66
PA
96602012-04-19 Pedro Alves <palves@redhat.com>
9661
9662 * Makefile.in (INCGNU): Add -Ignulib.
9663
57c4b50b
PA
96642012-04-19 Pedro Alves <palves@redhat.com>
9665
9666 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
9667 (INCGNU): ... this, and spell out -I here.
9668 (GNULIB_LIB): Rename to ...
9669 (LIBGNU): ... this.
9670 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
9671
1030e047
PA
96722012-04-19 Pedro Alves <palves@redhat.com>
9673
9674 * config.in: Regenerate.
9675
447d4319
PA
96762012-04-19 Pedro Alves <palves@redhat.com>
9677
9678 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
9679 * server.h (memmem): Remove declaration.
9680 * config.in: Regenerate.
9681 * configure: Regenerate.
9682
aad9eab9
YQ
96832012-04-19 Yao Qi <yao@codesourcery.com>
9684
9685 * Makefile.in (SFILES): Add common/vec.c.
9686 (OBS): Add vec.o.
9687 (vec.o): New rule.
9688
3e10640f
YQ
96892012-04-19 Yao Qi <yao@codesourcery.com>
9690
9691 * remote-utils.c (prepare_resume_reply): Replace with macro
9692 target_core_of_thread.
9693 * server.c (handle_qxfer_threads_proper): Likewise.
9694 * target.h (traget_core_of_thread): New macro.
9695
71622373
PA
96962012-04-18 Pedro Alves <palves@redhat.com>
9697
9698 * aclocal.m4: Regenerate.
9699 * configure: Regenerate.
9700
80d26939
YQ
97012012-04-16 Yao Qi <yao@codesourcery.com>
9702
9703 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
9704 duplicated on address.
9705
42476b70
YQ
97062012-04-16 Yao Qi <yao@codesourcery.com>
9707
9708 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
9709 (struct tracepoint_action_ops) <send>: New field.
9710 (m_tracepoint_action_send, r_tracepoint_action_send): New.
9711 (agent_expr_send, x_tracepoint_action_send): New.
9712 (l_tracepoint_action_send): New.
9713 (cmd_qtdp): Download and install tracepoint
9714 according to `use_agent'.
9715 (run_inferior_command): Add one more parameter `len'.
9716 Update callers.
9717 (tracepoint_send_agent): New.
9718 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
9719
7bc83639
YQ
97202012-04-16 Yao Qi <yao@codesourcery.com>
9721
9722 * tracepoint.c (download_tracepoints): Moved to ...
9723 (cmd_qtstart): ... here.
9724
5f18041e
YQ
97252012-04-14 Yao Qi <yao@codesourcery.com>
9726
9727 * tracepoint.c: Include inttypes.h.
9728 (struct collect_memory_action): Use sized types.
9729 (struct tracepoint): Likewise.
9730 (cmd_qtdp, stop_tracing): Update print specifiers.
9731 (cmd_qtp, response_tracepoint): Likewise.
9732 (collect_data_at_tracepoint): Likewise.
9733 (collect_data_at_step): Likewise.
9734
55a8c076
YQ
97352012-04-14 Yao Qi <yao@codesourcery.com>
9736
9737 Import gnulib module inttypes.
9738 * aclocal.m4, config.in, configure: Regenerated.
9739
dc750257
YQ
97402012-04-14 Yao Qi <yao@codesourcery.com>
9741
9742 * Makefile.in (maintainer-clean, realclean, distclean): Remove
9743 Makefile and config.status at last.
9744
0ab5faf9
YQ
97452012-04-13 Yao Qi <yao@codesourcery.com>
9746
9747 * tracepoint.c: Include stdint.h unconditionally.
9748
18f5fd81
TJB
97492012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9750
9751 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
9752 on BFD_HAVE_SYS_PROCFS_TYPE.
9753 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
9754 * configure: Regenerate.
9755 * config.in: Likewise.
9756
4d47af5c
L
97572012-04-13 H.J. Lu <hongjiu.lu@intel.com>
9758
9759 * Makefile.in (clean): Also remove x32.c x32-linux.c
9760 x32-avx.c x32-avx-linux.c.
9761 (x32.o): New target.
9762 (x32.c): Likewise.
9763 (x32-linux.o): Likewise.
9764 (x32-linux.c): Likewise.
9765 (x32-avx.o): Likewise.
9766 (x32-avx.c): Likewise.
9767 (x32-avx-linux.o): Likewise.
9768 (x32-avx-linux.c): Likewise.
9769
9770 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
9771 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
9772 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
9773 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
9774 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
9775 i386/x32-avx-linux.xml.
9776
9777 * linux-x86-low.c (init_registers_x32_linux): New prototype.
9778 (init_registers_x32_avx_linux): Likwise.
9779 (x86_linux_update_xmltarget): Call init_registers_x32_linux
9780 or init_registers_x32_avx_linux if linux_is_elf64 is false.
9781
ecedbe58
PA
97822012-04-13 Pedro Alves <palves@redhat.com>
9783
9784 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
9785 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
9786 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
9787 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
9788 the sub-make.
9789
c92b5177
L
97902012-04-12 H.J. Lu <hongjiu.lu@intel.com>
9791
9792 * linux-x86-low.c (compat_x32_clock_t): New.
9793 (compat_x32_siginfo_t): Likewise.
9794 (compat_x32_siginfo_from_siginfo): Likewise.
9795 (siginfo_from_compat_x32_siginfo): Likewise.
9796 (linux_is_elf64): Likewise.
9797 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
9798 and siginfo_from_compat_x32_siginfo for x32.
9799 (x86_arch_setup): Set linux_is_elf64.
9800
214d508e
L
98012012-04-12 H.J. Lu <hongjiu.lu@intel.com>
9802
9803 PR gdb/13969
9804 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
9805 e_machine field.
9806 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
9807 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
9808 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
9809 compatible with process.
9810
c9a1864a
YQ
98112012-04-12 Yao Qi <yao@codesourcery.com>
9812
9813 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
9814 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
9815 (install-only, install-info, clean): Handle sub dir gnulib.
9816 (all-lib, am--refresh): New targets.
9817 (memmem.o): Remove target.
9818 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
9819 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
9820 (AC_REPLACE_FUNCS): Remove memmem.
9821 Invoke gl_INIT and AM_INIT_AUTOMAKE.
9822 (AC_OUTPUT): Generate Makefile in gnulib/.
9823 * aclocal.m4, config.in, configure: Regenerated.
9824
367ba2c2
MR
98252012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
9826
9827 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
9828
9d236627
PA
98292012-04-05 Pedro Alves <palves@redhat.com>
9830
9831 -Werror=strict-aliasing
9832
9833 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
9834 pointer.
9835
111217b3
PA
98362012-04-04 Pedro Alves <palves@redhat.com>
9837
9838 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
9839 (sparc_store_gregset_from_stack, sparc_store_gregset)
9840 (sparc_breakpoint_at): Fix formatting.
9841
8365dcf5
TJB
98422012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9843
9844 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
9845 are available.
9846 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
9847 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
9848 * config.in: Regenerate.
9849 * configure: Likewise.
9850
689cc2ae
PA
98512012-03-29 Pedro Alves <palves@redhat.com>
9852
9853 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
9854 Correct ptrace arguments.
9855
c14dfd32
PA
98562012-03-28 Pedro Alves <palves@redhat.com>
9857
9858 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
9859 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
9860 (IA64_FR1_REGNUM): New defines.
9861 (ia64_fetch_register): New.
9862 (the_low_target): Install it.
9863 * linux-low.h (struct linux_target_ops) <fetch_register>: New
9864 field.
9865 * linux-low.c (linux_fetch_registers): Try the
9866 the_low_target.fetch_register hook first.
9867
9868 * linux-arm-low.c (the_low_target): Adjust.
9869 * linux-bfin-low.c (the_low_target): Adjust.
9870 * linux-cris-low.c (the_low_target): Adjust.
9871 * linux-crisv32-low.c (the_low_target): Adjust.
9872 * linux-m32r-low.c (the_low_target): Adjust.
9873 * linux-m68k-low.c (the_low_target): Adjust.
9874 * linux-mips-low.c (the_low_target): Adjust.
9875 * linux-ppc-low.c (the_low_target): Adjust.
9876 * linux-s390-low.c (the_low_target): Adjust.
9877 * linux-sh-low.c (the_low_target): Adjust.
9878 * linux-sparc-low.c (the_low_target): Adjust.
9879 * linux-tic6x-low.c (the_low_target): Adjust.
9880 * linux-x86-low.c (the_low_target): Adjust.
9881 * linux-xtensa-low.c (the_low_target): Adjust.
9882
63c88e13
PA
98832012-03-26 Pedro Alves <palves@redhat.com>
9884
9885 * server.c (handle_qxfer_libraries): Don't bail early if
9886 the_target->qxfer_libraries_svr4 is not NULL.
9887
fb723180
PA
98882012-03-26 Pedro Alves <palves@redhat.com>
9889
9890 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
9891
0afae3cf
PA
98922012-03-23 Pedro Alves <palves@redhat.com>
9893
9894 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
9895 "library-list-svr4" element's start tag when the the DSO list is
9896 empty.
9897
485f1ee4
PA
98982012-03-23 Pedro Alves <palves@redhat.com>
9899
9900 * linux-low.c (read_one_ptr): Read the inferior's pointer through
9901 a variable whose type size is the same as the inferior's pointer
9902 size.
9903
a5362b9a
TS
99042012-03-21 Thomas Schwinge <thomas@codesourcery.com>
9905
9906 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
9907 struct siginfo.
9908 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
9909 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
9910 * linux-low.h: Include <signal.h>.
9911 (struct siginfo): Remove forward declaration.
9912 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
9913 struct siginfo.
9914
d226c142
MF
99152012-03-21 Mike Frysinger <vapier@gentoo.org>
9916
9917 * .gitignore: Ignore more files.
9918
122f36ef
PA
99192012-03-19 Pedro Alves <palves@redhat.com>
9920 Jan Kratochvil <jan.kratochvil@redhat.com>
9921
9922 * server.c (cont_thread, general_thread): Add describing comments.
9923 (start_inferior): Clear `cont_thread'.
9924 (handle_v_cont): Don't set `cont_thread' if resuming all threads
9925 of a process.
9926
fc3e5175
YQ
99272012-03-15 Yao Qi <yao@codesourcery.com>
9928
9929 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
9930 handling to ...
9931 (cmd_qtdp): ... here.
9932
8d0d92cd
YQ
99332012-03-15 Yao Qi <yao@codesourcery.com>
9934
9935 * tracepoint.c (struct tracepoint_action_ops): New.
9936 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
9937 (m_tracepoint_action_download): New.
9938 (r_tracepoint_action_download): New.
9939 (x_tracepoint_action_download): New.
9940 (l_tracepoint_action_download): New.
9941 (add_tracepoint_action): Install `action->ops' according type.
9942 (download_tracepoint_1): Move code `download' function pointer
9943 of various tracepoint_action_ops.
9944
87b0bb13
JK
99452012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
9946
9947 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
9948 linux_ptrace_attach_warnings.
9949
5f572dec
JK
99502012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
9951
9952 * Makefile.in (linux-ptrace.o): New.
9953 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
9954 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
9955 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
9956 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
9957 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
9958 of these targets.
9959 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
9960
f4647387
YQ
99612012-03-08 Yao Qi <yao@codesourcery.com>
9962 Pedro Alves <palves@redhat.com>
9963
9964 Fix PR server/13392.
9965 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
9966 offset of JMP insn.
9967 * tracepoint.c (remove_tracepoint): New.
9968 (cmd_qtdp): Call remove_tracepoint when failed to install.
9969
9b224c5e
PA
99702012-03-07 Pedro Alves <palves@redhat.com>
9971
9972 * linux-low.c (get_detach_signal): New.
9973 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
9974 Pass on pending signals to PTRACE_DETACH. Check the result of the
9975 ptrace call.
9976 * server.c (program_signals, program_signals_p): New.
9977 (handle_general_set): Handle QProgramSignals.
9978 * server.h (program_signals, program_signals_p): Declare.
9979
e237a7e2
JK
99802012-03-05 Pedro Alves <palves@redhat.com>
9981 Jan Kratochvil <jan.kratochvil@redhat.com>
9982
9983 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
9984 New comment why.
9985
5808517f
YQ
99862012-03-03 Yao Qi <yao@codesourcery.com>
9987
9988 * tracepoint.c (tracepoint_look_up_symbols): Update call to
9989 agent_look_up_symbols.
9990
58b4daa5
YQ
99912012-03-03 Yao Qi <yao@codesourcery.com>
9992
9993 * Makefile.in (linux-low.o): Keep dependence on agent.h.
9994 (linux-x86-low.o): Likewise.
9995 * server.h: Remove in_process_agent_loaded.
9996 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
9997 common/agent.c.
9998 Update callers.
9999
8ffcbaaf
YQ
100002012-03-03 Yao Qi <yao@codesourcery.com>
10001
10002 * tracepoint.c (gdb_agent_capability): New global.
10003 (in_process_agent_loaded_ust): Renamed to
10004 `in_process_agent_supports_ust'.
10005 Update callers.
10006 (in_process_agent_supports_ust): Call agent_capability_check.
10007 (clear_installed_tracepoints): Assert that agent supports
10008 agent.
10009
d1feda86
YQ
100102012-03-03 Yao Qi <yao@codesourcery.com>
10011
10012 * linux-low.c (linux_supports_agent): New.
10013 (linux_target_ops): Initialize field `supports_agent' with
10014 linux_supports_agent.
10015 * target.h (struct target_ops) <supports_agent>: New.
10016 (target_supports_agent): New macro.
10017 * server.c (handle_general_set): Handle packet 'QAgent'.
10018 (handle_query): Send `QAgent+'.
10019 * Makefile.in (server.o): Depends on agent.h.
10020
2fa291ac
YQ
100212012-03-03 Yao Qi <yao@codesourcery.com>
10022
10023 * Makefile.in (OBS): Add agent.o.
10024 Add new rule for agent.o.
10025 Track dependence of tracepoint.c on agent.h.
10026 * tracepoint.c (run_inferior_command_1):
10027 (run_inferior_command): Call agent_run_command.
10028 (gdb_ust_connect_sync_socket): Deleted. Move it to
10029 common/agent.c.
10030 (resume_thread, stop_thread): Likewise.
10031 (gdb_ust_socket_init): Renamed to ...
10032 (gdb_agent_socket_init): ... New.
10033 (gdb_ust_thread): Renamed to ...
10034 (gdb_agent_helper_thread): ... New.
10035 (gdb_ust_init): Move some code to ...
10036 (gdb_agent_init): ... here. New.
10037 [HAVE_UST]: Call gdb_ust_init.
10038 (initialize_tracepoint_ftlib): Call gdb_agent_init.
10039 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
10040 * config.in, configure: Regenerated.
10041
05044653
PA
100422012-03-02 Pedro Alves <palves@redhat.com>
10043
10044 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
10045 * linux-low.c (struct simple_pid_list): New.
10046 (stopped_pids): New a struct simple_pid_list pointer.
10047 (add_to_pid_list, pull_pid_from_list): New.
10048 (handle_extended_wait): Don't assume the first signal new children
10049 report is SIGSTOP. Adjust call to pull_pid_from_list.
10050 (linux_wait_for_lwp): Adjust.
10051
8d00225b
YQ
100522012-03-02 Yao Qi <yao@codesourcery.com>
10053
10054 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
10055 debug log.
10056
19560ba5
YQ
100572012-03-02 Yao Qi <yao@codesourcery.com>
10058
10059 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
10060 `stop_pc' and `tpoint'. Update caller.
10061
1faeff08
MR
100622012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
10063
10064 * linux-low.h (linux_target_ops): Add regset_bitmap member.
10065 * linux-low.c (use_linux_regsets): New macro.
10066 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
10067 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
10068 (linux_register_in_regsets): New function.
10069 (usr_fetch_inferior_registers): Skip registers covered by
10070 regsets.
10071 (usr_store_inferior_registers): Likewise.
10072 (usr_fetch_inferior_registers): New macro.
10073 (usr_store_inferior_registers): Likewise.
10074 (linux_fetch_registers): Handle mixed regset/non-regset targets.
10075 (linux_store_registers): Likewise.
10076 * linux-mips-low.c (init_registers_mips_dsp_linux): New
10077 prototype.
10078 (init_registers_mips64_dsp_linux): Likewise.
10079 (init_registers_mips_linux): New macro.
10080 (init_registers_mips_dsp_linux): Likewise.
10081 (mips_dsp_num_regs): Likewise.
10082 (DSP_BASE, DSP_CONTROL): New fallback macros.
10083 (mips_base_regs): New macro.
10084 (mips_regmap): Use it. Fix the size.
10085 (mips_dsp_regmap): New variable.
10086 (mips_dsp_regset_bitmap): Likewise.
10087 (mips_arch_setup): New function.
10088 (mips_cannot_fetch_register): Use the_low_target.regmap rather
10089 than mips_regmap.
10090 (mips_cannot_store_register): Likewise.
10091 (the_low_target): Update .arch_setup, .num_regs and .regmap
10092 initializers. Add .regset_bitmap initializer.
10093 * linux-arm-low.c (the_low_target): Add .regset_bitmap
10094 initializer.
10095 * linux-bfin-low.c (the_low_target): Likewise.
10096 * linux-cris-low.c (the_low_target): Likewise.
10097 * linux-crisv32-low.c (the_low_target): Likewise.
10098 * linux-ia64-low.c (the_low_target): Likewise.
10099 * linux-m32r-low.c (the_low_target): Likewise.
10100 * linux-m68k-low.c (the_low_target): Likewise.
10101 * linux-ppc-low.c (the_low_target): Likewise.
10102 * linux-s390-low.c (the_low_target): Likewise.
10103 * linux-sh-low.c (the_low_target): Likewise.
10104 * linux-sparc-low.c (the_low_target): Likewise.
10105 * linux-tic6x-low.c (the_low_target): Likewise.
10106 * linux-x86-low.c (the_low_target): Likewise.
10107 * linux-xtensa-low.c (the_low_target): Likewise.
10108 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
10109 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
10110 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
10111 srv_xmlfiles.
10112 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
10113 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
10114
c03e6ccc
YQ
101152012-02-29 Yao Qi <yao@codesourcery.com>
10116 Pedro Alves <palves@redhat.com>
10117
10118 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
10119 `step_over_finished' is true.
10120
644cebc9
PA
101212012-02-27 Pedro Alves <palves@redhat.com>
10122
10123 * linux-low.c (pid_is_stopped): Delete, moved to common/.
10124 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
10125
c14d7ab2
PA
101262012-02-27 Pedro Alves <palves@redhat.com>
10127
10128 PR server/9684
10129 * linux-low.c (pid_is_stopped): New.
10130 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
10131
412c89dd
LM
101322012-02-25 Luis Machado <lgustavo@codesourcery.com>
10133
10134 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
10135 of conditions.
10136
b745defe
MR
101372012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
10138
10139 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
10140
9f3a5c85
LM
101412012-02-24 Luis Machado <lgustavo@codesourcery>
10142
10143 * server.c (handle_query): Advertise support for target-side
10144 breakpoint condition evaluation.
10145 (process_point_options): New function.
10146 (process_serial_event): When inserting a breakpoint, check for
10147 a target-side condition that should be evaluated.
10148
10149 * mem-break.c: Include regcache.h and ax.h.
10150 (point_cond_list_t): New data structure.
10151 (breakpoint) <cond_list>: New field.
10152 (find_gdb_breakpoint_at): Make non-static.
10153 (delete_gdb_breakpoint_at): Clear any target-side
10154 conditions.
10155 (clear_gdb_breakpoint_conditions): New function.
10156 (add_condition_to_breakpoint): Likewise.
10157 (add_breakpoint_condition): Likewise.
10158 (gdb_condition_true_at_breakpoint): Likewise.
10159 (gdb_breakpoint_here): Return result directly instead
10160 of going through a local variable.
10161
10162 * mem-break.h (find_gdb_breakpoint_at): New prototype.
10163 (clear_gdb_breakpoint_conditions): Likewise.
10164 (add_breakpoint_condition): Likewise.
10165 (gdb_condition_true_at_breakpoint): Likewise.
10166
10167 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
10168 (need_step_over_p): Take target-side breakpoint condition into
10169 consideration.
10170
5e1dc496
LM
101712012-02-24 Luis Machado <lgustavo@codesourcery>
10172
10173 * server.h: Include tracepoint.h.
10174 (agent_mem_read, agent_get_trace_state_variable_value,
10175 agent_set_trace_state_variable_value,
10176 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
10177 get_set_tsv_func_addr): New prototypes.
10178
10179 * ax.h: New include file.
10180 * ax.c: New source file.
10181
10182 * tracepoint.c: Include ax.h.
10183 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
10184 agent_expr, eval_result_type): Move to ax.h.
10185 (parse_agent_expr): Rename to ...
10186 (gdb_parse_agent_expr): ... this, make it non-static and move
10187 to ax.h.
10188 (unparse_agent_expr) Rename to ...
10189 (gdb_unparse_agent_expr): ... this, make it non-static and move
10190 to ax.h.
10191 (eval_agent_expr): Rename to ...
10192 (eval_tracepoint_agent_expr): ... this.
10193 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
10194 forward declarations.
10195 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
10196 (agent_get_trace_state_variable_value): New function.
10197 (agent_set_trace_state_variable_value): New function.
10198 (cmd_qtdp): Call gdb_parse_agent_expr (...).
10199 (response_tracepoint): Call gdb_unparse_agent_expr (...).
10200 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
10201 (condition_true_at_tracepoint): Likewise.
10202 (parse_agent_expr): Rename to ...
10203 (gdb_parse_agent_expr): ... this and move to ax.c.
10204 (unparse_agent_expr): Rename to ...
10205 (gdb_unparse_agent_expr): ... this and move to ax.c.
10206 (gdb_agent_op_name): Move to ax.c.
10207 (eval_agent_expr): Rename to ...
10208 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
10209 and move to ax.c.
10210 (eval_tracepoint_agent_expr): New function.
10211 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
43aaf8b6 10212 non-static.
5e1dc496
LM
10213 (current_insn_ptr, emit_error, struct bytecode_address): Move to
10214 ax.c.
10215 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
10216 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
10217 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
10218 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
10219 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
10220 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
10221 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
10222 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
10223 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
10224 (compile_bytecodes): Remove forward declaration.
10225 (is_goto_target): Move to ax.c.
10226 (compile_bytecodes): Move to ax.c and call
10227 agent_get_trace_state_variable_value (...) and
10228 agent_set_trace_state_variable_value (...).
10229
10230 * Makefile.in: Update ax.c and IPA dependencies.
10231
277e4e52
PA
102322012-02-24 Pedro Alves <palves@redhat.com>
10233
10234 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
10235 (cmd_bigqtbuffer_circular): ... this. Only handle
10236 'QTBuffer:circular:'.
10237 (handle_tracepoint_general_set): Adjust.
10238
bf4c19f7
YQ
102392012-02-16 Yao Qi <yao@codesourcery.com>
10240
10241 * inferiors.c: Move code to ...
10242 * dll.c: .... here. New.
10243 * server.h: Declare clear_dlls.
10244 * Makefile.in (SFILES): Add dll.c.
10245 (OBS): Add dll.o
10246 (dll.o): New rule.
10247
d73f2619
YQ
102482012-02-11 Yao Qi <yao@codesourcery.com>
10249
10250 * server.c: (handle_monitor_command): Add a new parameter
10251 `own_buf'.
10252 (handle_query): Update caller.
10253
f8255c2a
JB
102542012-02-09 Joel Brobecker <brobecker@adacore.com>
10255
10256 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
10257 * configure, config.in: Regenerate.
10258 * hostio.c: Provide an alternate implementation if HAVE_READLINK
10259 is not defined.
10260
da84f473
PA
102612012-02-02 Pedro Alves <palves@redhat.com>
10262
10263 Try SIGKILL first, then PTRACE_KILL.
10264 * linux-low.c (linux_kill_one_lwp): New.
10265 (linux_kill_one_lwp): Rename to ...
10266 (kill_one_lwp_callback): ... this. Use the new
10267 linux_kill_one_lwp.
10268
e886a173
PA
102692012-02-02 Pedro Alves <palves@redhat.com>
10270
10271 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
10272 inferior.
10273
be07f1a2
PA
102742012-01-27 Pedro Alves <palves@redhat.com>
10275
10276 * linux-low.c (linux_child_pid_to_exec_file): Delete.
10277 (elf_64_file_p): Make static.
10278 (linux_pid_exe_is_elf_64_file): New.
10279 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
10280 Delete declarations.
10281 (linux_pid_exe_is_elf_64_file): Declare.
10282 * linux-x86-low.c (x86_arch_setup): Use
10283 linux_pid_exe_is_elf_64_file.
10284
d8301ad1
JK
102852012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
10286
10287 * linux-low.c (linux_wait_for_event_1): Rename to ...
10288 (linux_wait_for_event): ... here and merge it with former
10289 linux_wait_for_event - new variable wait_ptid, use it.
10290 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
10291
01b17894
PA
102922012-01-23 Pedro Alves <palves@redhat.com>
10293
10294 * server.c (main): Avoid yet another case of infinite loop while
10295 detaching/killing after a longjmp.
10296
e825046f
JK
102972012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
10298
10299 Code cleanup.
10300 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
10301
b9e7b9c3
UW
103022012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
10303
10304 * hostio.c (handle_readlink): New function.
10305 (handle_vFile): Call it to handle "vFile:readlink" packets.
10306
901f9912
UW
103072012-01-20 Pedro Alves <palves@redhat.com>
10308 Ulrich Weigand <ulrich.weigand@linaro.org>
10309
10310 * server.c (handle_v_requests): Only support vAttach and vRun to
10311 start multiple processes when in extended protocol mode.
10312
fc1ab1a0
PA
103132012-01-17 Pedro Alves <palves@redhat.com>
10314
10315 * tracepoint.c (initialize_tracepoint): Use mmap instead of
10316 memalign plus mprotect to allocate the scratch buffer.
10317
7d5d4e98
PA
103182012-01-13 Pedro Alves <palves@redhat.com>
10319
10320 * server.c (attach_inferior): Clear `cont_thread'.
10321
f128d5e9
PA
103222012-01-13 Pedro Alves <palves@redhat.com>
10323
10324 * server.c (main): Avoid infinite loop while detaching/killing
10325 after a longjmp.
10326
06db92f0
DE
103272012-01-09 Doug Evans <dje@google.com>
10328
10329 * server.c (start_inferior): Set last_ptid in --wrapper case.
10330
32d92999
YQ
103312012-01-06 Yao Qi <yao@codesourcery.com>
10332
10333 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
10334 defined.
10335 [IN_PROCESS_AGENT] (debug_agent): New global variable.
10336
5e0a92a9
YQ
103372012-01-04 Yao Qi <yao@codesourcery.com>
10338
10339 * tracepoint.c (cmd_qtdp): Print debug message
10340 for static tracepoint.
10341
ae639e8c
YQ
103422012-01-04 Yao Qi <yao@codesourcery.com>
10343
10344 * tracepoint.c (trace_vdebug): Differentiate debug message
10345 between gdbserver and IPA.
10346
f72429c5
YQ
103472012-01-03 Yao Qi <yao@codesourcery.com>
10348
10349 * tracepoint.c (tracepoint_was_hit): Don't collect for
10350 static tracepoint.
10351
12c3e59c
JB
103522012-01-02 Joel Brobecker <brobecker@adacore.com>
10353
10354 * terminal.h: Reformat copyright header.
10355
67827812
JB
103562012-01-02 Joel Brobecker <brobecker@adacore.com>
10357
10358 * server.c (gdbserver_version): Update copyright year.
10359 * gdbreplay.c (gdbreplay_version): Likewise.
10360
3e52c33d
JK
103612011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
10362
10363 * linux-low.c (linux_create_inferior): Put empty if clause for write.
10364
10365 Revert:
10366 2011-12-18 Hui Zhu <teawater@gmail.com>
10367 * linux-low.c (linux_create_inferior): Save return value to ret.
10368
66f1260e
HZ
103692011-12-18 Hui Zhu <teawater@gmail.com>
10370
10371 * linux-low.c (linux_create_inferior): Save return value to ret.
10372
e77616d7
DE
103732011-12-16 Doug Evans <dje@google.com>
10374
e7b06c57
DE
10375 * linux-low.c (linux_create_inferior): If stdio connection,
10376 redirect stdin from /dev/null, stdout to stderr.
10377 * remote-utils.c (remote_is_stdio): New static global.
10378 (remote_connection_is_stdio): New function.
10379 (remote_prepare): Handle stdio connection.
10380 (remote_open): Ditto.
10381 (remote_close): Don't close stdin for stdio connections.
10382 (read_prim,write_prim): New functions. Replace all calls to
10383 read/write to these.
10384 * server.c (main): Watch for "-" argument. Move call to
10385 remote_prepare before start_inferior.
10386 * server.h (STDIO_CONNECTION_NAME): New macro.
10387 (remote_connection_is_stdio): Declare.
10388
e77616d7
DE
10389 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
10390 in debugging output.
10391
82067193
YQ
103922011-12-15 Yao Qi <yao@codesourcery.com>
10393
10394 * tracepoint.c: Include sys/syscall.h.
10395 (gdb_ust_thread): Remove preprocessor conditional.
10396
82bfbe7e
PA
103972011-12-14 Pedro Alves <pedro@codesourcery.com>
10398
10399 * linux-low.c (linux_detach_one_lwp): Call
10400 the_low_target.prepare_to_resume before detaching.
10401
712c6575
YQ
104022011-12-14 Yao Qi <yao@codesourcery.com>
10403
10404 * tracepoint.c (gdb_ust_thread): Don't ignore return value
10405 of write.
10406
d54d1edf
YQ
104072011-12-14 Yao Qi <yao@codesourcery.com>
10408
10409 * i386-low.c (i386_low_stopped_data_address): Initialize local
10410 variable `control'.
10411
6210a125
PA
104122011-12-13 Pedro Alves <pedro@codesourcery.com>
10413
10414 PR remote/13492
10415
10416 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
10417 DR_CONTROL unless necessary. Extend comments.
10418 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
10419 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
10420
2ece8244
YQ
104212011-12-13 Yao Qi <yao@codesourcery.com>
10422
10423 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
10424 macros.
10425 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
10426
784867a5
JK
104272011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
10428
10429 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
10430 Print new debug message for such case.
10431
6bf36717
JK
104322011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
10433
10434 Fix overlapping memcpy.
10435 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
10436 the read_inferior_memory transfer.
10437 (delete_fast_tracepoint_jump): New variable buf. Use it for the
10438 write_inferior_memory transfer.
10439 (set_fast_tracepoint_jump): New variable buf. Use it for the
10440 read_inferior_memory and write_inferior_memory transfers.
10441 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
10442 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
10443 Use it for the write_inferior_memory transfer.
10444 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
10445 buffers.
10446
50275556
MR
104472011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
10448
10449 * linux-low.c (fetch_register, store_register): Make code
10450 consistent, fix formatting.
10451
7325beb4
MR
104522011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
10453
10454 * linux-low.c (usr_store_inferior_registers): Factor out code
10455 to handle individual registers into...
10456 (store_register): ... this new function.
10457
c642a434
UW
104582011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
10459
10460 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
10461 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
10462 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
10463 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
10464 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
10465 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
10466 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
10467 (srv_xmlfiles): Add new XML files.
10468
10469 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
10470 and <sys/uio.h>.
10471 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
10472 (init_registers_s390_linux32v1): Add prototype.
10473 (init_registers_s390_linux32v2): Likewise.
10474 (init_registers_s390_linux64v1): Likewise.
10475 (init_registers_s390_linux64v2): Likewise.
10476 (init_registers_s390x_linux64v1): Likewise.
10477 (init_registers_s390x_linux64v2): Likewise.
10478 (s390_num_regs): Increment to 52.
10479 (s390_regmap): Add orig_r2 register.
10480 (s390_num_regs_3264): Increment to 68.
10481 (s390_regmap_3264): Add orig_r2 register.
10482 (s390_collect_ptrace_register): Handle orig_r2 register.
10483 (s390_supply_ptrace_register): Likewise.
10484 (s390_fill_last_break): New function.
10485 (s390_store_last_break): Likewise.
10486 (s390_fill_system_call): New function.
10487 (s390_store_system_call): Likewise.
10488 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
10489 register sets.
10490 (s390_check_regset): New function.
10491 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
10492 NT_S390_SYSTEM_CALL regsets and use appropriate description.
10493 Update target_regsets for available register sets.
10494
2268b414
JK
104952011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
10496 Jan Kratochvil <jan.kratochvil@redhat.com>
10497
10498 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
10499 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
10500 New.
10501 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
10502 * linux-low.h (struct process_info_private): New member r_debug.
10503 * server.c (handle_qxfer_libraries): Call
10504 the_target->qxfer_libraries_svr4.
10505 (handle_qxfer_libraries_svr4): New function.
10506 (qxfer_packets): New entry "libraries-svr4".
10507 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
10508 * target.h (struct target_ops): New member qxfer_libraries_svr4.
10509 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
10510 PACKET_qXfer_libraries_svr4.
10511
d6db1fab
UW
105122011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
10513
10514 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
10515 PSW address/mask between 8-byte and 16-byte formats.
10516 (s390_supply_ptrace_register): Likewise.
10517 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
10518 basic addressing mode bit.
10519
242f5f1c
SS
105202011-11-24 Stan Shebs <stan@codesourcery.com>
10521
10522 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
10523
f196051f
SS
105242011-11-17 Stan Shebs <stan@codesourcery.com>
10525
10526 * tracepoint.c (struct tracepoint): New field traceframe_usage.
10527 (tracing_start_time): New global.
10528 (tracing_stop_time): New global.
10529 (tracing_user_name): New global.
10530 (tracing_notes): New global.
10531 (tracing_stop_note): New global.
10532 (cmd_qtstart): Set traceframe_usage, start_time.
10533 (stop_tracing): Set stop_time.
10534 (cmd_qtstatus): Report additional status.
10535 (cmd_qtp): New function.
10536 (handle_tracepoint_query): Call it.
10537 (cmd_qtnotes): New function.
10538 (handle_tracepoint_general_set): Call it.
10539 (get_timestamp): Rename from tsv_get_timestamp.
10540
405f8e94
SS
105412011-11-14 Stan Shebs <stan@codesourcery.com>
10542 Kwok Cheung Yeung <kcy@codesourcery.com>
10543
10544 * linux-x86-low.c (small_jump_insn): New.
10545 (i386_install_fast_tracepoint_jump_pad): Add arguments for
10546 trampoline and error message, build a trampoline and issue a small
10547 jump instruction to it.
10548 (x86_install_fast_tracepoint_jump_pad): Add arguments for
10549 trampoline and error message.
10550 (x86_get_min_fast_tracepoint_insn_len): New.
10551 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
10552 * linux-low.h (struct linux_target_ops): Add arguments to
10553 install_fast_tracepoint_jump_pad operation, add new operation.
10554 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
10555 arguments.
10556 (linux_get_min_fast_tracepoint_insn_len): New function.
10557 (linux_target_op): Add new operation.
10558 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
10559 (gdb_trampoline_buffer_end): Ditto.
10560 (gdb_trampoline_buffer_error): Ditto.
10561 (struct ipa_sym_addresses): Add fields for new IPA variables.
10562 (symbol_list): Add entries for new IPA variables.
10563 (struct tracepoint): Add fields to hold the address range of the
10564 trampoline used by the tracepoint.
10565 (trampoline_buffer_head): New static variable.
10566 (trampoline_buffer_tail): Ditto.
10567 (claim_trampoline_space): New function.
10568 (have_fast_tracepoint_trampoline_buffer): New function.
10569 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
10570 structure.
10571 (install_fast_tracepoint): Ditto, also add error buffer argument.
10572 (cmd_qtminftpilen): New function.
10573 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
10574 (fast_tracepoint_from_trampoline_address): New function.
10575 (fast_tracepoint_collecting): Handle trampoline as part of jump
10576 pad space.
10577 (set_trampoline_buffer_space): New function.
10578 (initialize_tracepoint): Initialize new IPA variables.
10579 * target.h (struct target_ops): Add arguments to
10580 install_fast_tracepoint_jump_pad operation, add new
10581 get_min_fast_tracepoint_insn_len operation.
10582 (target_get_min_fast_tracepoint_insn_len): New.
10583 (install_fast_tracepoint_jump_pad): Add arguments.
10584 * server.h (IPA_BUFSIZ): Define.
10585 * linux-i386-ipa.c: Include extra header files.
10586 (initialize_fast_tracepoint_trampoline_buffer): New function.
10587 (initialize_low_tracepoint): Call it.
10588 * server.h (set_trampoline_buffer_space): Declare.
10589 (claim_trampoline_space): Ditto.
10590 (have_fast_tracepoint_trampoline_buffer): Ditto.
10591
1e4d1764
YQ
105922011-11-14 Yao Qi <yao@codesourcery.com>
10593
10594 * server.c (handle_query): Handle InstallInTrace for qSupported.
10595 * tracepoint.c (add_tracepoint): Sort list.
10596 (install_tracepoint, download_tracepoint): New.
10597 (cmd_qtdp): Call them to install and download tracepoints.
10598 (sort_tracepoints): Removed.
10599 (cmd_qtstart): Update.
10600
5c73ff4e
YQ
106012011-11-14 Yao Qi <yao@codesourcery.com>
10602
10603 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
10604 * mem-break.h: Declare.
10605 * tracepoint.c (cmd_qtstart): Move some code to ...
10606 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
10607 New.
10608 (download_tracepoints): Move some code to ...
10609 (download_tracepoint_1): ... here. New.
10610
86a30030
YQ
106112011-11-08 Yao Qi <yao@codesourcery.com>
10612
10613 * remote-utils.c (relocate_instruction): A comment fix.
10614
8d26e50c
JB
106152011-11-07 Joel Brobecker <brobecker@adacore.com>
10616
10617 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
10618 (i386_dr_low_get_control, i386_dr_low_get_status): Use
10619 dr_status_mirror and dr_control_mirror from debug_reg_state.
10620 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
10621 (i386_initial_stuff): Remove use of deleted globals.
10622 (i386_get_thread_context, i386_set_thread_context,
10623 i386_thread_added): Use dr_status_mirror and dr_control_mirror
10624 from debug_reg_state.
10625
a59306a3
YQ
106262011-11-05 Yao Qi <yao@codesourcery.com>
10627
10628 * tracepoint.c (gdb_collect): Loop over tracepoints of same
10629 address as TPOINT's.
10630
3065dfb6
SS
106312011-11-02 Stan Shebs <stan@codesourcery.com>
10632
10633 * tracepoint.c (agent_mem_read_string): New function.
10634 (eval_agent_expr): Call it for tracenz.
10635 * server.c (handle_query): Report support for tracenz.
10636
fd0d8c7c
YQ
106372011-11-02 Yao Qi <yao@codesourcery.com>
10638
10639 * tracepoint.c (cmd_qtstart): Remove unused local variables.
10640
609086b1
YQ
106412011-11-02 Yao Qi <yao@codesourcery.com>
10642
10643 * target.h: Fix a typo in comment.
10644
b9fd1791
PA
106452011-10-31 Pedro Alves <pedro@codesourcery.com>
10646
10647 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
10648 clobber the breakpoints' shadows with fast tracepoint jumps.
10649 * mem-break.h (check_mem_write): Add `myaddr' parameter.
10650 * target.c (write_inferior_memory): Also pass MYADDR down to
10651 check_mem_write.
10652
03583c20
UW
106532011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
10654
10655 * configure.ac: Check support for personality routine.
10656 * configure: Regenerate.
10657 * config.in: Likewise.
10658 * linux-low.c: Include <sys/personality.h>.
10659 Define ADDR_NO_RANDOMIZE if necessary.
10660 (linux_create_inferior): Disable address space randomization when
10661 forking inferior, if requested.
10662 (linux_supports_disable_randomization): New function.
10663 (linux_target_ops): Install it.
10664 * server.h (disable_randomization): Declare.
10665 * server.c (disable_randomization): New global variable.
10666 (handle_general_set): Handle QDisableRandomization.
10667 (handle_query): Likewise for qSupported.
10668 (main): Support --disable-randomization and --no-disable-randomization
10669 command line arguments.
10670 * target.h (struct target_ops): Add supports_disable_randomization.
10671 (target_supports_disable_randomization): New macro.
10672
723b724b
MF
106732011-09-29 Mike Frysinger <vapier@gentoo.org>
10674
10675 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
10676 ifdef check.
10677 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
10678 [!PT_GETDSBT] (target_loadmap): New definition.
10679 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
10680 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
10681 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
10682 and PT_GETDSBT to LINUX_LOADMAP.
10683 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
10684 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
10685
55329a5c 106862011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
71487fd7
UW
10687
10688 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
10689 (arm_linux_hwbp_cap): New static variable.
10690 (arm_linux_get_hwbp_cap): Replace by ...
10691 (arm_linux_init_hwbp_cap): ... this new function.
10692 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
10693 (arm_linux_get_hw_watchpoint_count): Likewise.
10694 (arm_linux_get_hw_watchpoint_max_length): Likewise.
10695 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
10696 (arm_prepare_to_resume): Use perror_with_name instead of error.
10697
55329a5c 106982011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
09b4ad9f
UW
10699
10700 * linux-arm-low.c: Include <signal.h>.
10701 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
10702 (struct arm_linux_hwbp_cap): New data type.
10703 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
10704 (struct arm_linux_hw_breakpoint): New data type.
10705 (MAX_BPTS, MAX_WPTS): Define.
10706 (struct arch_process_info, struct arch_lwp_info): New data types.
10707 (arm_linux_get_hwbp_cap): New function.
10708 (arm_linux_get_hw_breakpoint_count): Likewise.
10709 (arm_linux_get_hw_watchpoint_count): Likewise.
10710 (arm_linux_get_hw_watchpoint_max_length): Likewise.
10711 (arm_hwbp_control_initialize): Likewise.
10712 (arm_hwbp_control_is_enabled): Likewise.
10713 (arm_hwbp_control_is_initialized): Likewise.
10714 (arm_hwbp_control_disable): Likewise.
10715 (arm_linux_hw_breakpoint_equal): Likewise.
10716 (arm_linux_hw_point_initialize): Likewise.
10717 (struct update_registers_data): New data structure.
10718 (update_registers_callback: New function.
10719 (arm_insert_point): Likewise.
10720 (arm_remove_point): Likewise.
10721 (arm_stopped_by_watchpoint): Likewise.
10722 (arm_stopped_data_address): Likewise.
10723 (arm_new_process): Likewise.
10724 (arm_new_thread): Likewise.
10725 (arm_prepare_to_resume): Likewise.
10726 (the_low_target): Register arm_insert_point, arm_remove_point,
10727 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
10728 arm_new_thread, and arm_prepare_to_resume.
10729
6b9801d4
SS
107302011-09-15 Stan Shebs <stan@codesourcery.com>
10731
10732 * server.h (struct emit_ops): Add compare-goto fields.
10733 * tracepoint.c (gdb_agent_op_sizes): New table.
10734 (emit_eq_goto): New function.
10735 (emit_ne_goto): New function.
10736 (emit_lt_goto): New function.
10737 (emit_le_goto): New function.
10738 (emit_gt_goto): New function.
10739 (emit_ge_goto): New function.
10740 (is_goto_target): New function.
10741 (compile_bytecodes): Recognize special cases of compare-goto
10742 combinations and call specialized emitters for them.
10743 * linux-x86-low.c (amd64_emit_eq_goto): New function.
10744 (amd64_emit_ne_goto): New function.
10745 (amd64_emit_lt_goto): New function.
10746 (amd64_emit_le_goto): New function.
10747 (amd64_emit_gt_goto): New function.
10748 (amd64_emit_ge_goto): New function.
10749 (amd64_emit_ops): Add the new functions.
10750 (i386_emit_eq_goto): New function.
10751 (i386_emit_ne_goto): New function.
10752 (i386_emit_lt_goto): New function.
10753 (i386_emit_le_goto): New function.
10754 (i386_emit_gt_goto): New function.
10755 (i386_emit_ge_goto): New function.
10756 (i386_emit_ops): Add the new functions.
10757
bf15cbda
SS
107582011-09-08 Stan Shebs <stan@codesourcery.com>
10759
10760 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
10761 (i386_emit_epilogue): Restore %ebx.
10762
943ca1dd
JZ
107632011-08-31 Jie Zhang <jzhang918@gmail.com>
10764
10765 * server.c (step_thread): Remove definition.
10766 (process_serial_event): Don't handle Hs.
10767 * server.h (step_thread): Remove declaration.
10768 * target.c (set_desired_inferior): Remove use of step_thread.
10769
e3deef73
LM
107702011-08-24 Luis Machado <lgustavo@codesourcery.com>
10771
10772 * linux-low.c: Include linux-procfs.h.
10773 (linux_attach_lwp_1): Update comments.
10774 (linux_attach): Scan for existing threads when attaching to a
10775 process that is the tgid.
10776 * Makefile.in: Update dependencies.
10777
13da1c97
LM
107782011-08-24 Luis Machado <lgustavo@codesourcery.com>
10779
10780 * configure.srv: Add linux-procfs.o dependencies.
10781
881127c9
YQ
107822011-08-14 Yao Qi <yao@codesourcery.com>
10783
10784 * target.h (struct target_ops): Fix indent.
10785 * win32-low.c (win32_target_ops): Fix comment.
10786
58dbd541
YQ
107872011-08-14 Andrew Jenner <andrew@codesourcery.com>
10788 Yao Qi <yao@codesourcery.com>
10789
10790 * Makefile.in (clean): Remove tic6x-*.c files.
10791 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
10792 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
10793 (tic6x-c64xp-linux.c): Likewise.
10794 * configure.srv: Add support for tic6x-*-uclinux.
10795 * linux-tic6x-low.c: New.
10796 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
10797
78d85199
YQ
107982011-08-14 Andrew Stubbs <ams@codesourcery.com>
10799 Yao Qi <yao@codesourcery.com>
10800
10801 * target.h (struct target_ops): Add read_loadmap.
10802 * linux-low.c (struct target_loadseg): New type.
10803 (struct target_loadmap): New type.
10804 (linux_read_loadmap): New function.
10805 (linux_target_ops): Add linux_read_loadmap.
10806 * server.c (handle_query): Support qXfer:fdpic:read packet.
43aaf8b6
PA
10807 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
10808 to NULL.
78d85199 10809
a959a88d
EZ
108102011-08-05 Eli Zaretskii <eliz@gnu.org>
10811
10812 * win32-low.c: Include <stdint.h>.
10813
1ced966e
PA
108142011-07-22 Pedro Alves <pedro@codesourcery.com>
10815
10816 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
10817 to the inferior here.
10818 (i386_remove_aligned_watchpoint): Ditto.
10819 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
10820 fit part of the watchpoint in the debug registers.
10821 (i386_update_inferior_debug_regs): New.
10822 (i386_low_insert_watchpoint): Work on a local mirror of the debug
10823 registers, and only update the inferior on success.
10824 (i386_low_remove_watchpoint): Ditto.
10825
d26e3629
KY
108262011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
10827
10828 * linux-low.c (compare_ints, unique, list_threads, show_process,
10829 linux_core_of_thread): Delete.
10830 (linux_target_ops): Change linux_core_of_thread to
10831 linux_common_core_of_thread.
10832 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
10833 * utils.c (malloc_failure): Change type of argument.
10834 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
10835 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
10836 common/linux-osdata.c, common/ptid.c and common/buffer.c.
10837 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
10838 (IPA_OBJS): Add common-utils-ipa.o.
10839 (ptid_h, linux_osdata_h): New macros.
10840 (server_h): Add common/common-utils.h, common/xml-utils.h,
10841 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
10842 common/ptid.h.
10843 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
10844 ptid.o, buffer.o): New rules.
10845 (linux-low.o): Add common/linux-osdata.h as a dependency.
10846 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
10847 * configure.ac: Add AC_HEADER_DIRENT check.
10848 * config.in: Regenerate.
10849 * configure: Regenerate.
10850 * remote-utils.c (xml_escape_text): Delete.
10851 (buffer_grow, buffer_free, buffer_init, buffer_finish,
10852 buffer_xml_printf): Move to common/buffer.c.
10853 * server.c (main): Remove call to initialize_inferiors.
10854 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
10855 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
10856 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
10857 internal_error, gdb_assert, gdb_assert_fail): Delete.
10858 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
10859 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
10860 common/buffer.h.
10861 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
10862 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
10863 initialize_inferiors): Delete.
10864
2275a1a7
PA
108652011-07-20 Pedro Alves <pedro@codesourcery.com>
10866
10867 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
10868 symbol error.
10869
0a5b1e09
PA
108702011-05-31 Pedro Alves <pedro@codesourcery.com>
10871
10872 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
10873 assertion.
10874 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
10875
6938fd34
YQ
108762011-05-26 Yao Qi <yao@codesourcery.com>
10877
10878 * Makefile.in (thread-db.o): Track dependence to
10879 common/gdb_thread_db.h.
10880 * thread-db.c: include gdb_thread_db.h from right place.
10881
b481f9e0
TT
108822011-05-16 Adrian Cornish <gnu@bluedreamer.com>
10883
10884 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
10885 __FILE__ and __LINE__ to internal_error.
10886
98a5dd13
DE
108872011-05-13 Doug Evans <dje@google.com>
10888
10889 * thread-db.c (try_thread_db_load_from_sdir): New function.
10890 (try_thread_db_load_from_dir): New function.
10891 (thread_db_load_search): Handle $sdir, ignore $pdir.
10892 Remove trying of system directories if search of
10893 libthread-db-search-path fails, that is now done via $sdir.
10894
d248b706
KY
108952011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
10896
10897 * server.c (handle_query): Add EnableDisableTracepoints to the list
10898 of supported features.
43aaf8b6 10899 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
d248b706 10900 tracepoints.
43aaf8b6
PA
10901 (cmd_qtenable_disable): New.
10902 (cmd_qtstart): Install tracepoints even if disabled.
10903 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
10904 receiving a QTEnable or QTDisable packet.
10905 (gdb_collect): Skip data collection if fast tracepoint is disabled.
10906 (ust_marker_to_static_tracepoint): Do not ignore disabled static
10907 tracepoints.
10908 (gdb_probe): Skip data collection if static tracepoint is disabled.
d248b706 10909
84e578fb
DE
109102011-05-10 Doug Evans <dje@google.com>
10911
10912 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
10913
71f55dd8
DE
109142011-05-04 Doug Evans <dje@google.com>
10915
10916 * linux-low.c (linux_join): Skip process lookup.
10917 * spu-low.c (spu_join): Ditto.
10918 * server.c (join_inferiors_callback): Delete.
10919 (process_serial_event): For 'D' packet (detach) call join_inferior
10920 directly.
10921
4d393d60
JM
109222011-05-04 Joseph Myers <joseph@codesourcery.com>
10923
10924 * README: Don't mention xscale*-*-linux*.
10925 * configure.srv (xscale*-*-linux*): Don't handle target.
10926
b00ad6ff
NF
109272011-04-27 Nathan Froyd <froydnj@codesourcery.com>
10928
10929 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
10930 casting pointers.
10931 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
10932 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
10933 (i386_emit_void_call_2): Likewise.
10934
af96c192
YQ
109352011-04-26 Yao Qi <yao@codesourcery.com>
10936
43aaf8b6
PA
10937 * linux-low.c: Move common macros to linux-ptrace.h.
10938 Include linux-ptrace.h.
af96c192
YQ
10939 * Makefile.in (linux_ptrace_h): New.
10940 (linux-low.o): Depends on linux-ptrace.h.
10941
03f2bd59
JK
109422011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
10943
10944 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
10945 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
10946 (remote_prepare): New function with most of the TCP code from ...
10947 (remote_open): ... here. Detect PORT here unconditionally. Move also
10948 setting transport_is_reliable.
10949 * server.c (run_once): New variable.
10950 (gdbserver_usage): Document it.
10951 (main): Set run_once for `--once'. Call remote_prepare. Exit after
10952 the first run if RUN_ONCE.
10953 * server.h (run_once, remote_prepare): New declarations.
10954
7a9dd1b2
TT
109552011-04-19 Tom Tromey <tromey@redhat.com>
10956
10957 * win32-low.c (handle_load_dll): Remove duplicate "the".
10958
81239425
PM
109592011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
10960
10961 Remove support for old Cygwin 1.5 versions.
10962 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
10963 function to avoid warning.
10964 (win32_add_one_solib): Use cygwin_conv_path function to avoid
10965 warning.
10966
9e0627f1
PM
109672011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
10968
10969 * gdbserver/server.h (Macro _): Define it if not available.
10970
588eebee
MS
109712011-03-14 Michael Snyder <msnyder@vmware.com>
10972
348af9f7 10973 * hostio.c (handle_close): Remove unnecessary null test.
588eebee 10974
43f70d4c
JB
109752011-03-10 Joel Brobecker <brobecker@adacore.com>
10976
10977 * Makefile.in (maintainer-clean realclean distclean): Remove
10978 "make ... subdir_do" command.
10979
348af9f7
MS
109802011-03-10 Michael Snyder <msnyder@vmware.com>
10981
10982 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
10983
10984 * server.c (handle_v_run): Free alloced buffer on early return.
10985
e637a4f5
YQ
109862011-03-09 Yao Qi <yao@codesourcery.com>
10987
10988 Revert:
10989 2011-03-04 Yao Qi <yao@codesourcery.com>
10990
10991 * Makefile.in: Remove GNU make feature --directory.
10992
10993 2011-03-05 Yao Qi <yao@codesourcery.com>
10994
10995 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
10996 (subdir_do): New make target. Copied from gdb/Makefile.
10997 (maintainer-clean, realclean, distclean, clean): Call corresponding
10998 make targets in common/Makefile.
10999
11000 2011-02-11 Yao Qi <yao@codesourcery.com>
11001
11002 * configure.ac: Call AC_PROG_RANLIB.
11003 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
11004 * configure: Regenerate.
11005
e6edda56
JK
110062011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
11007
11008 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
11009
e5141119
JB
110102011-03-06 Yao Qi <yao@codesourcery.com>
11011
11012 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
11013
64794aa4
JB
110142011-03-05 Yao Qi <yao@codesourcery.com>
11015
11016 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
11017 (subdir_do): New make target. Copied from gdb/Makefile.
11018 (maintainer-clean, realclean, distclean, clean): Call corresponding
11019 make targets in common/Makefile.
11020
7a762829
YQ
110212011-03-04 Yao Qi <yao@codesourcery.com>
11022
11023 * Makefile.in: Remove GNU make feature --directory.
11024
348af9f7
MS
110252011-03-04 Michael Snyder <msnyder@vmware.com>
11026
11027 * server.c (queue_stop_reply): Call xmalloc not malloc.
11028
110292011-03-02 Michael Snyder <msnyder@vmware.com>
11030
11031 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
11032
9f72fee2
MS
110332011-02-28 Michael Snyder <msnyder@vmware.com>
11034
588eebee
MS
11035 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
11036 (cmd_qtframe): Ditto.
11037 (cmd_qtbuffer): Ditto.
11038 (cmd_bigqtbuffer): Ditto.
11039
9f72fee2
MS
11040 * utils.c (decimal2str): Initialize 'width' to nine, then
11041 don't mess with it.
11042
8040bd49
UW
110432011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
11044
11045 * hostio.c (require_data): Free *data, not data.
11046
7e52cbd0
JK
110472011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
11048
11049 * hostio.c (require_data): Use free, not xfree.
11050
9130f83e
MS
110512011-02-27 Michael Snyder <msnyder@vmware.com>
11052
4b812f4e
MS
11053 * server.c (handle_query): Discard unused value.
11054
9130f83e
MS
11055 * hostio.c (require_data): Free malloc memory before returning
11056 error.
11057
69d37113
MS
110582011-02-26 Michael Snyder <msnyder@vmware.com>
11059
11060 * linux-low.c (list_threads): Call closedir for dirent.
11061
35f5825a
MS
110622011-02-27 Michael Snyder <msnyder@vmware.com>
11063
2a589cef
MS
11064 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
11065 a case statement falls through.
11066
0adea5f7
MS
11067 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
11068
35f5825a
MS
11069 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
11070 in comparison.
11071
238f1c74
MS
110722011-02-26 Michael Snyder <msnyder@vmware.com>
11073
11074 * utils.c (decimal2str): Eliminate dead code and dead param.
11075 (pulongest): Drop dead param from call to decimal2str.
11076 (plongest): Ditto.
11077
633ff500
JB
110782011-02-24 Joel Brobecker <brobecker@adacore.com>
11079
11080 Revert the following patch (not approved yet):
11081 2011-02-21 Hui Zhu <teawater@gmail.com>
11082 * tracepoint.c (tp_printf): New function.
11083 (eval_agent_expr): Handle gdb_agent_op_printf.
11084
f9c6ff72
HZ
110852011-02-21 Hui Zhu <teawater@gmail.com>
11086
11087 * tracepoint.c (tp_printf): New function.
11088 (eval_agent_expr): Handle gdb_agent_op_printf.
11089
94d5e490
TT
110902011-02-18 Tom Tromey <tromey@redhat.com>
11091
11092 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
11093 (tracepoint.o): Likewise.
11094 * tracepoint.c (enum gdb_agent_op): Use ax.def.
11095 (gdb_agent_op_names): Likewise.
11096
c7f96d2b
TT
110972011-02-18 Tom Tromey <tromey@redhat.com>
11098
11099 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
11100 gdb_agent_op_rot>: New constants.
11101 (gdb_agent_op_names): Add pick and roll.
11102 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
11103 cases.
11104
0feedb2c
JK
111052011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
11106
11107 * aclocal.m4: Regenerated with aclocal-1.11.1.
11108
b3b9301e
PA
111092011-02-14 Pedro Alves <pedro@codesourcery.com>
11110
11111 * server.c (handle_qxfer_traceframe_info): New.
11112 (qxfer_packets): Register "traceframe-info".
11113 (handle_query): Report support for qXfer:traceframe-info:read+.
11114 * tracepoint.c (match_blocktype): New.
11115 (traceframe_find_block_type): Rename to ...
11116 (traceframe_walk_blocks): ... this. Add callback filter argument,
11117 and use it.
11118 (traceframe_find_block_type): New, reimplemented on top of
11119 traceframe_walk_blocks.
11120 (build_traceframe_info_xml): New.
11121 (traceframe_read_info): New.
11122 * server.h (traceframe_read_info): Declare.
11123
4f3e6fb7
YQ
111242011-02-11 Yao Qi <yao@codesourcery.com>
11125
11126 * configure.ac: Call AC_PROG_RANLIB.
11127 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
11128 * configure: Regenerate.
11129
764880b7
PA
111302011-02-07 Pedro Alves <pedro@codesourcery.com>
11131
11132 * server.c (gdb_read_memory): Change return semantics to allow
11133 partial transfers.
11134 (handle_search_memory_1): Adjust.
11135 (process_serial_event) <'m' packet>: Handle partial transfers.
11136 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
11137
1c79eb8a
PA
111382011-01-28 Pedro Alves <pedro@codesourcery.com>
11139
11140 * regcache.c (init_register_cache): Initialize
11141 regcache->register_status.
11142 (free_register_cache): Release regcache->register_status.
11143 (regcache_cpy): Copy register_status.
11144 (registers_to_string): Print 'x's for unavailable registers.
11145 (supply_register): Mark the register's status valid or
11146 unavailable, depending on whether a buffer was passed in or not.
11147 (supply_register_zeroed): New.
11148 (supply_regblock): Mark the registers' status valid or
11149 unavailable, depending on whether a buffer was passed in or not.
11150 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
11151 (struct regcache): New `register_status' field.
11152 (supply_register_zeroed): Declare.
11153 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
11154 supply_register_zeroed, rather than passing a NULL buffer to
11155 supply_register.
11156 * tracepoint.c (fetch_traceframe_registers): Update comment.
11157
85724a0e
PA
111582011-01-28 Pedro Alves <pedro@codesourcery.com>
11159
11160 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
11161 buffer explicit.
11162
d08aafef
PA
111632011-01-25 Pedro Alves <pedro@codesourcery.com>
11164
11165 * server.h (decode_xfer_write): Change prototype.
11166 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
11167 and don't extract the annex here.
11168 * server.c (decode_xfer_read): Remove `annex' parameter,
11169 and don't extract the annex here.
11170 (decode_xfer): New.
11171 (struct qxfer): New.
11172 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
11173 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
11174 (handle_qxfer_statictrace): New functions, abstracted out from
11175 handle_query, and made to use the struct qxfer interface.
11176 (handle_threads_qxfer_proper): Rename to ...
11177 (handle_qxfer_threads_proper): ... this.
11178 (handle_threads_qxfer): Rename to ...
11179 (handle_qxfer_threads): ... this. Adjust.
11180 (qxfer_packets): New array.
11181 (handle_qxfer): New function.
11182 (handle_query): Use handle_qxfer.
11183
493e2a69
MS
111842011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
11185
11186 * gdbreplay.c: Shorten lines of >= 80 columns.
11187 * linux-low.c: Ditto.
11188 * linux-ppc-low.c: Ditto.
11189 * linux-s390-low.c: Ditto.
11190 * linux-sparc-low.c: Ditto.
11191 * linux-x86-low.c: Ditto.
11192 * linux-xtensa-low.c: Ditto.
11193 * mem-break.c: Ditto.
11194 * nto-low.c: Ditto.
11195 * regcache.h: Ditto.
11196 * remote-utils.c: Ditto.
11197 * server.c: Ditto.
11198 * server.h: Ditto.
11199 * thread-db.c: Ditto.
11200 * tracepoint.c: Ditto.
11201 * utils.c: Ditto.
11202 * win32-low.h: Ditto.
11203
44944448
JB
112042011-01-05 Joel Brobecker <brobecker@adacore.com>
11205
11206 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
11207 update.
11208
71ce852c
JB
112092011-01-01 Joel Brobecker <brobecker@adacore.com>
11210
11211 * server.c (gdbserver_version): Update copyright year in version
11212 output.
11213 * gdbreplay.c (gdbreplay_version): Ditto.
11214
eb826dc6
MF
112152010-12-29 Jie Zhang <jie.zhang@analog.com>
11216
11217 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
11218 * linux-bfin-low.c: New file.
11219 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
11220 PT_DATA_ADDR for BFIN targets.
11221 * Makefile.in (SFILES): Add linux-bfin-low.c.
11222 (clean): Remove reg-bfin.c.
11223 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
11224 * README: Mention supported Blackfin targets.
11225
39ab222a
MF
112262010-12-23 Mike Frysinger <vapier@gentoo.org>
11227
11228 * .gitignore: New file.
11229
a1f2ce7d
MF
112302010-11-16 Mike Frysinger <vapier@gentoo.org>
11231
11232 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
11233
f474844c
JZ
112342010-10-22 Jie Zhang <jie@codesourcery.com>
11235
11236 * Makefile.in: Add FLAGS_TO_PASS variable.
11237 (install): Remove dependency of install-only and recursively
11238 invoke make for install-only.
11239
f1048712
DE
112402010-10-04 Doug Evans <dje@google.com>
11241
11242 * Makefile.in (uninstall): Use $(DESTDIR).
11243
b53a1623
PA
112442010-09-24 Pedro Alves <pedro@codesourcery.com>
11245
e6ee044d
PA
11246 PR gdb/11842
11247
b53a1623
PA
11248 * linux-x86-low.c (compat_siginfo_from_siginfo)
11249 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
11250 si_code is < 0. Check for si_code == SI_TIMER before checking for
11251 si_code < 0.
11252
fa1bd1e4
JB
112532010-09-13 Joel Brobecker <brobecker@adacore.com>
11254
11255 * lynx-i386-low.c: New file.
11256 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
11257
47fac8f8
JB
112582010-09-13 Joel Brobecker <brobecker@adacore.com>
11259
11260 * lynx-low.c (ptrace_request_to_str): Remove handling for
11261 request values that have been removed in LynxOS 5.x.
11262
1adfc54d
JB
112632010-09-13 Joel Brobecker <brobecker@adacore.com>
11264
11265 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
11266 <ptrace.h>
11267
c2a66c29
NS
112682010-09-09 Nathan Sidwell <nathan@codesourcery.com>
11269
11270 * configure.ac: Add --enable-inprocess-agent option.
11271 * configure: Rebuilt.
11272
32fcada3
YQ
112732010-09-06 Yao Qi <yao@codesourcery.com>
11274
11275 * linux-low.c (linux_kill): Remove unused variable.
11276 (linux_stabilize_threads): Likewise.
11277 * server.c (start_inferior): Likewise.
11278 (queue_stop_reply_callback): Likewise.
11279 * tracepoint.c (do_action_at_tracepoint): Likewise.
11280
0cccb683
YQ
112812010-09-06 Yao Qi <yao@codesourcery.com>
11282
11283 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
11284 on return.
11285
423ec54c
JK
112862010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
11287
11288 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
11289
12ac6819
PA
112902010-09-06 Pedro Alves <pedro@codesourcery.com>
11291
11292 * Makefile.in (install-only): Replace $IPA_DEPFILES with
11293 "$(IPA_DEPFILES)".
11294
8ed54b31
JB
112952010-09-01 Joel Brobecker <brobecker@adacore.com>
11296
11297 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
11298 gdbserver/lynx-ppc-low.c: New files.
11299 * Makefile.in (lynx_low_h): New variable.
11300 (lynx-low.o, lynx-ppc-low.o): New rules.
11301 * configure.ac: On LynxOS, link with -lnetinet.
11302 * configure.srv: Add handling of powerpc-*-lynxos* targets.
11303 * configure: regenerate.
11304
bb0116a4
JB
113052010-09-01 Joel Brobecker <brobecker@adacore.com>
11306
11307 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
11308 * configure.ac: Add check for vasprintf and vsnprintf.
11309 * configure, config.in: Regenerate.
11310 * server.h (vasprintf, vsnprintf): Add conditional declarations.
11311
a778ab81 113122010-09-01 Joel Brobecker <brobecker@adacore.com>
11313
11314 * gdbreplay.c: Move include of alloca.h up, next to include of
11315 malloc.h.
11316 * server.h: Add include of malloc.h.
11317 * mem-break.c: Remove include of malloc.h.
11318 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
11319
8b034a19 113202010-09-01 Joel Brobecker <brobecker@adacore.com>
11321
11322 * Makefile.in (memmem.o): Build with -Wno-error.
11323
113242010-09-01 Joel Brobecker <brobecker@adacore.com>
11325
11326 * utils.c (xsnprintf): Make non-static.
11327 * server.h: Add xsnprintf declaration.
11328 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
11329 replace calls to snprintf by calls to xsnprintf throughout.
11330
113312010-09-01 Joel Brobecker <brobecker@adacore.com>
11332
11333 * configure.ac: Add configure check for alloca.
11334 * configure, config.in: Regenerate.
11335 * server.h: Include alloca.h if it exists.
11336 * gdbreplay.c: Include alloca.h if it exists.
11337
1a981360
PA
113382010-08-28 Pedro Alves <pedro@codesourcery.com>
11339
11340 * linux-low.c (__SIGRTMIN): Define if not already defined.
11341 (linux_create_inferior): Check for __ANDROID__ rather than
11342 __SIGRTMIN.
11343 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
11344 are already deferred.
11345 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
11346 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
11347 stopped and already has a pending signal to report.
11348 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
11349 a pending signal to report or is moving out of a jump pad.
11350 (linux_init_signals): Check for __ANDROID__ rather than
11351 __SIGRTMIN.
11352
b4d51a55
PA
113532010-08-28 Pedro Alves <pedro@codesourcery.com>
11354
11355 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
11356 debug_threads check. Avoid a linear search when not doing debug
11357 output.
11358
ec48365d
PA
113592010-08-27 Pedro Alves <pedro@codesourcery.com>
11360
11361 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
11362 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
11363 (struct file_handler) <fd>: Change type to gdb_fildes_t.
11364 (process_event): Change local fd's type to gdb_fildes_t.
11365 (create_file_handler): Adjust prototype.
11366 (delete_file_handler): Adjust prototype.
11367 (handle_file_event): Adjust prototype. Use pfildes.
11368 (create_file_event): Adjsut prototype.
11369 * remote-utils.c (remote_desc, listen_desc): Change type to
11370 gdb_fildes_t.
11371 * server.h: New gdb_fildes_t typedef.
11372 [USE_WIN32API]: Include winsock2.h.
11373 (delete_file_handler, add_file_handler): Adjust prototypes.
11374 (pfildes): Declare.
11375 * utils.c (pfildes): New.
11376
854d88f0
PA
113772010-08-27 Pedro Alves <pedro@codesourcery.com>
11378
11379 * configure.ac (build_warnings): Add -Wno-char-subscripts.
11380 * configure: Regenerate.
11381
0146f85b
PA
113822010-08-27 Pedro Alves <pedro@codesourcery.com>
11383
11384 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
11385 (linux_done_accessing_memory): ... this.
11386 (linux_target_ops): Adjust.
11387 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
11388 * nto-low.c (nto_target_ops): Adjust comment.
11389 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
11390 * spu-low.c (spu_target_ops): Adjust comment.
11391 * target.h (target_ops): Rename unprepare_to_access_memory field
11392 to done_accessing_memory.
11393 (unprepare_to_access_memory): Rename to ...
11394 (done_accessing_memory): ... this.
11395
90d74c30
PA
113962010-08-26 Pedro Alves <pedro@codesourcery.com>
11397
11398 * linux-low.c (linux_prepare_to_access_memory): New.
11399 (linux_unprepare_to_access_memory): New.
11400 (linux_target_ops): Install them.
11401 * server.c (read_memory): Rename to ...
11402 (gdb_read_memory): ... this. Use
11403 prepare_to_access_memory/prepare_to_access_memory.
11404 (write_memory): Rename to ...
11405 (gdb_write_memory): ... this. Use
11406 prepare_to_access_memory/prepare_to_access_memory.
11407 (handle_search_memory_1): Adjust.
11408 (process_serial_event): Adjust.
11409 * target.h (struct target_ops): New fields
11410 prepare_to_access_memory and unprepare_to_access_memory.
11411 (prepare_to_access_memory, unprepare_to_access_memory): New.
11412 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
11413 prepare_to_access_memory/prepare_to_access_memory.
11414 * nto-low.c (nto_target_ops): Adjust.
11415 * spu-low.c (spu_target_ops): Adjust.
11416 * win32-low.c (win32_target_ops): Adjust.
11417
fd467969
PA
114182010-08-26 Pedro Alves <pedro@codesourcery.com>
11419
11420 * Makefile.in (WARN_CFLAGS): Get it from configure.
11421 (WERROR_CFLAGS): New.
11422 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
11423 * configure.ac: Introduce --enable-werror, which adds -Werror to
11424 the compiler command line. Enabled by default. Disable with
11425 --disable-werror. Add -Wdeclaration-after-statement
11426 Wpointer-arith and -Wformat-nonliteral to warning flags.
11427 * configure: Regenerate.
11428
331e2f5f
PA
114292010-08-26 Pedro Alves <pedro@codesourcery.com>
11430
11431 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
11432
e581f2b4
PA
114332010-08-26 Pedro Alves <pedro@codesourcery.com>
11434
11435 * gdbreplay.c (remote_error): New.
11436 (gdbchar): New.
11437 (expect): Use gdbchar. Check for error reading from GDB.
11438 Clarify sync error output.
11439 (play): Check for errors writing to GDB.
11440 * linux-low.c (sigchld_handler): Really ignore `write' errors.
11441 * remote-utils.c (getpkt): Check for errors writing to the remote
11442 descriptor.
11443
3c11dd79
PA
114442010-08-25 Pedro Alves <pedro@codesourcery.com>
11445
11446 * linux-low.c (linux_wait_1): Move non-debugging code out of
11447 `debug_threads' control.
11448
d20a8ad9
PA
114492010-08-25 Pedro Alves <pedro@codesourcery.com>
11450
11451 * linux-low.c (linux_wait_1): Don't set last_status here.
11452 * server.c (push_event, queue_stop_reply_callback): Assert we're
11453 not pushing a TARGET_WAITKIND_IGNORE event.
11454 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
11455 (myresume, handle_target_event): Set the thread's last_resume_kind
11456 and last_status from the target returned status.
11457
964e4306
PA
114582010-08-25 Pedro Alves <pedro@codesourcery.com>
11459
11460 PR threads/10729
11461
11462 * linux-x86-low.c (update_debug_registers_callback): New.
11463 (i386_dr_low_set_addr): Use it.
11464 (i386_dr_low_get_addr): New.
11465 (i386_dr_low_set_control): Use update_debug_registers_callback.
11466 (i386_dr_low_get_control): New.
11467 (i386_dr_low_get_status): Adjust.
11468 * linux-low.c (linux_stop_lwp): New.
11469 * linux-low.h (linux_stop_lwp): Declare.
11470
11471 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
11472 argument instead of a i386_debug_reg_state.
11473 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
11474 a i386_debug_reg_state.
11475 (i386_insert_aligned_watchpoint): Adjust.
11476 (i386_remove_aligned_watchpoint): Adjust.
11477 (i386_low_stopped_data_address): Read the debug registers from the
11478 inferior instead of from the mirrors.
11479 * i386-low.h (struct i386_debug_reg_state): Extend comment.
11480 (i386_dr_low_get_addr): Declare.
11481 (i386_dr_low_get_control): Declare.
11482 (i386_dr_low_get_status): Change prototype.
11483
11484 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
11485 (i386_dr_low_get_addr): New.
11486 (i386_dr_low_get_control): New.
11487 (i386_dr_low_get_status): Adjust prototype. Return
11488 dr_status_mirror.
11489 (i386_initial_stuff): Clear dr_status_mirror and
11490 dr_control_mirror.
11491 (i386_get_thread_context): Adjust.
11492 (i386_set_thread_context): Adjust.
11493 (i386_thread_added): Adjust.
11494
5f21a75b
PA
114952010-08-24 Pedro Alves <pedro@codesourcery.com>
11496
11497 * linux-low.h (linux_thread_area): Delete declaration.
11498
3e4c1235
TS
114992010-08-11 Thomas Schwinge <thomas@codesourcery.com>
11500
11501 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
11502 after its termination.
11503
1971b033
PA
115042010-08-09 Pedro Alves <pedro@codesourcery.com>
11505
11506 * linux-low.c (gdb_wants_lwp_stopped): Delete.
11507 (gdb_wants_all_stopped): Delete.
11508 (linux_wait_1): Don't call them.
11509 * server.c (handle_v_cont): Tag all threads as want-stopped.
11510 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
11511 stopped as "client-wants-stopped".
11512
310444ac
PA
115132010-07-31 Pedro Alves <pedro@codesourcery.com>
11514
11515 * Makefile.in (signals_h): New.
11516 (server_h): Depend on it.
11517 (server.o): Don't depend on $(signals_def).
11518 (signals.o): Depend on $(signals_def).
11519
a19cae16
JK
115202010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
11521
11522 * Makefile.in (signals_def): New.
11523 (server_h): Append include/gdb/signals.h and signals_def.
11524 (server.o): Append signals_def.
11525
30d50328
JK
115262010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
11527
11528 * server.c (handle_target_event): Use target_signal_to_host for
11529 resume_info.sig initialization.
11530 * target.h (struct thread_resume) <sig>: New comment.
11531
5c3216e2
OS
115322010-07-20 Ozkan Sezer <sezeroz@gmail.com>
11533
c6f46ca0
OS
11534 * server.c (handle_query): strcpy() the returned string from paddress()
11535 instead of sprintf().
5c3216e2
OS
11536 * utils.c (paddress): Return phex_nz().
11537
6bd31874
JB
115382010-07-07 Joel Brobecker <brobecker@adacore.com>
11539
11540 * server.c (handle_v_cont): Call mourn_inferior if process
11541 just exited.
11542 (myresume): Likewise.
11543
0fb4aa4b
PA
115442010-07-01 Pedro Alves <pedro@codesourcery.com>
11545
11546 Static tracepoints, and integration with UST.
11547
11548 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
11549 * mem-break.c (uninsert_all_breakpoints)
11550 (reinsert_all_breakpoints): New.
11551 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
11552 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
11553 (gdb_agent_ust_loaded, helper_thread_id)
11554 (gdb_agent_helper_thread_id): New macros.
11555 (struct ipa_sym_addresses): Add addr_ust_loaded,
11556 addr_helper_thread_id, addr_cmd_buf.
11557 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
11558 (in_process_agent_loaded_ust): New.
11559 (write_e_ust_not_loaded): New.
11560 (maybe_write_ipa_ust_not_loaded): New.
11561 (struct collect_static_trace_data_action): New.
11562 (enum tracepoint_type) <static_tracepoint>: New.
11563 (struct tracepoint) <handle>: Mention static tracepoints.
11564 (struct static_tracepoint_ctx): New.
11565 (CMD_BUF_SIZE): New.
11566 (add_tracepoint_action): Handle static tracepoint actions.
11567 (unprobe_marker_at): New.
11568 (clear_installed_tracepoints): Handle static tracepoints.
11569 (cmd_qtdp): Handle static tracepoints.
11570 (probe_marker_at): New.
11571 (cmd_qtstart): Handle static tracepoints.
11572 (response_tracepoint): Handle static tracepoints.
11573 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
11574 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
11575 (get_context_regcache): Handle static tracepoints.
11576 (do_action_at_tracepoint): Handle static tracepoint actions.
11577 (traceframe_find_block_type): Handle static trace data blocks.
11578 (traceframe_read_sdata): New.
11579 (download_tracepoints): Download static tracepoint actions.
11580 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
11581 (GDB_PROBE_NAME): New.
11582 (ust_ops): New.
11583 (GET_UST_SYM): New.
11584 (USTF): New.
11585 (dlsym_ust): New.
11586 (ust_marker_to_static_tracepoint): New.
11587 (gdb_probe): New.
11588 (collect_ust_data_at_tracepoint): New.
11589 (gdb_ust_probe): New.
11590 (UNIX_PATH_MAX, SOCK_DIR): New.
11591 (gdb_ust_connect_sync_socket): New.
11592 (resume_thread, stop_thread): New.
11593 (run_inferior_command): New.
11594 (init_named_socket): New.
11595 (gdb_ust_socket_init): New.
11596 (cstr_to_hexstr): New.
11597 (next_st): New.
11598 (first_marker, next_marker): New.
11599 (response_ust_marker): New.
11600 (cmd_qtfstm, cmd_qtsstm): New.
11601 (unprobe_marker_at, probe_marker_at): New.
11602 (cmd_qtstmat, gdb_ust_thread): New.
11603 (gdb_ust_init): New.
11604 (initialize_tracepoint_ftlib): Call gdb_ust_init.
11605 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
11606 (ST_REGENTRY): New.
11607 (x86_64_st_collect_regmap): New.
11608 (X86_64_NUM_ST_COLLECT_GREGS): New.
11609 (AMD64_RIP_REGNUM): New.
11610 (supply_static_tracepoint_registers): New.
11611 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
11612 (ST_REGENTRY): New.
11613 (i386_st_collect_regmap): New.
11614 (i386_NUM_ST_COLLECT_GREGS): New.
11615 (supply_static_tracepoint_registers): New.
11616 * server.c (handle_query): Handle qXfer:statictrace:read.
11617 <qSupported>: Report support for StaticTracepoints, and
11618 qXfer:statictrace:read features.
11619 * server.h (traceframe_read_sdata)
11620 (supply_static_tracepoint_registers): Declare.
11621 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
11622 (unpack_varlen_hex): Include in IPA build.
11623 * Makefile.in (ustlibs, ustinc): New.
11624 (IPA_OBJS): Add remote-utils-ipa.o.
11625 ($(IPA_LIB)): Link -ldl and -lpthread.
11626 (UST_CFLAGS): New.
11627 (IPAGENT_CFLAGS): Add UST_CFLAGS.
11628 * config.in, configure: Regenerate.
11629
9e4344e5
PA
116302010-06-20 Ian Lance Taylor <iant@google.com>
11631 Pedro Alves <pedro@codesourcery.com>
11632
11633 * linux-x86-low.c (always_true): Delete.
11634 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
11635 trying to fool the compiler with always_true.
11636
c6beb2cb
PA
116372010-06-20 Pedro Alves <pedro@codesourcery.com>
11638
11639 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
11640 conditions in gdbserver.
11641
d2ed6730
UW
116422010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
11643
11644 * spu-low.c (spu_read_memory): Wrap around local store limit.
11645 (spu_write_memory): Likewise.
11646
4e29fb54
PA
116472010-06-15 Pedro Alves <pedro@codesourcery.com>
11648
11649 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
11650 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
11651 LONGEST uses.
11652 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
11653 uses.
11654 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
11655 uses with LONGEST uses.
11656
6a271cae
PA
116572010-06-14 Stan Shebs <stan@codesourcery.com>
11658 Pedro Alves <pedro@codesourcery.com>
11659
11660 Bytecode compiler.
11661
11662 * linux-x86-low.c: Include limits.h.
11663 (add_insns): New.
11664 (always_true): New.
11665 (EMIT_ASM): New.
11666 (EMIT_ASM32): New.
11667 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
11668 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
11669 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
11670 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
11671 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
11672 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
11673 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
11674 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
11675 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
11676 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
11677 (amd64_emit_void_call_2): New.
11678 (amd64_emit_ops): New.
11679 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
11680 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
11681 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
11682 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
11683 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
11684 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
11685 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
11686 (i386_emit_call, i386_emit_reg, i386_emit_pop)
11687 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
11688 (i386_emit_stack_adjust, i386_emit_int_call_1)
11689 (i386_emit_void_call_2): New.
11690 (i386_emit_ops): New.
11691 (x86_emit_ops): New.
11692 (the_low_target): Install x86_emit_ops.
11693 * server.h (struct emit_ops): New.
11694 (get_raw_reg_func_addr): Declare.
11695 (current_insn_ptr, emit_error): Declare.
11696 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
11697 (set_trace_state_variable_value): New defines.
11698 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
11699 addr_get_trace_state_variable_value and
11700 addr_set_trace_state_variable_value.
11701 (symbol_list): New fields for get_raw_reg,
11702 get_trace_state_variable_value and set_trace_state_variable_value.
11703 (condfn): New typedef.
11704 (struct tracepoint): New field `compiled_cond'.
11705 (do_action_at_tracepoint): Clear compiled_cond.
11706 (get_trace_state_variable_value, set_trace_state_variable_value):
11707 Export in the IPA.
11708 (condition_true_at_tracepoint): If there's a compiled condition,
11709 run that.
11710 (current_insn_ptr, emit_error): New globals.
11711 (struct bytecode_address): New.
11712 (get_raw_reg_func_addr): New.
11713 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
11714 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
11715 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
11716 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
11717 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
11718 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
11719 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
11720 (compile_tracepoint_condition, compile_bytecodes): New.
11721 * target.h (emit_ops): Forward declare.
11722 (struct target_ops): New field emit_ops.
11723 (target_emit_ops): New.
11724 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
11725 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
11726 * linux-low.c (linux_emit_ops): New.
11727 (linux_target_ops): Install it.
11728 * linux-low.h (struct linux_target_ops): New field emit_ops.
11729
92b72907
UW
117302010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
11731
11732 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
11733 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
11734
fa593d66
PA
117352010-06-01 Pedro Alves <pedro@codesourcery.com>
11736 Stan Shebs <stan@codesourcery.com>
11737
11738 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
11739 (all): Depend on $(extra_libraries).
11740 (install-only): Install the IPA.
11741 (IPA_OBJS, IPA_LIB): New.
11742 (clean): Remove the IPA lib.
11743 (IPAGENT_CFLAGS): New.
11744 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
11745 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
11746 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
11747 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
11748 * configure.ac: Check for atomic builtins support in the compiler.
11749 (IPA_DEPFILES, extra_libraries): Define.
11750 * configure.srv (ipa_obj): Add description.
11751 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
11752 (i[34567]86-*-linux*): Set ipa_obj.
11753 (x86_64-*-linux*): Set ipa_obj.
11754 * linux-low.c (stabilizing_threads): New.
11755 (supports_fast_tracepoints): New.
11756 (linux_detach): Stabilize threads before detaching.
11757 (handle_tracepoints): Handle internal tracing breakpoints. Assert
11758 the lwp is either not stabilizing, or is moving out of a jump pad.
11759 (linux_fast_tracepoint_collecting): New.
11760 (maybe_move_out_of_jump_pad): New.
11761 (enqueue_one_deferred_signal): New.
11762 (dequeue_one_deferred_signal): New.
11763 (linux_wait_for_event_1): If moving out of a jump pad, defer
11764 pending signals to later.
11765 (linux_stabilize_threads): New.
11766 (linux_wait_1): Check if threads need moving out of jump pads, and
11767 do it if so.
11768 (stuck_in_jump_pad_callback): New.
11769 (move_out_of_jump_pad_callback): New.
11770 (lwp_running): New.
11771 (linux_resume_one_lwp): Handle moving out of jump pads.
11772 (linux_set_resume_request): Dequeue deferred signals.
11773 (need_step_over_p): Also step over fast tracepoint jumps.
11774 (start_step_over): Also uninsert fast tracepoint jumps.
11775 (finish_step_over): Also reinsert fast tracepoint jumps.
11776 (linux_install_fast_tracepoint_jump): New.
11777 (linux_target_ops): Install linux_stabilize_threads and
11778 linux_install_fast_tracepoint_jump_pad.
11779 * linux-low.h (linux_target_ops) <get_thread_area,
11780 install_fast_tracepoint_jump_pad>: New fields.
11781 (struct lwp_info) <collecting_fast_tracepoint,
11782 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
11783 (linux_get_thread_area): Declare.
11784 * linux-x86-low.c (jump_insn): New.
11785 (x86_get_thread_area): New.
11786 (append_insns): New.
11787 (push_opcode): New.
11788 (amd64_install_fast_tracepoint_jump_pad): New.
11789 (i386_install_fast_tracepoint_jump_pad): New.
11790 (x86_install_fast_tracepoint_jump_pad): New.
11791 (the_low_target): Install x86_get_thread_area and
11792 x86_install_fast_tracepoint_jump_pad.
11793 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
11794 (struct fast_tracepoint_jump): New.
11795 (fast_tracepoint_jump_insn): New.
11796 (fast_tracepoint_jump_shadow): New.
11797 (find_fast_tracepoint_jump_at): New.
11798 (fast_tracepoint_jump_here): New.
11799 (delete_fast_tracepoint_jump): New.
11800 (set_fast_tracepoint_jump): New.
11801 (uninsert_fast_tracepoint_jumps_at): New.
11802 (reinsert_fast_tracepoint_jumps_at): New.
11803 (set_breakpoint_at): Use write_inferior_memory.
11804 (uninsert_raw_breakpoint): Use write_inferior_memory.
11805 (check_mem_read): Mask out fast tracepoint jumps.
11806 (check_mem_write): Mask out fast tracepoint jumps.
11807 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
11808 (set_fast_tracepoint_jump): Declare.
11809 (delete_fast_tracepoint_jump)
11810 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
11811 (reinsert_fast_tracepoint_jumps_at): Declare.
11812 * regcache.c: Don't compile many functions when building the
11813 in-process agent library.
11814 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
11815 the register buffer in the heap.
11816 (free_register_cache): If the register buffer isn't owned by the
11817 regcache, don't free it.
11818 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
11819 pre-existing register caches.
11820 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
11821 type.
11822 (convert_ascii_to_int): : Constify `from' parameter type.
11823 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
11824 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
11825 the needed buffer in-place.
11826 (relocate_instruction): New.
11827 * server.c (handle_query) <qSymbols>: If the target supports
11828 tracepoints, give it a chance of looking up symbols. Report
11829 support for fast tracepoints.
11830 (handle_status): Stabilize threads.
11831 (process_serial_event): Adjust.
11832 * server.h (struct fast_tracepoint_jump): Forward declare.
11833 (struct process_info) <fast_tracepoint_jumps>: New field.
11834 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
11835 (decode_X_packet, decode_M_packet): Adjust.
11836 (relocate_instruction): Declare.
11837 (in_process_agent_loaded): Declare.
11838 (tracepoint_look_up_symbols): Declare.
11839 (struct fast_tpoint_collect_status): Declare.
11840 (fast_tracepoint_collecting): Declare.
11841 (force_unlock_trace_buffer): Declare.
11842 (handle_tracepoint_bkpts): Declare.
11843 (initialize_low_tracepoint)
11844 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
11845 * target.h (struct target_ops) <stabilize_threads,
11846 install_fast_tracepoint_jump_pad>: New fields.
11847 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
11848 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
11849 [HAVE_STDINT_H]: Include stdint.h.
11850 (trace_debug_1): Rename to ...
11851 (trace_vdebug): ... this.
11852 (trace_debug): Rename to ...
11853 (trace_debug_1): ... this. Add `level' parameter.
11854 (trace_debug): New.
11855 (ATTR_USED, ATTR_NOINLINE): New.
11856 (IP_AGENT_EXPORT): New.
11857 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
11858 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
11859 (about_to_request_buffer_space, trace_buffer_is_full)
11860 (stopping_tracepoint, expr_eval_result, error_tracepoint)
11861 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
11862 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
11863 (traceframe_write_count, traceframes_created)
11864 (trace_state_variables)
11865 New renaming defines.
11866 (struct ipa_sym_addresses): New.
11867 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
11868 (symbol_list): New.
11869 (ipa_sym_addrs): New.
11870 (all_tracepoint_symbols_looked_up): New.
11871 (in_process_agent_loaded): New.
11872 (write_e_ipa_not_loaded): New.
11873 (maybe_write_ipa_not_loaded): New.
11874 (tracepoint_look_up_symbols): New.
11875 (debug_threads) [IN_PROCESS_AGENT]: New.
11876 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
11877 (UNKNOWN_SIDE_EFFECTS): New.
11878 (stop_tracing): New.
11879 (flush_trace_buffer): New.
11880 (stop_tracing_bkpt): New.
11881 (flush_trace_buffer_bkpt): New.
11882 (read_inferior_integer): New.
11883 (read_inferior_uinteger): New.
11884 (read_inferior_data_pointer): New.
11885 (write_inferior_data_pointer): New.
11886 (write_inferior_integer): New.
11887 (write_inferior_uinteger): New.
11888 (struct collect_static_trace_data_action): Delete.
11889 (enum tracepoint_type): New.
11890 (struct tracepoint) <type>: New field `type'.
43aaf8b6
PA
11891 <actions_str, step_actions, step_actions_str>: Only include in
11892 GDBserver.
fa593d66
PA
11893 <orig_size, obj_addr_on_target, adjusted_insn_addr>
11894 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
11895 (tracepoints): Use IP_AGENT_EXPORT.
11896 (last_tracepoint): Don't include in the IPA.
11897 (stopping_tracepoint): Use IP_AGENT_EXPORT.
11898 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
11899 (alloced_trace_state_variables): New.
11900 (trace_state_variables): Use IP_AGENT_EXPORT.
11901 (traceframe_t): Delete unused variable.
11902 (circular_trace_buffer): Don't include in the IPA.
11903 (trace_buffer_start): Delete.
11904 (struct trace_buffer_control): New.
11905 (trace_buffer_free): Delete.
11906 (struct ipa_trace_buffer_control): New.
11907 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
11908 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
11909 New.
11910 (trace_buffer_ctrl): New.
11911 (TRACE_BUFFER_CTRL_CURR): New.
11912 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
11913 Reimplement as macros.
11914 (trace_buffer_wrap): Delete.
11915 (traceframe_write_count, traceframe_read_count)
11916 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
11917 (struct tracepoint_hit_ctx) <type>: New field.
11918 (struct fast_tracepoint_ctx): New.
11919 (memory_barrier): New.
11920 (cmpxchg): New.
11921 (record_tracepoint_error): Update atomically in the IPA.
11922 (clear_inferior_trace_buffer): New.
11923 (about_to_request_buffer_space): New.
11924 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
11925 updating the same buffer.
11926 (add_tracepoint): Default the tracepoint's type to trap
11927 tracepoint, and orig_size to -1.
11928 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
11929 internal variables.
11930 (create_trace_state_variable): New parameter `gdb'. Handle it.
11931 (clear_installed_tracepoints): Clear fast tracepoint jumps.
11932 (cmd_qtdp): Handle fast tracepoints.
11933 (cmd_qtdv): Adjust.
11934 (max_jump_pad_size): New.
11935 (gdb_jump_pad_head): New.
11936 (get_jump_space_head): New.
11937 (claim_jump_space): New.
11938 (sort_tracepoints): New.
11939 (MAX_JUMP_SIZE): New.
11940 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
11941 IPA.
11942 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
11943 support. Upload fast traceframes, and delete internal IPA
11944 breakpoints.
11945 (stop_tracing_handler): New.
11946 (flush_trace_buffer_handler): New.
11947 (cmd_qtstop): Upload fast tracepoints.
11948 (response_tracepoint): Handle fast tracepoints.
11949 (tracepoint_finished_step): Upload fast traceframes. Set the
11950 tracepoint hit context's tracepoint type.
11951 (handle_tracepoint_bkpts): New.
11952 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
11953 type. Add comment about fast tracepoints.
11954 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
11955 non-existing action_str field.
11956 (get_context_regcache): Handle fast tracepoints.
11957 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
11958 to the regcache.
11959 (fast_tracepoint_from_jump_pad_address): New.
11960 (fast_tracepoint_from_ipa_tpoint_address): New.
11961 (collecting_t): New.
11962 (force_unlock_trace_buffer): New.
11963 (fast_tracepoint_collecting): New.
11964 (collecting): New.
11965 (gdb_collect): New.
11966 (write_inferior_data_ptr): New.
11967 (target_tp_heap): New.
11968 (target_malloc): New.
11969 (download_agent_expr): New.
11970 (UALIGN): New.
11971 (download_tracepoints): New.
11972 (download_trace_state_variables): New.
11973 (upload_fast_traceframes): New.
11974 (IPA_FIRST_TRACEFRAME): New.
11975 (IPA_NEXT_TRACEFRAME_1): New.
11976 (IPA_NEXT_TRACEFRAME): New.
11977 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
11978 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
11979 (gdb_jump_pad_buffer_end): New.
11980 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
11981 (initialize_tracepoint): Adjust.
11982 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
11983 buffer. Initialize the low module.
11984 * utils.c (PREFIX, TOOLNAME): New.
11985 (malloc_failure): Use PREFIX.
11986 (error): In the IPA, an error causes an exit.
11987 (fatal, warning): Use PREFIX.
11988 (internal_error): Use TOOLNAME.
11989 (NUMCELLS): Increase to 10.
11990 * configure, config.in: Regenerate.
11991
d149dd1d
PA
119922010-06-01 Pedro Alves <pedro@codesourcery.com>
11993
11994 * server.c (handle_query) <qSupported>: Do two passes over the
11995 qSupported string to avoid nesting strtok.
11996
f6528abd
JK
119972010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
11998
11999 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
12000 (CDEPS): New.
12001 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
12002 -Wl,--dynamic-list.
12003 * configure: Regenerate.
12004 * proc-service.list: New.
12005
ca2a87a0
JK
120062010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
12007
12008 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
12009 New comment.
12010
363a6e9f
OS
120112010-05-26 Ozkan Sezer <sezeroz@gmail.com>
12012
12013 * gdbreplay.c (remote_open): Check error return from socket() call by
12014 its equality to -1 not by it being negative.
12015 * remote-utils.c (remote_open): Likewise.
12016
d23b6cb1
PA
120172010-05-23 Pedro Alves <pedro@codesourcery.com>
12018
12019 * config.h: Regenerate.
12020
28d3cf85
MK
120212010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
12022
12023 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
12024 doesn't provide PTRACE_GET_THREAD_AREA.
12025
fea36a59
MK
120262010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
12027
12028 * linux-m68k-low.c: Include <asm/ptrace.h>
12029 (ps_get_thread_area): Implement.
12030
24b066ba
DE
120312010-05-03 Doug Evans <dje@google.com>
12032
12033 * event-loop.c (struct callback_event): New struct.
12034 (callback_list): New global.
12035 (append_callback_event, delete_callback_event): New functions.
12036 (process_callback): New function.
12037 (start_event_loop): Call it.
12038 * remote-utils.c (NOT_SCHEDULED): Define.
12039 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
12040 moved out of readchar.
12041 (readchar): Rewrite. Call reschedule before returning.
12042 (reset_readchar): New function.
12043 (remote_close): Call it.
12044 (process_remaining, reschedule): New functions.
12045 * server.h (callback_handler_func): New typedef.
12046 (append_callback_event, delete_callback_event): Declare.
12047
9836d6ea
PA
120482010-05-03 Pedro Alves <pedro@codesourcery.com>
12049
12050 * proc-service.c (ps_pglobal_lookup): Use
12051 thread_db_look_up_one_symbol.
12052 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
12053 parameter. Use it instead of all_symbols_looked_up.
12054 * server.h (struct process_info) <all_symbols_looked_up>: Delete
12055 field.
12056 (all_symbols_looked_up): Don't declare.
12057 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
12058 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
12059 field.
12060 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
12061 Set all_symbols_looked_up here.
12062 (thread_db_look_up_one_symbol): New.
12063 (thread_db_get_tls_address): Adjust.
12064 (thread_db_load_search, try_thread_db_load_1): Always allocate the
12065 thread_db object on the heap, and tentatively set it in the
12066 process structure.
12067 (thread_db_init): Don't set all_symbols_looked_up here.
12068 * linux-low.h (thread_db_look_up_one_symbol): Declare.
12069
7984d532
PA
120702010-05-03 Pedro Alves <pedro@codesourcery.com>
12071
12072 * linux-low.c (linux_kill, linux_detach): Adjust.
12073 (status_pending_p_callback): Remove redundant statement. Check
12074 for !TARGET_WAITIKIND_IGNORE, instead of
12075 TARGET_WAITKIND_STOPPED.
12076 (handle_tracepoints): Make sure LWP is locked. Adjust.
12077 (linux_wait_for_event_1): Adjust.
12078 (linux_cancel_breakpoints): New.
12079 (unsuspend_one_lwp): New.
12080 (unsuspend_all_lwps): New.
12081 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
12082 (send_sigstop_callback): Change return type to int, add new
12083 `except' parameter and handle it.
12084 (suspend_and_send_sigstop_callback): New.
12085 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
12086 pass them down. If SUSPEND, also increment the lwp's suspend
12087 count.
12088 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
12089 (need_step_over_p): Don't consider suspended LWPs.
12090 (start_step_over): Adjust.
12091 (proceed_one_lwp): Change return type to int, add new `except'
12092 parameter and handle it.
12093 (unsuspend_and_proceed_one_lwp): New.
12094 (proceed_all_lwps): Use find_inferior instead of
12095 for_each_inferior.
12096 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
12097 also decrement the suspend count of LWPs. Pass `except' down,
12098 instead of hacking its suspend count.
12099 (linux_pause_all): Add `freeze' parameter. Adjust.
12100 (linux_unpause_all): New.
12101 (linux_target_ops): Install linux_unpause_all.
12102 * server.c (handle_status): Adjust.
12103 * target.h (struct target_ops): New fields `unpause_all' and
12104 `cancel_breakpoints'. Add new parameter to `pause_all'.
12105 (pause_all): Add new `freeze' parameter.
12106 (unpause_all): New.
12107 (cancel_breakpoints): New.
12108 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
12109 cancel breakpoints.
12110 (cmd_qtstart): Pause threads.
12111 (stop_tracing): Pause threads, and cancel breakpoints.
12112 * win32-low.c (win32_target_ops): Adjust.
12113
e471f25b
PA
121142010-05-03 Pedro Alves <pedro@codesourcery.com>
12115
12116 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
12117 the inferior right away from here...
12118 (linux_wait_1): ... to here, and adjust to check the thread's
12119 last_resume_kind instead of the lwp's step or stop_expected flags.
12120
1915ef4f
PA
121212010-05-02 Pedro Alves <pedro@codesourcery.com>
12122
12123 * README: Use consistent `GDB' and `GDBserver' spellings.
12124
f9e39928
PA
121252010-05-02 Pedro Alves <pedro@codesourcery.com>
12126
12127 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
12128 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
12129 (linux_detach_one_lwp): Assume the lwp is stopped.
12130 (any_thread_of): Delete.
12131 (linux_detach): Stop all lwps here. Don't blindly delete all
12132 breakpoints.
12133 (delete_lwp_callback): New.
12134 (linux_mourn): Delete all lwps of the process that is gone.
12135 (linux_wait_1): Don't delete the last lwp of the process here.
12136 * mem-break.h (mark_breakpoints_out): Declare.
12137 * mem-break.c (mark_breakpoints_out): New.
12138 (free_all_breakpoints): Use it.
12139 * server.c (handle_target_event): If the process is gone, mark
12140 breakpoints out.
12141 * thread-db.c (struct thread_db) <create_bp>: New field.
12142 (thread_db_enable_reporting): Fix prototype. Store a thread event
12143 breakpoint reference in the thread_db struct.
12144 (thread_db_load_search): Clear the thread_db object.
12145 (try_thread_db_load_1): Ditto.
12146 (switch_to_process): New.
12147 (disable_thread_event_reporting): Use it.
12148 (remove_thread_event_breakpoints): New.
12149 (thread_db_detach, thread_db_mourn): Use it.
12150
1e7fc18c
PA
121512010-05-01 Pedro Alves <pedro@codesourcery.com>
12152
12153 * linux-low.c (linux_enable_event_reporting): New.
12154 (linux_wait_for_event_1, handle_extended_wait): Use it.
12155
02fc4de7
PA
121562010-04-30 Pedro Alves <pedro@codesourcery.com>
12157
12158 * linux-low.c (linux_kill_one_lwp, linux_kill)
12159 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
12160 (send_sigstop): Take an lwp_info as parameter instead. Queue a
12161 SIGSTOP even if the LWP is stopped.
12162 (send_sigstop_callback): New.
12163 (stop_all_lwps): Use send_sigstop_callback instead.
12164 (linux_resume_one_thread): Adjust.
12165 (proceed_one_lwp): Still proceed an LWP that the client has
12166 requested to stop, if we haven't reported it as stopped yet. Make
12167 sure that LWPs the client want stopped, have a pending SIGSTOP.
12168
bc3b5632
DE
121692010-04-26 Doug Evans <dje@google.com>
12170
ae1ada35
DE
12171 * server.c (handle_general_set): Make static.
12172
bc3b5632
DE
12173 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
12174 Print received char after testing for error/eof instead of before.
12175 (input_interrupt): Tweak comment.
12176
65730243
DE
121772010-04-23 Doug Evans <dje@google.com>
12178
12179 * server.c (start_inferior): Print inferior argv if --debug.
12180
a8ae7dc0
AR
121812010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
12182
12183 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
12184 * nto-x86-low.c: Include server.h
12185
1c07cc19
PM
121862010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
12187
12188 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
12189 be consistent with other sources of this directory.
12190 (init_registers_amd64): Correct name of source file of this function
12191 in the comment.
12192
e0a61e09
PM
121932010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
12194
12195 * configure.srv (x86_64-*-mingw*): New configuration for Windows
12196 64-bit executables.
12197
54709339
PM
121982010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
12199
12200 * win32-i386-low.c: Add 64-bit support.
12201 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
12202 (init_registers_amd64): Declare.
12203 (mappings): Add 64-bit version of array.
12204 (init_windows_x86): New function.
12205 (the_low_target): Change init_arch field to init_windows_x86.
12206
e8f0053d
PM
122072010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
12208
12209 * win32-low.c: Adapt to support also 64-bit architecture.
12210 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
12211 (get_image_name): Use SIZE_T type for local variable `done'.
12212 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
12213 (toolhelp_get_dll_name): Idem.
12214 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
12215 Use uintptr_t typecast to avoid warning.
12216 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
12217 (handle_exception): Use phex_nz to avoid warning.
12218 (win32_wait): Remove unused local variable `process'.
12219
c481e77e
PM
122202010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
12221
12222 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
12223 `amd64-avx.o'.
12224
12ea4b69
PM
122252010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
12226
12227 * configure.ac: Use `ws2_32' library for srv_mingw.
12228 * configure: Regenerate.
12229 * gdbreplay.c: Include winsock2.h instead of winsock.h.
12230 * remote-utils.c: Likewise.
12231
f6d1620c
L
122322010-04-17 H.J. Lu <hongjiu.lu@intel.com>
12233
12234 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
12235 if __x86_64__ is defined.
12236
8e642873
PM
122372010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
12238
12239 * configure: Regenerate.
12240
711e434b
PM
122412010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
12242
12243 * server.c (handle_query): Handle 'qGetTIBAddr' query.
12244 * target.h (target_ops): New get_tib_address field.
12245 * win32-low.h (win32_thread_info): Add thread_local_base field.
12246 * win32-low.c (child_add_thread): Add tlb argument.
12247 Set thread_local_base field to TLB.
12248 (get_child_debug_event): Adapt to child_add_thread change.
12249 (win32_get_tib_address): New function.
12250 (win32_target_ops): Set get_tib_address field to
12251 win32_get_tib_address.
12252 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
12253
505106cd
PA
122542010-04-12 Pedro Alves <pedro@codesourcery.com>
12255
505106cd
PA
12256 * linux-low.c (linux_mourn): Also remove the process.
12257 * server.c (handle_target_event): Don't remove the process here.
12258 * nto-low.c (nto_mourn): New.
12259 (nto_target_ops): Install it.
12260 * spu-low.c (spu_mourn): New.
12261 (spu_target_ops): Install it.
12262 * win32-low.c (win32_mourn): New.
12263 (win32_target_ops): Install it.
12264
e8470a06
PA
122652010-04-12 Pedro Alves <pedro@codesourcery.com>
12266
12267 * server.h (buffer_xml_printf): Remove redundant `;'.
12268
45ba0d02
PA
122692010-04-12 Pedro Alves <pedro@codesourcery.com>
12270
12271 * regcache.c (set_register_cache): Invalidate regcaches before
12272 changing the register cache layout.
12273 (regcache_invalidate_one): Allow a NULL regcache.
12274 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
12275 regcaches before changing the register cache layout or the target
12276 regsets.
12277
59e04013
L
122782010-04-12 H.J. Lu <hongjiu.lu@intel.com>
12279
12280 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
12281 variable warning on Linux/x86-64.
12282
8336d594
PA
122832010-04-11 Pedro Alves <pedro@codesourcery.com>
12284
12285 GDBserver disconnected tracing support.
12286
12287 * linux-low.c (linux_remove_process): Delete.
12288 (add_lwp): Don't set last_resume_kind here.
12289 (linux_kill): Use `mourn'.
12290 (linux_detach): Use `thread_db_detach', and `mourn'.
12291 (linux_mourn): New.
12292 (linux_attach_lwp_1): Adjust comment.
12293 (linux_attach): last_resume_kind moved the thread_info; adjust.
12294 (status_pending_p_callback): Adjust.
12295 (linux_wait_for_event_1): Adjust.
12296 (count_events_callback, select_singlestep_lwp_callback)
12297 (select_event_lwp_callback, cancel_breakpoints_callback)
12298 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
12299 (proceed_one_lwp): Adjust.
12300 (linux_async): Add debug output.
12301 (linux_thread_stopped): New.
12302 (linux_pause_all): New.
12303 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
12304 linux_pause_all.
12305 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
12306 (thread_db_free): Delete declaration.
12307 (thread_db_detach, thread_db_mourn): Declare.
12308 * thread-db.c (thread_db_init): Use thread_db_mourn.
12309 (thread_db_free): Delete, split in two.
12310 (disable_thread_event_reporting): New.
12311 (thread_db_detach): New.
12312 (thread_db_mourn): New.
12313
12314 * server.h (struct thread_info) <last_resume_kind>: New field.
12315 <attached>: Add comment.
12316 <gdb_detached>: New field.
12317 (handler_func): Change return type to int.
12318 (handle_serial_event, handle_target_event): Ditto.
12319 (gdb_connected): Declare.
12320 (tracing): Delete.
12321 (disconnected_tracing): Declare.
12322 (stop_tracing): Declare.
12323
12324 * server.c (handle_query) <qSupported>: Report support for
12325 disconnected tracing.
12326 (queue_stop_reply_callback): Account for running threads.
12327 (gdb_wants_thread_stopped): New.
12328 (gdb_wants_all_threads_stopped): New.
12329 (gdb_reattached_process): New.
12330 (handle_status): Clear the `gdb_detached' flag of all processes.
12331 In all-stop, stop all threads.
12332 (main): Be sure to leave tfind mode. Handle disconnected tracing.
12333 (process_serial_event): If the remote connection breaks, or if an
12334 exit was forced with "monitor exit", force an event loop exit.
12335 Handle disconnected tracing on detach.
12336 (handle_serial_event): Adjust.
12337 (handle_target_event): If GDB isn't connected, forward events back
12338 to the inferior, unless the last process exited, in which case,
12339 exit gdbserver. Adjust interface.
12340
12341 * remote-utils.c (remote_open): Don't block in accept. Instead
12342 register an event loop source on the listen socket file
12343 descriptor. Refactor bits into ...
12344 (listen_desc): ... this new global.
12345 (gdb_connected): ... this new function.
12346 (enable_async_notification): ... this new function.
12347 (handle_accept_event): ... this new function.
12348 (remote_close): Clear remote_desc.
12349
12350 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
12351
12352 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
12353 New fields.
12354 (mourn_inferior): Define.
12355 (target_process_qsupported): Avoid the dangling else problem.
12356 (thread_stopped): Define.
12357 (pause_all): Define.
12358 (target_waitstatus_to_string): Declare.
12359 * target.c (target_waitstatus_to_string): New.
12360
12361 * tracepoint.c (tracing): Make extern.
12362 (disconnected_tracing): New.
12363 (stop_tracing): Make extern. Handle tracing stops due to GDB
12364 disconnecting.
12365 (cmd_qtdisconnected): New.
12366 (cmd_qtstatus): Report disconnected tracing status in trace reply.
12367 (handle_tracepoint_general_set): Handle QTDisconnected.
12368
12369 * event-loop.c (event_handler_func): Change return type to int.
12370 (process_event): Bail out if the event handler wants the event
12371 loop to stop.
12372 (handle_file_event): Ditto.
12373 (start_event_loop): Bail out if the event handler wants the event
12374 loop to stop.
12375
12376 * nto-low.c (nto_target_ops): Adjust.
12377 * spu-low.c (spu_wait): Don't remove the process here.
12378 (spu_target_ops): Adjust.
12379 * win32-low.c (win32_wait): Don't remove the process here.
12380 (win32_target_ops): Adjust.
12381
5d267c4c
PA
123822010-04-11 Pedro Alves <pedro@codesourcery.com>
12383
12384 * regcache.c (realloc_register_cache): Invalidate inferior's
12385 regcache before recreating it.
12386
623ccd72
PA
123872010-04-09 Pedro Alves <pedro@codesourcery.com>
12388
12389 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
12390
219f2f23
PA
123912010-04-09 Stan Shebs <stan@codesourcery.com>
12392 Pedro Alves <pedro@codesourcery.com>
12393
12394 * server.h (LONGEST): New.
12395 (struct thread_info) <while_stepping>: New field.
12396 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
12397 Declare.
12398 (initialize_tracepoint, handle_tracepoint_general_set)
12399 (handle_tracepoint_query, tracepoint_finished_step)
12400 (tracepoint_was_hit, release_while_stepping_state_list):
12401 (current_traceframe): Declare.
12402 * server.c (handle_general_set): Handle tracepoint packets.
12403 (read_memory): New.
12404 (write_memory): New.
12405 (handle_search_memory_1): Use read_memory.
12406 (handle_query): Report support for conditional tracepoints, trace
12407 state variables, and tracepoint sources. Handle tracepoint
12408 queries.
12409 (main): Initialize the tracepoints module.
12410 (process_serial_event): Handle traceframe reads/writes.
12411
12412 * linux-low.c (handle_tracepoints): New.
12413 (linux_wait_1): Call it.
12414 (linux_resume_one_lwp): Handle while-stepping.
12415 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
12416 (linux_target_ops): Install them.
12417 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
12418 New field.
12419 * linux-x86-low.c (x86_supports_tracepoints): New.
12420 (the_low_target). Install it.
12421
12422 * mem-break.h (delete_breakpoint): Declare.
12423 * mem-break.c (delete_breakpoint): Make external.
12424
12425 * target.h (struct target_ops): Add `supports_tracepoints',
12426 `read_pc', and `write_pc' fields.
12427 (target_supports_tracepoints): Define.
12428 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
12429 (phex_nz): New.
12430
12431 * regcache.h (struct regcache) <registers_owned>: New field.
12432 (init_register_cache, regcache_cpy): Declare.
12433 (regcache_read_pc, regcache_write_pc): Declare.
12434 (register_cache_size): Declare.
12435 (supply_regblock): Declare.
12436 * regcache.c (init_register_cache): New.
12437 (new_register_cache): Use it.
12438 (regcache_cpy): New.
12439 (register_cache_size): New.
12440 (supply_regblock): New.
12441 (regcache_read_pc, regcache_write_pc): New.
889bf7c5 12442
219f2f23
PA
12443 * tracepoint.c: New.
12444
12445 * Makefile.in (OBS): Add tracepoint.o.
12446 (tracepoint.o): New rule.
12447
3a13a53b
L
124482010-04-08 H.J. Lu <hongjiu.lu@intel.com>
12449
12450 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
12451 (i386-mmx.o): New.
12452 (i386-mmx.c): Likewise.
12453 (i386-mmx-linux.o): Likewise.
12454 (i386-mmx-linux.c): Likewise.
12455
12456 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
12457 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
12458 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
12459 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
12460
12461 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
12462 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
12463 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
12464
1570b33e
L
124652010-04-07 H.J. Lu <hongjiu.lu@intel.com>
12466
12467 * Makefile.in (clean): Updated.
12468 (i386-avx.o): New.
12469 (i386-avx.c): Likewise.
12470 (i386-avx-linux.o): Likewise.
12471 (i386-avx-linux.c): Likewise.
12472 (amd64-avx.o): Likewise.
12473 (amd64-avx.c): Likewise.
12474 (amd64-avx-linux.o): Likewise.
12475 (amd64-avx-linux.c): Likewise.
12476
12477 * configure.srv (srv_i386_regobj): Add i386-avx.o.
12478 (srv_i386_linux_regobj): Add i386-avx-linux.o.
12479 (srv_amd64_regobj): Add amd64-avx.o.
12480 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
12481 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
12482 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
12483 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
12484 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
12485 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
12486 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
12487
12488 * i387-fp.c: Include "i386-xstate.h".
12489 (i387_xsave): New.
12490 (i387_cache_to_xsave): Likewise.
12491 (i387_xsave_to_cache): Likewise.
12492 (x86_xcr0): Likewise.
12493
12494 * i387-fp.h (i387_cache_to_xsave): Likewise.
12495 (i387_xsave_to_cache): Likewise.
12496 (x86_xcr0): Likewise.
12497
12498 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
12499 * linux-crisv32-low.c (target_regsets): Likewise.
12500 * linux-m68k-low.c (target_regsets): Likewise.
12501 * linux-mips-low.c (target_regsets): Likewise.
12502 * linux-ppc-low.c (target_regsets): Likewise.
12503 * linux-s390-low.c (target_regsets): Likewise.
12504 * linux-sh-low.c (target_regsets): Likewise.
12505 * linux-sparc-low.c (target_regsets): Likewise.
12506 * linux-xtensa-low.c (target_regsets): Likewise.
12507
12508 * linux-low.c: Include <sys/uio.h>.
12509 (regsets_fetch_inferior_registers): Support nt_type.
12510 (regsets_store_inferior_registers): Likewise.
12511 (linux_process_qsupported): New.
12512 (linux_target_ops): Add linux_process_qsupported.
12513
12514 * linux-low.h (regset_info): Add nt_type.
12515 (linux_target_ops): Add process_qsupported.
12516
12517 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
12518 and <sys/uio.h>.
12519 (init_registers_i386_avx_linux): New.
12520 (init_registers_amd64_avx_linux): Likewise.
12521 (xmltarget_i386_linux_no_xml): Likewise.
12522 (xmltarget_amd64_linux_no_xml): Likewise.
12523 (PTRACE_GETREGSET): Likewise.
12524 (PTRACE_SETREGSET): Likewise.
12525 (x86_fill_xstateregset): Likewise.
12526 (x86_store_xstateregset): Likewise.
12527 (use_xml): Likewise.
12528 (x86_linux_update_xmltarget): Likewise.
12529 (x86_linux_process_qsupported): Likewise.
12530 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
12531 (x86_arch_setup): Don't call init_registers_amd64_linux nor
12532 init_registers_i386_linux here. Call
12533 x86_linux_update_xmltarget.
12534 (the_low_target): Add x86_linux_process_qsupported.
12535
12536 * server.c (handle_query): Call target_process_qsupported.
12537
12538 * target.h (target_ops): Add process_qsupported.
12539 (target_process_qsupported): New.
12540
fc7238bb
PA
125412010-04-03 Pedro Alves <pedro@codesourcery.com>
12542
12543 * inferiors.c (add_thread): Set last_status kind to
12544 TARGET_WAITKIND_IGNORE.
12545 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
12546 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
12547 (linux_wait_1): Move `thread' local definition to block that uses
12548 it. Don't NULL initialize `event_child'.
12549 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
12550 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
12551 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
12552
bdabb078
PA
125532010-04-01 Pedro Alves <pedro@codesourcery.com>
12554
12555 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
12556 an extended waitstatus, or by a watchpoint.
12557 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
12558 thread was stepping or has been stopped by a watchpoint.
12559
d3bbe7a0
PA
125602010-04-01 Pedro Alves <pedro@codesourcery.com>
12561
12562 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
12563 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
12564 of another, then delete the previous, and validate all
12565 breakpoints.
12566 (validate_inserted_breakpoint): New.
12567 (delete_disabled_breakpoints): New.
12568 (validate_breakpoints): New.
12569 (check_mem_read): Validate breakpoints before trusting their
12570 shadow. Delete disabled breakpoints.
12571 (check_mem_write): Validate breakpoints before trusting they
12572 should be inserted. Delete disabled breakpoints.
12573 * mem-break.h (validate_breakpoints):
12574 * server.c (handle_query): Validate breakpoints when we see a
12575 qSymbol query.
12576
8b07ae33
PA
125772010-04-01 Pedro Alves <pedro@codesourcery.com>
12578
12579 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
12580 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
12581 if we could tell there's a GDB breakpoint at stop_pc.
12582 (need_step_over_p): Don't do a step over if we find a GDB
12583 breakpoint at the resume PC.
12584
12585 * mem-break.c (struct raw_breakpoint): New.
12586 (enum bkpt_type): New type `gdb_breakpoint'.
12587 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
12588 fields. New field `raw'.
12589 (find_raw_breakpoint_at): New.
12590 (set_raw_breakpoint_at): Handle refcounting. Create a raw
12591 breakpoint instead.
12592 (set_breakpoint_at): Adjust.
12593 (delete_raw_breakpoint): New.
12594 (release_breakpoint): New.
12595 (delete_breakpoint): Rename to...
12596 (delete_breakpoint_1): ... this. Add proc parameter. Use
12597 release_breakpoint. Return ENOENT.
12598 (delete_breakpoint): Reimplement.
12599 (find_breakpoint_at): Delete.
12600 (find_gdb_breakpoint_at): New.
12601 (delete_breakpoint_at): Delete.
12602 (set_gdb_breakpoint_at): New.
12603 (delete_gdb_breakpoint_at): New.
12604 (gdb_breakpoint_here): New.
12605 (set_reinsert_breakpoint): Use release_breakpoint.
12606 (uninsert_breakpoint): Rename to ...
12607 (uninsert_raw_breakpoint): ... this.
12608 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
12609 (reinsert_raw_breakpoint): Change parameter type to
12610 raw_breakpoint.
12611 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
12612 instead.
12613 (check_breakpoints): Adjust. Use release_breakpoint.
12614 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
12615 (breakpoint_inserted_here): Ditto.
12616 (check_mem_read): Adjust to iterate over raw breakpoints instead.
12617 Don't trust the breakpoint's shadow if it is not inserted.
12618 (check_mem_write): Adjust to iterate over raw breakpoints instead.
12619 (delete_all_breakpoints): Adjust.
12620 (free_all_breakpoints): Mark all breakpoints as uninserted, and
12621 use delete_breakpoint_1.
12622
12623 * mem-break.h (breakpoints_supported): Delete declaration.
12624 (set_gdb_breakpoint_at): Declare.
12625 (gdb_breakpoint_here): Declare.
12626 (delete_breakpoint_at): Delete.
12627 (delete_gdb_breakpoint_at): Declare.
12628
12629 * server.h (struct raw_breakpoint): Forward declare.
12630 (struct process_info): New field `raw_breakpoints'.
12631
12632 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
12633 breakpoints.
12634
6bf5e0ba
PA
126352010-03-24 Pedro Alves <pedro@codesourcery.com>
12636
12637 * linux-low.c (status_pending_p_callback): Fix comment.
12638 (linux_wait_for_event_1): Move most of the internal breakpoint
12639 handling from here...
12640 (linux_wait_1): ... to here.
12641 (count_events_callback): New.
12642 (select_singlestep_lwp_callback): New.
12643 (select_event_lwp_callback): New.
12644 (cancel_breakpoints_callback): New.
12645 (select_event_lwp): New.
12646 (linux_wait_1): Simplify internal breakpoint handling. Give equal
12647 priority to all LWPs that have had events that should be reported
12648 to the client. Cancel breakpoints when about to reporting the
12649 event to the client, not while stopping lwps. No longer cancel
12650 finished single-steps here.
12651 (cancel_finished_single_step): Delete.
12652 (cancel_finished_single_steps): Delete.
12653
414a389f
PA
126542010-03-24 Pedro Alves <pedro@codesourcery.com>
12655
12656 * mem-break.c (enum bkpt_type): New.
12657 (struct breakpoint): New field `type'.
12658 (set_breakpoint_at): Change return type to struct breakpoint
12659 pointer. Set type to `other_breakpoint' by default.
12660 (delete_breakpoint): Rewrite, supporting more than one breakpoint
12661 in the breakpoint list.
12662 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
12663 (reinsert_breakpoint): Rename to ...
12664 (reinsert_raw_breakpoint): ... this.
12665 (reinsert_breakpoints_at): Adjust.
12666 * mem-break.h (struct breakpoint): Declare.
12667 (set_breakpoint_at): Change return type to struct breakpoint
12668 pointer.
12669
2280c721
PA
126702010-03-24 Pedro Alves <pedro@codesourcery.com>
12671
12672 * server.c (handle_query): Assign, not compare.
12673
d50171e4
PA
126742010-03-24 Pedro Alves <pedro@codesourcery.com>
12675
12676 Teach linux gdbserver to step-over-breakpoints.
12677
12678 * linux-low.c (can_hardware_single_step): New.
12679 (supports_breakpoints): New.
12680 (handle_extended_wait): If stopping threads, read the stop pc of
12681 the new cloned LWP.
12682 (get_pc): New.
12683 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
12684 low target doesn't support retrieving the PC.
12685 (add_lwp): Set last_resume_kind to resume_continue.
12686 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
12687 (linux_attach): Don't clear stop_expected. Set the lwp's
12688 last_resume_kind to resume_stop.
12689 (linux_detach_one_lwp): Don't check for removed breakpoints.
12690 (check_removed_breakpoint): Delete.
12691 (status_pending_p): Rename to ...
12692 (status_pending_p_callback): ... this. Don't check for removed
12693 breakpoints. Don't consider threads that are stopped from GDB's
12694 perspective.
12695 (linux_wait_for_lwp): Always read the stop_pc here.
12696 (cancel_breakpoint): New.
12697 (step_over_bkpt): New global.
12698 (linux_wait_for_event_1): Implement stepping over breakpoints.
12699 (gdb_wants_lwp_stopped): New.
12700 (gdb_wants_all_stopped): New.
12701 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
12702 single-step traps here. Store the thread's last reported target
12703 wait status.
12704 (send_sigstop): Don't clear stop_expected. Always set it,
12705 instead.
12706 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
12707 (cancel_finished_single_step): New.
12708 (cancel_finished_single_steps): New.
12709 (wait_for_sigstop): Don't cancel finished single-step traps here.
12710 (linux_resume_one_lwp): Don't check for removed breakpoints.
12711 Don't set `step' on non-hardware step archs.
12712 (linux_set_resume_request): Ignore resume_stop requests if already
12713 stopping or stopped. Set the lwp's last_resume_kind.
12714 (resume_status_pending_p): Don't check for removed breakpoints.
12715 (need_step_over_p): New.
12716 (start_step_over): New.
12717 (finish_step_over): New.
12718 (linux_resume_one_thread): Always queue a sigstop for resume_stop
12719 requests. Clear the thread's last reported target waitstatus.
12720 Don't use the `suspended' flag. Don't consider pending breakpoints.
12721 (linux_resume): Start a step-over if necessary.
12722 (proceed_one_lwp): New.
12723 (proceed_all_lwps): New.
12724 (unstop_all_lwps): New.
12725 * linux-low.h (struct lwp_info): Rewrite comment for the
12726 `suspended' flag. Add the `stop_pc' field. Delete the
12727 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
12728 Add `'last_resume_kind' and `need_step_over' fields.
12729 * inferiors.c (struct thread_info): Delete, moved elsewhere.
12730 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
12731 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
12732 (set_raw_breakpoint_at): New.
12733 (set_breakpoint_at): Rewrite to use it.
12734 (reinsert_breakpoint_handler): Delete.
12735 (set_reinsert_breakpoint): New.
12736 (reinsert_breakpoint_by_bp): Delete.
12737 (delete_reinsert_breakpoints): New.
12738 (uninsert_breakpoint): Rewrite.
12739 (uninsert_breakpoints_at): New.
12740 (reinsert_breakpoint): Rewrite.
12741 (reinsert_breakpoints_at): New.
12742 (check_breakpoints): Rewrite.
12743 (breakpoint_here): New.
12744 (breakpoint_inserted_here): New.
12745 (check_mem_read): Adjust.
12746 * mem-break.h (breakpoints_supported, breakpoint_here)
12747 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
12748 (reinsert_breakpoint_by_bp): Delete declaration.
12749 (delete_reinsert_breakpoints): Declare.
12750 (reinsert_breakpoint): Delete declaration.
12751 (reinsert_breakpoints_at): Declare.
12752 (uninsert_breakpoint): Delete declaration.
12753 (uninsert_breakpoints_at): Declare.
12754 (check_breakpoints): Adjust prototype.
12755 * server.h: Adjust include order.
12756 (struct thread_info): Declare here. Add a `last_status' field.
12757
30ba68cb
MS
127582010-03-23 Michael Snyder <msnyder@vmware.com>
12759
12760 * server.c (crc32): New function.
12761 (handle_query): Add handling for 'qCRC:' request.
12762
b9a881c2
PA
127632010-03-23 Pedro Alves <pedro@codesourcery.com>
12764
12765 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
12766 lwp had been stopped by a watchpoint.
12767
e92d13d5
PA
127682010-03-16 Pedro Alves <pedro@codesourcery.com>
12769
12770 * server.h (internal_error): Declare.
12771 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
12772 * utils.c (internal_error): New function.
12773
64daa791
AS
127742010-03-15 Andreas Schwab <schwab@redhat.com>
12775
12776 * configure.srv: Fix typo setting srv_regobj.
12777
f52cd8cd
PA
127782010-03-15 Pedro Alves <pedro@codesourcery.com>
12779
12780 * linux-low.c (fetch_register): Avoid passing a non string literal
12781 format to `error'.
12782 (usr_store_inferior_registers): Ditto.
12783
93ae6fdc
PA
127842010-03-14 Pedro Alves <pedro@codesourcery.com>
12785
12786 * linux-low.c (linux_write_memory): Bail out early if peeking
12787 memory failed.
12788
c3adc08c
PA
127892010-03-14 Pedro Alves <pedro@codesourcery.com>
12790
12791 * linux-low.h (struct lwp_info): New fields
12792 `stopped_by_watchpoint' and `stopped_data_address'.
12793 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
12794 here, and cache them in the lwp object.
12795 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
12796 directly.
12797 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
12798 field.
12799 (linux_stopped_by_watchpoint): Rewrite.
12800 (linux_stopped_data_address): Rewrite.
12801
bce522a2
PA
128022010-03-06 Simo Melenius <simo.melenius@iki.fi>
12803
12804 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
12805 switching the current inferior, not before.
12806
90884b2b
L
128072010-03-01 H.J. Lu <hongjiu.lu@intel.com>
12808
12809 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
12810 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
12811 i386-linux.c and amd64-linux.c.
12812 (reg-i386.o): Removed.
12813 (reg-i386.c): Likewise.
12814 (reg-i386-linux.o): Likewise.
12815 (reg-i386-linux.c): Likewise.
12816 (reg-x86-64.o): Likewise.
12817 (reg-x86-64.c): Likewise.
12818 (reg-x86-64-linux.o): Likewise.
12819 (reg-x86-64-linux.c): Likewise.
12820 (i386.o): New.
12821 (i386.c): Likewise.
12822 (i386-linux.o): Likewise.
12823 (i386-linux.c): Likewise.
12824 (amd64.o): Likewise.
12825 (amd64.c): Likewise.
12826 (amd64-linux.o): Likewise.
12827 (amd64-linux.c): Likewise.
12828
12829 * configure.srv (srv_i386_regobj): New.
12830 (srv_i386_linux_regobj): Likewise.
12831 (srv_amd64_regobj): Likewise.
12832 (srv_amd64_linux_regobj): Likewise.
12833 (srv_i386_32bit_xmlfiles): Likewise.
12834 (srv_i386_64bit_xmlfiles): Likewise.
12835 (srv_i386_xmlfiles): Likewise.
12836 (srv_amd64_xmlfiles): Likewise.
12837 (srv_i386_linux_xmlfiles): Likewise.
12838 (srv_amd64_linux_xmlfiles): Likewise.
12839 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
12840 srv_xmlfiles to $srv_i386_xmlfiles.
12841 (i[34567]86-*-mingw32ce*): Likewise.
12842 (i[34567]86-*-mingw*): Likewise.
12843 (i[34567]86-*-nto*): Likewise.
12844 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
12845 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
12846 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
12847 (x86_64-*-linux*): Likewise.
12848
12849 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
12850 (init_registers_amd64_linux): New.
12851 (x86_arch_setup): Replace init_registers_x86_64_linux with
12852 init_registers_amd64_linux.
12853
193f13e6
MK
128542010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
12855
12856 * configure.ac: Check for libdl. If it is not available link against
12857 static libthread_db.
12858 * configure: Regenerate.
12859
85d721b8
PA
128602010-02-22 Pedro Alves <pedro@codesourcery.com>
12861
12862 PR9605
12863
12864 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
12865 handing a read watchpoint.
12866 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
12867
6076632b
DE
128682010-02-12 Doug Evans <dje@google.com>
12869
12870 * linux-low.c (linux_supports_tracefork_flag): Document.
12871 (linux_look_up_symbols): Add comment.
12872
3327ccf7
L
128732010-02-03 H.J. Lu <hongjiu.lu@intel.com>
12874
12875 * regcache.c (supply_register): Clear regcache if buf is NULL.
12876
0718675c 128772010-02-02 Nicolas Roche <roche@sourceware.org>
3327ccf7 12878 Joel Brobecker <brobecker@adacore.com>
0718675c
JB
12879
12880 * inferiors.c (find_inferior): Add function documentation.
12881 (unloaded_dll): Handle the case where the unloaded dll has not
12882 been previously registered in the dll list.
12883
177321bd
DJ
128842010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
12885
12886 * linux-arm-low.c (thumb_breakpoint_len): Delete.
12887 (thumb2_breakpoint): New.
12888 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
12889
2b009048
DJ
128902010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
12891
12892 * linux-low.c (get_stop_pc): Check for SIGTRAP.
12893 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
12894 breakpoints.
12895
3be029c7
PA
128962010-01-21 Pedro Alves <pedro@codesourcery.com>
12897
12898 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
12899
18f5de3b
JK
129002010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
12901
12902 * linux-s390-low.c (s390_collect_ptrace_register)
12903 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
12904
3743bb4f
DE
129052010-01-21 Doug Evans <dje@google.com>
12906
14ce3065
DE
12907 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
12908 (PTRACE_ARG4_TYPE): New macro.
12909 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
12910 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
12911 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
12912 (usr_store_inferior_registers): Ditto.
12913 (linux_read_memory, linux_write_memory): Ditto.
12914 (linux_test_for_tracefork): Ditto.
12915
3743bb4f
DE
12916 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
12917 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
12918
8b315be5
PA
129192010-01-21 Pedro Alves <pedro@codesourcery.com>
12920
12921 * proc-service.c (ps_lgetregs): Don't refetch registers from the
12922 target.
12923
85492558
PA
129242010-01-21 Pedro Alves <pedro@codesourcery.com>
12925
12926 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
12927 prototype to take a regcache. Adjust.
12928
442ea881
PA
129292010-01-20 Pedro Alves <pedro@codesourcery.com>
12930
12931 * regcache.h (struct thread_info): Forward declare.
12932 (struct regcache): New.
12933 (new_register_cache): Adjust prototype.
12934 (get_thread_regcache): Declare.
12935 (free_register_cache): Adjust prototype.
12936 (registers_to_string, registers_from_string): Ditto.
12937 (supply_register, supply_register_by_name, collect_register)
12938 (collect_register_as_string, collect_register_by_name): Ditto.
12939 * regcache.c (struct inferior_regcache_data): Delete.
12940 (get_regcache): Rename to ...
12941 (get_thread_regcache): ... this. Adjust. Switch inferior before
12942 fetching registers.
12943 (regcache_invalidate_one): Adjust.
12944 (regcache_invalidate): Fix prototype.
12945 (new_register_cache): Return the new register cache.
12946 (free_register_cache): Change prototype.
12947 (realloc_register_cache): Adjust.
12948 (registers_to_string): Change prototype to take a regcache. Adjust.
12949 (registers_from_string): Ditto.
12950 (register_data): Ditto.
12951 (supply_register): Ditto.
12952 (supply_register_by_name): Ditto.
12953 (collect_register): Ditto.
12954 (collect_register_as_string): Ditto.
12955 (collect_register_by_name): Ditto.
12956 * server.c (process_serial_event): Adjust.
12957 * linux-low.h (regset_fill_func, regset_store_func): Change
12958 prototype.
12959 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
12960 Change prototype.
12961 * linux-low.c (get_stop_pc): Adjust.
12962 (check_removed_breakpoint): Adjust.
12963 (linux_wait_for_event): Adjust.
12964 (linux_resume_one_lwp): Adjust.
12965 (fetch_register): Add regcache parameter. Adjust.
12966 (usr_store_inferior_registers): Ditto.
12967 (regsets_fetch_inferior_registers): Ditto.
12968 (regsets_store_inferior_registers): Ditto.
12969 (linux_fetch_registers, linux_store_registers): Ditto.
12970 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
12971 regcache. Adjust.
43aaf8b6
PA
12972 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
12973 Ditto.
442ea881
PA
12974 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
12975 prototype to take a regcache.
12976 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
12977 * remote-utils.c (convert_ascii_to_int, outreg)
12978 (prepare_resume_reply): Change prototype to take a regcache.
12979 Adjust.
12980 * target.h (struct target_ops) <fetch_registers, store_registers>:
12981 Change prototype to take a regcache.
12982 (fetch_inferior_registers, store_inferior_registers): Change
12983 prototype to take a regcache. Adjust.
12984 * proc-service.c (ps_lgetregs): Adjust.
12985 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
12986 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
12987 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
12988 take a regcache. Adjust.
12989 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
12990 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
12991 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
12992 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
12993 * linux-cris-low.c (cris_get_pc, cris_set_pc)
12994 (cris_cannot_fetch_register):
12995 (cris_breakpoint_at): Change prototype to take a regcache.
12996 Adjust.
12997 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
12998 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
12999 to take a regcache. Adjust.
13000 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
13001 Adjust.
13002 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
13003 take a regcache. Adjust.
13004 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
13005 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
13006 (m68k_set_pc): Change prototype to take a regcache. Adjust.
13007 * linux-mips-low.c (mips_get_pc):
13008 (mips_set_pc): Change prototype to take a regcache. Adjust.
13009 (mips_reinsert_addr): Adjust.
13010 (mips_collect_register): Change prototype to take a regcache.
13011 Adjust.
13012 (mips_supply_register):
13013 (mips_collect_register_32bit, mips_supply_register_32bit)
13014 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
13015 (mips_store_fpregset): Ditto.
43aaf8b6
PA
13016 * linux-ppc-low.c (ppc_supply_ptrace_register)
13017 (ppc_supply_ptrace_register): Ditto.
442ea881
PA
13018 (parse_spufs_run): Adjust.
13019 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
13020 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
13021 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
13022 take a regcache. Adjust.
13023 * linux-s390-low.c (s390_collect_ptrace_register)
13024 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
13025 (s390_set_pc): Change prototype to take a regcache. Adjust.
13026 (s390_arch_setup): Adjust.
13027 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
13028 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
13029 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
13030 (sparc_fill_gregset, sparc_store_gregset_from_stack)
13031 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
13032 regcache. Adjust.
13033 (sparc_breakpoint_at): Adjust.
13034 * linux-xtensa-low.c (xtensa_fill_gregset):
13035 (xtensa_store_gregset):
13036 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
13037 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
13038 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
13039 prototype to take a regcache. Adjust.
13040 * win32-arm-low.c (arm_fetch_inferior_register)
13041 (arm_store_inferior_register): Change prototype to take a
13042 regcache. Adjust.
13043 * win32-i386-low.c (i386_fetch_inferior_register)
13044 (i386_store_inferior_register): Change prototype to take a
13045 regcache. Adjust.
13046 * win32-low.c (child_fetch_inferior_registers)
13047 (child_store_inferior_registers): Change prototype to take a
13048 regcache. Adjust.
13049 (win32_wait): Adjust.
13050 (win32_fetch_inferior_registers): Change prototype to take a
13051 regcache. Adjust.
13052 (win32_store_inferior_registers): Adjust.
13053 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
13054 store_inferior_register>: Change prototype to take a regcache.
13055
60c3d7b0
DE
130562010-01-20 Doug Evans <dje@google.com>
13057
13058 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
13059 #ifdef.
13060 (linux_wait_for_event1, linux_init_signals): Ditto.
ec8ebe72 13061 (W_STOPCODE): Provide definition if missing.
60c3d7b0 13062
dc146f7c
VP
130632010-01-13 Vladimir Prus <vladimir@codesourcery.com>
13064
13065 * linux-low.c (linux_core_of_thread): New.
13066 (compare_ints, show_process, list_threads): New.
13067 (linux_qxfer_osdata): Report threads and cores.
13068 (linux_target_op): Register linux_core_of_thread.
13069 * remote-utils.c (prepare_resume_reply): Report the core.
13070 (buffer_xml_printf): Support %d specifier.
13071 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
13072 New.
13073 (handle_query): Handle qXfer:threads. Announce availability
13074 thereof.
13075 * target.h (struct target_ops): New field core_of_thread.
13076
7803799a
UW
130772010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
13078
13079 * Makefile.in (clean): Remove new generated files.
13080 (reg-s390.o, reg-s390.c): Remove rules.
13081 (reg-s390x.o, reg-s390x.c): Likewise.
13082 (s390-linux32.o, s390-linux32.c): Add rules.
13083 (s390-linux64.o, s390-linux64.c): Likewise.
13084 (s390x-linux64.o, s390x-linux64.c): Likewise.
13085 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
13086 * linux-s390-low.c: Include <elf.h>.
13087 (HWCAP_S390_HIGH_GPRS): Define if undefined.
13088 (init_registers_s390): Remove prototype.
13089 (init_registers_s390x): Likewise.
13090 (init_registers_s390_linux32): Add prototype.
13091 (init_registers_s390_linux64): Likewise.
13092 (init_registers_s390x_linux64): Likewise.
13093 (s390_num_regs_3264): New define.
13094 (s390_regmap_3264): New global variable.
13095 (s390_cannot_fetch_register): Remove obsolete check.
13096 (s390_cannot_store_register): Likewise.
13097 (s390_collect_ptrace_register): Handle upper/lower register halves.
13098 (s390_supply_ptrace_register): Likewise.
13099 (s390_fill_gregset): Update to register number changes.
13100 (s390_get_hwcap): New routine.
13101 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
13102 Install appropriate regmap and register set.
13103
6e7ffa39
JB
131042010-01-01 Joel Brobecker <brobecker@adacore.com>
13105
13106 * server.c (gdbserver_version): Update copyright year to 2010.
13107 * gdbreplay.c (gdbreplay_version): Likewise.
13108
957f3f49
DE
131092009-12-28 Doug Evans <dje@google.com>
13110
13111 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
13112 elf/external.h. Include <elf.h> instead but only if necessary.
13113
ca5c370d
PA
131142009-12-28 Pedro Alves <pedro@codesourcery.com>
13115
13116 * linux-low.c (linux_remove_process): Remove `detaching'
13117 parameter. Don't release/detach from thread_db here.
13118 (linux_kill): Release/detach from thread_db here, ...
13119 (linux_detach): ... and here, before actually detaching.
13120 (linux_wait_1): ... and here, when a process exits.
13121 * thread-db.c (any_thread_of): New.
13122 (thread_db_free): Switch the current inferior to a thread of the
13123 passed in process.
13124
4ee62156
DE
131252009-12-21 Doug Evans <dje@google.com>
13126
d90e6a88
DE
13127 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
13128
c5f62d5f
DE
13129 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
13130 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
13131 warning ifndef __NR_tkill. Move setting of errno there too.
13132 Delete unnecessary resetting of errno after syscall.
13133 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
13134
10e86dd7
DE
13135 * configure.ac: Check for dladdr.
13136 * config.in: Regenerate.
13137 * configure: Regenerate.
13138 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
13139 (try_thread_db_load): Update.
13140
4ee62156
DE
13141 * linux-low.c (my_waitpid): Delete unnecessary prototype.
13142
00f515da
DE
131432009-12-18 Doug Evans <dje@google.com>
13144
e9464885
DE
13145 * event-loop.c: Include unistd.h if it exists.
13146
07d4f67e
DE
13147 * linux-low.c (my_waitpid): Move definition away from being in
13148 between linux_tracefork_child/linux_test_for_tracefork.
13149
00f515da
DE
13150 * gdb_proc_service.h (psaddr_t): Fix type.
13151 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
13152 signature to match glibc.
13153
1de1badb
DE
131542009-12-16 Doug Evans <dje@google.com>
13155
13156 * linux-low.c (linux_read_memory): Fix argument to read.
13157
aeeb81d1
PA
131582009-11-26 Pedro Alves <pedro@codesourcery.com>
13159
13160 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
13161 events, don't leave current_inferior pointing at null.
13162
10357975
PA
131632009-11-26 Pedro Alves <pedro@codesourcery.com>
13164
13165 * win32-low.c (LOG): Delete.
13166 (OUTMSG): Output to stderr.
13167 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
13168 on compile time LOG macro.
13169 (win32_wait): Fix debug output.
13170
cf6e3471
PA
131712009-11-26 Pedro Alves <pedro@codesourcery.com>
13172
13173 * win32-low.c (win32_add_one_solib): If the dll name is
13174 "ntdll.dll", prepend the system directory to the dll path.
13175
0c85e18e
MK
131762009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
13177
13178 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
13179
9ac544ce 131802009-11-17 Nathan Sidwell <nathan@codesourcery.com>
889bf7c5 13181 Vladimir Prus <vladimir@codesourcery.com>
9ac544ce
MK
13182
13183 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
13184 * configure.ac: Check for __mcoldfire__ and set
13185 gdb_cv_m68k_is_coldfire.
13186 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
13187 reg-cf.o and reg-m68k.o.
13188 * configure: Regenerated.
13189
fd7dd3e6
PA
131902009-11-16 Pedro Alves <pedro@codesourcery.com>
13191
13192 * linux-low.c (linux_remove_process): Add `detaching' parameter.
13193 Pass it to thread_db_free.
13194 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
13195 proper `detaching' argument to linux_remove_process.
13196 * linux-low.h (thread_db_free): Add `detaching' parameter.
13197 * thread-db.c (thread_db_init): Pass false as `detaching' argument
13198 to thread_db_free.
13199 (thread_db_free): Add `detaching' parameter. Only
13200 call td_ta_clear_event if detaching from process.
13201
75aa492e
MK
132022009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
13203
13204 * thread-db.c (thread_db_free): Fix typo.
13205
21e1bee4
PP
132062009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
13207
13208 PR gdb/10838
13209 * thread-db.c (thread_db_free): Call td_ta_clear_event.
13210
8838b45e
NS
132112009-11-03 Nathan Sidwell <nathan@codesourcery.com>
13212
13213 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
13214 with an i686 compiler.
13215 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
13216 needed.
13217 * configure: Rebuilt.
13218
8a35fb51
SL
132192009-10-29 Sandra Loosemore <sandra@codesourcery.com>
13220
13221 PR gdb/10783
13222
13223 * server.c (handle_search_memory_1): Correct read_addr initialization
13224 in loop for searching subsequent chunks.
13225
96f15937
PP
132262009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
13227
13228 * configure.ac: New --with-libthread-db option.
13229 * thread-db.c: Allow direct dependence on libthread_db.
13230 (thread_db_free): Adjust.
13231 * config.in: Regenerate.
13232 * configure: Likewise.
889bf7c5 13233
5f7d1694
PP
132342009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
13235
13236 PR gdb/10757
13237 * thread-db.c (attach_thread): New function.
13238 (maybe_attach_thread): Return success/failure.
13239 (find_new_threads_callback): Adjust.
889bf7c5
PA
13240 (thread_db_find_new_threads): Loop until no new threads.
13241
88e3b899
PA
132422009-10-13 Pedro Alves <pedro@codesourcery.com>
13243
13244 * proc-service.c (ps_lgetregs): Formatting.
13245
cdbfd419
PP
132462009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
13247
13248 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
13249 * configure.ac: Adjust.
13250 * linux-low.h (struct process_info_private): Move members to struct
13251 thread_db.
13252 (thread_db_free, thread_db_handle_monitor_command): New prototype.
13253 * linux-low.c (linux_remove_process): Adjust.
13254 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
13255 * server.c (handle_query): Move code ...
13256 (handle_monitor_command): ... here. New function.
13257 * target.h (struct target_ops): New member.
13258 * thread-db.c (struct thread_db): New.
13259 (libthread_db_search_path): New variable.
13260 (thread_db_create_event, thread_db_enable_reporting)
13261 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
13262 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
13263 (try_thread_db_load_1, dladdr_to_soname): New functions.
13264 (try_thread_db_load, thread_db_load_search): New functions.
13265 (thread_db_init): Search for libthread_db.
13266 (thread_db_free): New function.
13267 (thread_db_handle_monitor_command): Likewise.
13268 * config.in: Regenerate.
13269 * configure: Regenerate.
889bf7c5 13270
4168d2d6
UW
132712009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
13272
13273 * spu-low.c (spu_kill): Wait for inferior to terminate.
13274 Call clear_inferiors.
13275 (spu_detach): Call clear_inferiors.
13276
81ecdfbb
RW
132772009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
13278
13279 * aclocal.m4: Regenerate.
13280 * config.in: Likewise.
13281 * configure: Likewise.
13282
0b9ff2c0
UW
132832009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
13284
13285 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
13286 (parse_spufs_run): New function.
13287 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
13288 (ppc_breakpoint_at): Handle SPU breakpoints.
13289
efcbbd14
UW
132902009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
13291
13292 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
13293 (SPUFS_MAGIC): Define.
13294 (spu_enumerate_spu_ids): New function.
13295 (linux_qxfer_spu): New function.
13296 (linux_target_ops): Install linux_qxfer_spu.
13297
f4d9bade
UW
132982009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
13299
13300 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
13301 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
13302 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
13303 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
13304 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
13305 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
13306 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
13307 (init_registers_powerpc_cell32l): Add prototype.
13308 (init_registers_powerpc_cell64l): Likewise.
13309 (ppc_arch_setup): Detect Cell/B.E. architecture.
13310
96e946ca
RW
133112009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
13312
13313 * Makefile.in (datarootdir): New variable.
13314
58d6951d
DJ
133152009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
13316
13317 * linux-low.c (linux_write_memory): Update debugging output.
13318 * Makefile.in (clean): Add new descriptions.
13319 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
13320 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
13321 * configure.srv: Add new files for arm*-*-linux*.
13322 * linux-arm-low.c: Add new declarations.
13323 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
13324 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
13325 (HWCAP_VFPv3D16): New.
13326 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
13327 instead of __IWMMXT__.
13328 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
13329 (arm_arch_setup): New.
13330 (target_regsets): Remove #ifdef. Add VFP regset.
13331 (the_low_target): Use arm_arch_setup.
13332
12b42a12
DJ
133332009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
13334
13335 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
13336 the main thread again.
13337
ac8c974e
AR
133382009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
13339
13340 Adding Neutrino gdbserver.
13341 * configure: Regenerated.
13342 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
13343 * configure.srv (i[34567]86-*-nto*): New target.
13344 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
13345 * remote-utils.c [__QNX__]: Include sys/iomgr.h
13346 (nto_comctrl) [__QNX__]: New function.
13347 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
13348
4424e0c3 133492009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7437790a
PA
13350
13351 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
13352 srv_tgtobj.
13353
912cf4ba
PA
133542009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
13355 Pedro Alves <pedro@codesourcery.com>
13356
13357 * win32-i386-low.c (i386_get_thread_context): Handle systems that
13358 don't support CONTEXT_EXTENDED_REGISTERS.
13359 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
13360 (the_low_target): Install them.
13361 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
13362 failing with ERROR_PIPE_NOT_CONNECTED.
13363
aa5ca48f
DE
133642009-06-30 Doug Evans <dje@google.com>
13365 Pierre Muller <muller@ics.u-strasbg.fr>
13366
13367 Add h/w watchpoint support to x86-linux, win32-i386.
13368 * Makefile.in (SFILES): Add i386-low.c
13369 (i386_low_h): Define.
13370 (i386-low.o): Add dependencies.
13371 (linux-x86-low.o): Add i386-low.h dependency.
13372 (win32-i386-low.o): Ditto.
13373 * i386-low.c: New file.
13374 * i386-low.h: New file.
13375 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
13376 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
13377 * linux-low.c (linux_add_process): Initialize arch_private.
13378 (linux_remove_process): Free arch_private.
13379 (add_lwp): Initialize arch_private.
13380 (delete_lwp): Free arch_private.
13381 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
13382 provided.
13383 * linux-low.h (process_info_private): New member arch_private.
13384 (lwp_info): New member arch_private.
13385 (linux_target_ops): New members new_process, new_thread,
13386 prepare_to_resume.
13387 (ptid_of): New macro.
13388 * linux-x86-low.c: Include stddef.h, i386-low.h.
13389 (arch_process_info): New struct.
13390 (arch_lwp_info): New struct.
13391 (x86_linux_dr_get, x86_linux_dr_set): New functions.
13392 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
13393 (i386_dr_low_get_status): New function.
13394 (x86_insert_point, x86_remove_point): New functions.
13395 (x86_stopped_by_watchpoint): New function.
13396 (x86_stopped_data_address): New function.
13397 (x86_linux_new_process, x86_linux_new_thread): New functions.
13398 (x86_linux_prepare_to_resume): New function.
13399 (the_low_target): Add entries for insert_point, remove_point,
13400 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
13401 prepare_to_resume.
13402 * server.c (debug_hw_points): New global.
13403 (monitor_show_help): Document set debug-hw-points.
13404 (handle_query): Process "set debug-hw-points".
13405 * server.h (debug_hw_points): Declare.
13406 (paddress): Declare.
13407 * utils.c (NUMCELLS, CELLSIZE): New macros.
13408 (get_sell, xsnprintf, paddress): New functions.
13409 * win32-arm-low.c (the_low_target): Add entries for insert_point,
13410 remove_point, stopped_by_watchpoint, stopped_data_address.
13411 * win32-i386-low.c: Include i386-low.h.
13412 (debug_reg_state): Replaces dr.
13413 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
13414 (i386_dr_low_get_status): New function.
13415 (i386_insert_point, i386_remove_point): New functions.
13416 (i386_stopped_by_watchpoint): New function.
13417 (i386_stopped_data_address): New function.
13418 (i386_initial_stuff): Update.
13419 (get_thread_context,set_thread_context,i386_thread_added): Update.
13420 (the_low_target): Add entries for insert_point,
13421 remove_point, stopped_by_watchpoint, stopped_data_address.
13422 * win32-low.c (win32_insert_watchpoint): New function.
13423 (win32_remove_watchpoint): New function.
13424 (win32_stopped_by_watchpoint): New function.
13425 (win32_stopped_data_address): New function.
13426 (win32_target_ops): Add entries for insert_watchpoint,
13427 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
13428 * win32-low.h (win32_target_ops): New members insert_point,
13429 remove_point, stopped_by_watchpoint, stopped_data_address.
13430
d993e290
PA
134312009-06-25 Pedro Alves <pedro@codesourcery.com>
13432
13433 * server.c (process_serial_event): Re-return unsupported, not
13434 error, if the type isn't recognized. Re-allow supporting only
13435 insert or remove packets. Also call require_running for
13436 breakpoints. Add missing break statement to default case. Tidy.
13437 * target.h (struct target_ops): Rename insert_watchpoint to
13438 insert_point, and remove_watchpoint to remove_point.
13439
13440 * linux-low.h (struct linux_target_ops): Likewise.
13441 * linux-low.c (linux_insert_watchpoint): Rename to ...
13442 (linux_insert_point): ... this. Adjust.
13443 (linux_remove_watchpoint): Rename to ...
13444 (linux_remove_point): ... this. Adjust.
13445 (linux_target_ops): Adjust.
13446 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
13447 (cris_insert_point): ... this.
13448 (cris_remove_watchpoint): Rename to ...
13449 (cris_remove_point): ... this.
13450 (the_low_target): Adjust.
13451
0f54c268
PM
134522009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
13453
13454 * server.c (handle_v_kill): Pass signal_pid to
13455 kill_inferior if multi_process is zero.
13456
c6314022
AR
134572009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
13458
13459 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
13460 * target.h (target_ops): Comment for *_watchpoint to make it clear
13461 the functions can get types '0' and '1'.
13462
4463ce24
AR
134632009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
13464
13465 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
13466 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
13467 * regcache.c (get_regcache): Likewise.
13468 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
13469 * win32-low.c (child_fetch_inferior_registers): Remove check for
13470 regno 0.
13471
cf8fd78b
PA
134722009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
13473 Pedro Alves <pedro@codesourcery.com>
13474
13475 * target.h (struct target_ops) <supports_multi_process>: New
13476 callback.
13477 (target_supports_multi_process): New.
13478 * server.c (handle_query): Even if GDB reports support, only
13479 enable multi-process if the target also supports it. Report
13480 multi-process support only if the target backend supports it.
13481 * linux-low.c (linux_supports_multi_process): New function.
13482 (linux_target_ops): Install it as target_supports_multi_process
13483 callback.
13484
47c0c975
DE
134852009-05-24 Doug Evans <dje@google.com>
13486
e09875d4
DE
13487 Global renaming of find_thread_pid to find_thread_ptid.
13488 * server.h (find_thread_ptid): Renamed from find_thread_pid.
13489 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
13490 All callers updated.
13491
e27d73f6
DE
13492 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
13493 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
13494 directly.
13495
47c0c975
DE
13496 * linux-low.c (get_stop_pc): Print pc if debug_threads.
13497 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
13498 (linux_resume_one_lwp): Ditto.
13499
2acc282a
DE
135002009-05-23 Doug Evans <dje@google.com>
13501
13502 * linux-low.c (linux_resume_one_lwp): Change type of first arg
13503 from struct inferior_list_entry * to struct lwp_info *.
13504 All callers updated.
13505
9f1036c1
DE
135062009-05-13 Doug Evans <dje@google.com>
13507
13508 * linux-x86-low.c: Don't include assert.h.
13509 (x86_siginfo_fixup): Use fatal, not assert.
13510 (x86_arch_setup): Fix comment.
13511
d0722149
DE
135122009-05-12 Doug Evans <dje@google.com>
13513
13514 Biarch support for i386/amd64 gdbserver.
13515 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
13516 Add linux-x86-low.c.
13517 (linux-i386-low.o, linux-x86-64-low.o): Delete.
13518 (linux-x86-low.o): Add.
13519 * linux-x86-64-low.c: Delete.
13520 * linux-i386-low.c: Delete.
13521 * linux-x86-low.c: New file.
13522 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
13523 linux-x86-low.o.
13524 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
13525 linux-x86-low.o.
13526 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
13527 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
13528 (linux_child_pid_to_exec_file): New function.
13529 (elf_64_header_p, elf_64_file_p): New functions.
13530 (siginfo_fixup): New function.
13531 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
13532 give target a chance to convert layout.
13533 * linux-low.h (linux_target_ops): New member siginfo_fixup.
13534 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
13535
fdeb2a12
DE
135362009-05-07 Doug Evans <dje@google.com>
13537
13538 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
13539 (regsets_store_inferior_registers): Ditto.
13540
a6dbe5df
PA
135412009-05-06 Pedro Alves <pedro@codesourcery.com>
13542
13543 PR server/10048
13544
13545 * linux-low.c (must_set_ptrace_flags): Delete.
13546 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
13547 of the global.
13548 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
13549 `lwp->must_set_ptrace_flags' instead.
ba42693b 13550 (linux_wait_for_event_1): Set ptrace options here.
a6dbe5df
PA
13551 (linux_wait_1): ... not here.
13552
5091eb23
DE
135532009-04-30 Doug Evans <dje@google.com>
13554
9f767825
DE
13555 * inferiors.c (started_inferior_callback): New function.
13556 (attached_inferior_callback): New function.
13557 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
13558 * server.c (print_started_pid, print_attached_pid): New functions.
13559 (detach_or_kill_for_exit): New function.
13560 (main): Call it instead of for_each_inferior (kill_inferior_callback).
13561 * server.h (have_started_inferiors_p): Declare.
13562 (have_attached_inferiors_p): Declare.
13563
5091eb23
DE
13564 * inferiors.c (remove_process): Fix memory leak, free process.
13565 * linux-low.c (linux_remove_process): New function.
13566 (linux_kill): Call it instead of remove_process.
13567 (linux_detach, linux_wait_1): Ditto.
13568
155c8968
PA
135692009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
13570
13571 * configure.srv: Add x86 Windows CE target.
13572
7fe519cb
UW
135732009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
13574
13575 * inferiors.c (get_thread_process): Make global.
13576 * server.h (get_thread_process): Add prototype.
13577 * thread-db.c (find_one_thread): Use get_thread_process
13578 instead of current_process.
13579 (thread_db_get_tls_address): Do not crash if called when
13580 thread layer is not yet initialized.
13581
5472f405
UW
135822009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
13583
13584 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
13585 * spu-low.c (current_tid): Rename to ...
13586 (current_ptid): ... this.
13587 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
13588 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
13589 ptid_get_lwp (current_ptid) instead of current_tid.
13590 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
13591 instead of current_tid. Use find_process_pid to verify pid
13592 argument is valid. Pass proper argument to remove_process.
13593 (spu_thread_alive): Compare current_ptid instead of current_tid.
13594 (spu_resume): Likewise.
13595
55ac2b99
PA
135962009-04-02 Pedro Alves <pedro@codesourcery.com>
13597
13598 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
13599 variable.
13600
95954743
PA
136012009-04-01 Pedro Alves <pedro@codesourcery.com>
13602
13603 Implement the multiprocess extensions, and add linux multiprocess
13604 support.
13605
13606 * server.h (ULONGEST): Declare.
13607 (struct ptid, ptid_t): New.
13608 (minus_one_ptid, null_ptid): Declare.
13609 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
13610 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
13611 (struct inferior_list_entry): Change `id' type from unsigned from
13612 to ptid_t.
13613 (struct sym_cache, struct breakpoint, struct
13614 process_info_private): Forward declare.
13615 (struct process_info): Declare.
13616 (current_process): Declare.
13617 (all_processes): Declare.
13618 (initialize_inferiors): Declare.
13619 (add_thread): Adjust to use ptid_t.
13620 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
13621 (add_process, remove_process, find_thread_pid): Declare.
13622 (find_inferior_id): Adjust to use ptid_t.
13623 (cont_thread, general_thread, step_thread): Change type to ptid_t.
13624 (multi_process): Declare.
13625 (push_event): Adjust to use ptid_t.
13626 (read_ptid, write_ptid): Declare.
13627 (prepare_resume_reply): Adjust to use ptid_t.
13628 (clear_symbol_cache): Declare.
13629 * inferiors.c (all_processes): New.
13630 (null_ptid, minus_one_ptid): New.
13631 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
13632 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
13633 (add_thread): Change unsigned long to ptid. Remove gdb_id
13634 parameter. Adjust.
13635 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
13636 (gdb_id_to_thread): Rename to ...
13637 (find_thread_pid): ... this. Change unsigned long to ptid.
13638 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
13639 (loaded_dll, pull_pid_from_list): Adjust.
13640 (add_process, remove_process, find_process_pid)
13641 (get_thread_process, current_process, initialize_inferiors): New.
13642 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
13643 (struct target_waitstatus) <related_pid>: Ditto.
13644 (struct target_ops) <kill, detach>: Add `pid' argument. Change
13645 return type to int.
13646 (struct target_ops) <join>: Add `pid' argument.
13647 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
13648 (struct target_ops) <wait>: Add `ptid' field. Change return type
13649 to ptid.
13650 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
13651 (mywait): Add `ptid' argument. Change return type to ptid_t.
13652 (target_pid_to_str): Declare.
13653 * target.c (set_desired_inferior): Adjust to use ptids.
13654 (mywait): Add new `ptid' argument. Adjust.
13655 (target_pid_to_str): New.
13656 * mem-break.h (free_all_breakpoints): Declare.
13657 * mem-break.c (breakpoints): Delelete.
13658 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
13659 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
13660 to use per-process breakpoint list.
13661 (free_all_breakpoints): New.
13662 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
13663 (symbol_cache, all_symbols_looked_up): Delete.
13664 (hexchars): New.
13665 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
13666 read_ptid): New.
13667 (prepare_resume_reply): Change ptid argument's type from unsigned
13668 long to ptid_t. Adjust. Implement W;process and X;process.
13669 (free_sym_cache, clear_symbol_cache): New.
13670 (look_up_one_symbol): Adjust to per-process symbol cache. *
13671 * server.c (cont_thread, general_thread, step_thread): Change type
13672 to ptid_t.
13673 (attached): Delete.
13674 (multi_process): New.
13675 (last_ptid): Change type to ptid_t.
13676 (struct vstop_notif) <ptid>: Change type to ptid_t.
13677 (queue_stop_reply, push_event): Change `ptid' argument's type to
13678 ptid_t.
13679 (discard_queued_stop_replies): Add `pid' argument.
13680 (start_inferior): Adjust to use ptids. Adjust to mywait interface
13681 changes. Don't reference the `attached' global.
13682 (attach_inferior): Adjust to mywait interface changes.
13683 (handle_query): Adjust to use ptids. Parse GDB's qSupported
13684 features. Handle and report "multiprocess+". Handle
13685 "qAttached:PID".
13686 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
13687 changes.
13688 (handle_v_kill): New.
13689 (handle_v_stopped): Adjust to use target_pid_to_str.
13690 (handle_v_requests): Allow multiple attaches and runs when
13691 multiprocess extensions are in effect. Handle "vKill".
13692 (myresume): Adjust to use ptids.
13693 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
13694 (handle_status): Adjust to discard_queued_stop_replies interface
13695 change.
13696 (first_thread_of, kill_inferior_callback)
13697 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
13698 (main): Call initialize_inferiors. Adjust to use ptids, killing
13699 and detaching from all inferiors. Handle multiprocess packet
13700 variants.
13701 * linux-low.h: Include gdb_proc_service.h.
13702 (struct process_info_private): New.
13703 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
13704 <lwpid_of>: Use ptid_get_lwp.
13705 (get_lwp_thread): Adjust.
13706 (struct lwp_info): Add `dead' member.
13707 (find_lwp_pid): Declare.
13708 * linux-low.c (thread_db_active): Delete.
13709 (new_inferior): Adjust comment.
13710 (inferior_pid): Delete.
13711 (linux_add_process): New.
13712 (handle_extended_wait): Adjust.
13713 (add_lwp): Change unsigned long to ptid.
13714 (linux_create_inferior): Add process to processes table. Adjust
13715 to use ptids. Don't set new_inferior here.
13716 (linux_attach_lwp): Rename to ...
13717 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
13718 it. Adjust to use ptids.
13719 (linux_attach_lwp): New.
13720 (linux_attach): Add process to processes table. Don't set
13721 new_inferior here.
13722 (struct counter): New.
13723 (second_thread_of_pid_p, last_thread_of_process_p): New.
13724 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
13725 multiple processes.
13726 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
13727 processes. Remove process from process table.
13728 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
13729 to multiple processes.
13730 (any_thread_of): New.
13731 (linux_detach): Add `pid' argument, and handle it. Remove process
13732 from processes table.
13733 (linux_join): Add `pid' argument. Handle it.
13734 (linux_thread_alive): Change unsighed long argument to ptid_t.
13735 Consider dead lwps as not being alive.
13736 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
13737 threads we're not interested in.
13738 (same_lwp, find_lwp_pid): New.
13739 (linux_wait_for_lwp): Change `pid' argument's type from int to
13740 ptid_t. Adjust.
13741 (linux_wait_for_event): Rename to ...
13742 (linux_wait_for_event_1): ... this. Change `pid' argument's type
13743 from int to ptid_t. Adjust.
13744 (linux_wait_for_event): New.
13745 (linux_wait_1): Add `ptid' argument. Change return type to
13746 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
13747 that exit from the process table.
13748 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
13749 Adjust.
13750 (mark_lwp_dead): New.
13751 (wait_for_sigstop): Adjust to use ptids. If a process exits while
13752 stopping all threads, mark its main lwp as dead.
13753 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
13754 ptids.
13755 (fetch_register, usr_store_inferior_registers)
13756 (regsets_fetch_inferior_registers)
13757 (regsets_store_inferior_registers, linux_read_memory)
13758 (linux_write_memory): Inline `inferior_pid'.
13759 (linux_look_up_symbols): Adjust to use per-process
13760 `thread_db_active'.
13761 (linux_request_interrupt): Adjust to use ptids.
13762 (linux_read_auxv): Inline `inferior_pid'.
13763 (initialize_low): Don't reference thread_db_active.
13764 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
13765 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
13766 (ps_getpid): Return the pid of the current inferior.
13767 * thread-db.c (proc_handle, thread_agent): Delete.
13768 (thread_db_create_event, thread_db_enable_reporting): Adjust to
13769 per-process data.
13770 (find_one_thread): Change argument type to ptid_t. Adjust to
13771 per-process data.
13772 (maybe_attach_thread): Adjust to per-process data and ptids.
13773 (thread_db_find_new_threads): Ditto.
13774 (thread_db_init): Ditto.
13775 * spu-low.c (spu_create_inferior, spu_attach): Add process to
13776 processes table. Adjust to use ptids.
13777 (spu_kill, spu_detach): Adjust interface. Remove process from
13778 processes table.
13779 (spu_join, spu_thread_alive): Adjust interface.
13780 (spu_wait): Adjust interface. Remove process from processes
13781 table. Adjust to use ptids.
13782 * win32-low.c (current_inferior_tid): Delete.
13783 (current_inferior_ptid): New.
13784 (debug_event_ptid): New.
13785 (thread_rec): Take a ptid. Adjust.
13786 (child_add_thread): Add `pid' argument. Adjust to use ptids.
13787 (child_delete_thread): Ditto.
13788 (do_initial_child_stuff): Add `attached' argument. Add process to
13789 processes table.
13790 (child_fetch_inferior_registers, child_store_inferior_registers):
13791 Adjust.
13792 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
13793 (win32_attach): Pass 1 to do_initial_child_stuff.
13794 (win32_kill): Adjust interface. Remove process from processes
13795 table.
13796 (win32_detach): Ditto.
13797 (win32_join): Adjust interface.
13798 (win32_thread_alive): Take a ptid.
13799 (win32_resume): Adjust to use ptids.
13800 (get_child_debug_event): Ditto.
13801 (win32_wait): Adjust interface. Remove exiting process from
13802 processes table.
13803
bd99dc85
PA
138042009-04-01 Pedro Alves <pedro@codesourcery.com>
13805
13806 Non-stop mode support.
13807
13808 * server.h (non_stop): Declare.
13809 (gdb_client_data, handler_func): Declare.
13810 (delete_file_handler, add_file_handler, start_event_loop):
13811 Declare.
13812 (handle_serial_event, handle_target_event, push_event)
13813 (putpkt_notif): Declare.
13814 * target.h (enum resume_kind): New.
13815 (struct thread_resume): Replace `step' field by `kind' field.
13816 (TARGET_WNOHANG): Define.
13817 (struct target_ops) <wait>: Add `options' argument.
13818 <supports_non_stop, async, start_non_stop>: New fields.
13819 (target_supports_non_stop, target_async): New.
13820 (start_non_stop): Declare.
13821 (mywait): Add `options' argument.
13822 * target.c (mywait): Add `options' argument. Print child exit
13823 notifications here.
13824 (start_non_stop): New.
13825 * server.c (non_stop, own_buf, mem_buf): New globals.
13826 (struct vstop_notif): New.
13827 (notif_queue): New global.
13828 (queue_stop_reply, push_event, discard_queued_stop_replies)
13829 (send_next_stop_reply): New.
13830 (start_inferior): Adjust to use resume_kind. Adjust to mywait
13831 interface changes.
13832 (attach_inferior): In non-stop mode, don't wait for the target
13833 here.
13834 (handle_general_set): Handle QNonStop.
13835 (handle_query): When handling qC, return the current general
13836 thread, instead of the first thread of the list.
13837 (handle_query): If the backend supports non-stop mode, include
13838 QNonStop+ in the qSupported query response.
13839 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
13840 and non-stop mode.
13841 (handle_v_attach, handle_v_run): Handle non-stop mode.
13842 (handle_v_stopped): New.
13843 (handle_v_requests): Report support for vCont;t. Handle vStopped.
13844 (myresume): Adjust to use resume_kind. Handle non-stop.
13845 (queue_stop_reply_callback): New.
13846 (handle_status): Handle non-stop mode.
13847 (main): Clear non_stop flag on reconnection. Use the event-loop.
13848 Refactor serial protocol handling from here ...
13849 (process_serial_event): ... to this new function. When GDB
13850 selects any thread, select one here. In non-stop mode, wait until
13851 GDB acks all pending events before exiting.
13852 (handle_serial_event, handle_target_event): New.
13853 * remote-utils.c (remote_open): Install remote_desc in the event
13854 loop.
13855 (remote_close): Remove remote_desc from the event loop.
13856 (putpkt_binary): Rename to...
13857 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
13858 (putpkt_binary): New as wrapper around putpkt_binary_1.
13859 (putpkt_notif): New.
13860 (prepare_resume_reply): In non-stop mode, don't change the
13861 general_thread.
13862 * event-loop.c: New.
13863 * Makefile.in (OBJ): Add event-loop.o.
13864 (event-loop.o): New rule.
13865
13866 * linux-low.h (pid_of): Moved here.
13867 (lwpid_of): New.
13868 (get_lwp_thread): Use lwpid_of.
13869 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
13870 * linux-low.c (pid_of): Delete.
13871 (inferior_pid): Use lwpid_of.
13872 (linux_event_pipe): New.
13873 (target_is_async_p): New.
13874 (delete_lwp): New.
13875 (handle_extended_wait): Use lwpid_of.
13876 (add_lwp): Don't set lwpid field.
13877 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
13878 (linux_kill_one_lwp): If killing a running lwp, stop it first.
13879 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
13880 (linux_detach_one_lwp): If detaching from a running lwp, stop it
13881 first. Adjust to linux_wait_for_event interface changes. Use
13882 lwpid_of.
13883 (linux_detach): Don't delete the main lwp here.
13884 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
13885 (status_pending_p): Don't consider explicitly suspended lwps.
13886 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
13887 pointer. Add OPTIONS argument. Change return type to int. Use
13888 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
13889 (linux_wait_for_event): Take an integer pid instead of a lwp_info
13890 pointer. Add status pointer argument. Return a pid instead of a
13891 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
13892 changes. In non-stop mode, don't switch to a random thread.
13893 (linux_wait): Rename to...
13894 (linux_wait_1): ... this. Add target_options argument, and handle
13895 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
13896 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
13897 clean exit and signal exit code. Don't stop all threads in
13898 non-stop mode. In all-stop mode, only stop all threads when
13899 reporting a stop to GDB. Handle explicit thread stop requests.
13900 (async_file_flush, async_file_mark): New.
13901 (linux_wait): New.
13902 (send_sigstop): Use lwpid_of.
13903 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
13904 interface changes. In non-stop mode, don't switch to a random
13905 thread.
13906 (linux_resume_one_lwp): Use lwpid_of.
13907 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
13908 (linux_resume_one_thread): ... this. Handle resume_stop. In
13909 non-stop mode, don't look for pending flag in all threads.
13910 (resume_status_pending_p): Don't consider explicitly suspended
13911 threads.
13912 (my_waitpid): Reimplement. Emulate __WALL.
13913 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
13914 Use lwpid_of.
13915 (sigchld_handler, linux_supports_non_stop, linux_async)
13916 (linux_start_non_stop): New.
13917 (linux_target_ops): Register linux_supports_non_stop, linux_async
13918 and linux_start_non_stop.
13919 (initialize_low): Install SIGCHLD handler.
13920 * thread-db.c (thread_db_create_event, find_one_thread)
13921 (thread_db_get_tls_address): Use lwpid_of.
13922 * win32-low.c (win32_detach): Adjust to use resume_kind.
13923 (win32_wait): Add `options' argument.
13924 * spu-low.c (spu_resume): Adjust to use resume_kind.
13925 (spu_wait): Add `options' argument.
13926
5b1c542e
PA
139272009-04-01 Pedro Alves <pedro@codesourcery.com>
13928
13929 Decouple target code from remote protocol.
13930
13931 * target.h (enum target_waitkind): New.
13932 (struct target_waitstatus): New.
13933 (struct target_ops) <wait>: Return an unsigned long. Take a
13934 target_waitstatus pointer instead of a char pointer.
13935 (mywait): Likewise.
13936 * target.c (mywait): Change prototype to return an unsigned long.
13937 Take a target_waitstatus pointer instead of a char pointer. Adjust.
13938 * server.h (thread_from_wait, old_thread_from_wait): Delete
13939 declarations.
13940 (prepare_resume_reply): Change prototype to take a
13941 target_waitstatus.
13942 * server.c (thread_from_wait, old_thread_from_wait): Delete.
13943 (last_status, last_ptid): New.
13944 (start_inferior): Remove "statusptr" argument. Adjust. Return a
13945 pid instead of a signal.
13946 (attach_inferior): Remove "status" and "signal" parameters.
13947 Adjust.
13948 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
13949 not as an address.
13950 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
13951 (handle_v_requests, myresume): Remove "status" and "signal"
13952 parameters. Adjust.
13953 (handle_status): New.
13954 (main): Delete local `status'. Adjust.
13955 * remote-utils.c: Include target.h.
13956 (prepare_resume_reply): Change prototype to take a
13957 target_waitstatus. Adjust.
13958
13959 * linux-low.c (linux_wait): Adjust to new target_ops->wait
13960 interface.
13961 * spu-low.c (spu_wait): Adjust.
13962 * win32-low.c (enum target_waitkind, struct target_waitstatus):
13963 Delete.
13964 (win32_wait): Adjust.
13965
2bd7c093
PA
139662009-04-01 Pedro Alves <pedro@codesourcery.com>
13967
13968 * target.h (struct thread_resume): Delete leave_stopped member.
13969 (struct target_ops): Add a `n' argument to the `resume' callback.
13970 * server.c (start_inferior): Adjust.
13971 (handle_v_cont, myresume): Adjust.
13972 * linux-low.c (check_removed_breakpoint): Adjust to resume
13973 interface change, and to removed leave_stopped field.
13974 (resume_ptr): Delete.
13975 (struct thread_resume_array): New.
13976 (linux_set_resume_request): Add new `arg' parameter. Adjust to
13977 resume interface change.
13978 (linux_continue_one_thread, linux_queue_one_thread)
13979 (resume_status_pending_p): Check if the resume field is NULL
13980 instead of checking the leave_stopped member.
13981 (linux_resume): Adjust to the target resume interface change.
13982 * spu-low.c (spu_resume): Adjust to the target resume interface
13983 change.
13984 * win32-low.c (win32_detach, win32_resume): Ditto.
13985
c35fafde
PA
139862009-04-01 Pedro Alves <pedro@codesourcery.com>
13987
13988 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
13989 flag.
13990 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
13991 pending.
13992 (linux_continue_one_thread): Only preserve the stepping flag if
13993 there's a pending breakpoint.
13994
0a59d50b
PA
139952009-03-31 Pedro Alves <pedro@codesourcery.com>
13996
13997 * server.c (main): After the inferior having exited, call
13998 remote_close before exiting gdbserver.
13999
f04c6d38
TJB
140002009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
14001
14002 Fix size of FPSCR in Power 7 processors.
14003 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
14004 (PPC_FEATURE_HAS_DFP): New #define.
14005 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
14006 size of the FPSCR.
14007
78e5cee6
PA
140082009-03-23 Pedro Alves <pedro@codesourcery.com>
14009
14010 * server.c (handle_query) Whitespace and formatting.
14011
1b3f6016
PA
140122009-03-22 Pedro Alves <pedro@codesourcery.com>
14013
14014 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
14015 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
14016 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
14017 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
14018 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
14019 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
14020 Makefile.in, configure.ac: Fix whitespace throughout.
14021 * configure: Regenerate.
14022
a07b2135
PA
140232009-03-22 Pedro Alves <pedro@codesourcery.com>
14024
14025 * inferiors.c (find_inferior): Make it safe for the callback
14026 function to delete the currently iterated inferior.
14027
67cc2626
PA
140282009-03-22 Pedro Alves <pedro@codesourcery.com>
14029
14030 * Makefile.in (linuw_low_h): Move higher.
14031 (thread-db.o): Depend on $(linux_low_h).
14032
54a0b537
PA
140332009-03-17 Pedro Alves <pedro@codesourcery.com>
14034
14035 Rename "process" to "lwp" throughout.
14036
14037 * linux-low.c (all_processes): Rename to...
14038 (all_lwps): ... this.
14039 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
14040 (add_process): Rename to ...
14041 (add_lwp): ... this. Adjust.
14042 (linux_create_inferior): Adjust.
14043 (linux_attach_lwp): Adjust.
14044 (linux_attach): Adjust.
14045 (linux_kill_one_process): Rename to ...
14046 (linux_kill_one_lwp): ... this. Adjust.
14047 (linux_kill): Adjust.
14048 (linux_detach_one_process): Rename to ...
14049 (linux_detach_one_lwp): ... this. Adjust.
14050 (linux_detach): Adjust.
14051 (check_removed_breakpoint): Adjust.
14052 (status_pending_p): Adjust.
14053 (linux_wait_for_process): Rename to ...
14054 (linux_wait_for_lwp): ... this. Adjust.
14055 (linux_wait_for_event): Adjust.
14056 (send_sigstop): Adjust.
14057 (wait_for_sigstop): Adjust.
14058 (stop_all_processes): Rename to ...
14059 (stop_all_lwps): ... this.
14060 (linux_resume_one_process): Rename to ...
14061 (linux_resume_one_lwp): ... this. Adjust.
14062 (linux_set_resume_request, linux_continue_one_thread)
14063 (linux_queue_one_thread, resume_status_pending_p)
14064 (usr_store_inferior_registers, regsets_store_inferior_registers)
14065 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
14066 Adjust.
14067 * linux-low.h (get_process): Rename to ...
14068 (get_lwp): ... this. Adjust.
14069 (get_thread_process): Rename to ...
14070 (get_thread_lwp): ... this. Adjust.
14071 (get_process_thread): Rename to ...
14072 (get_lwp_thread): ... this. Adjust.
14073 (struct process_info): Rename to ...
14074 (struct lwp_info): ... this.
14075 (all_processes): Rename to ...
14076 (all_lwps): ... this.
14077 * proc-service.c (ps_lgetregs): Adjust.
14078 * thread-db.c (thread_db_create_event, find_one_thread)
14079 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
14080
0b16c5cf
PA
140812009-03-14 Pedro Alves <pedro@codesourcery.com>
14082
14083 * server.c (handle_query): Handle "qAttached".
14084
32de4b9d
NS
140852009-03-13 Nathan Sidwell <nathan@codesourcery.com>
14086
14087 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
14088 GPLv3, update license URL.
14089
2aecd87f
DE
140902009-03-01 Doug Evans <dje@google.com>
14091
93efd302 14092 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
2aecd87f
DE
14093 (server_h): Add gdb_signals.h.
14094 (signals.o): Update.
14095 * server.h (target_signal_from_host,target_signal_to_host_p)
14096 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
14097
86b1f9c5
PM
140982009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
14099
14100 * remote-utils.c (getpkt): Also generate remote-debug
14101 information if noack_mode is set.
14102
4aa995e1
PA
141032009-02-06 Pedro Alves <pedro@codesourcery.com>
14104
14105 * server.c (handle_query): Report qXfer:siginfo:read and
14106 qXfer:siginfo:write as supported and handle them.
14107 * target.h (struct target_ops) <qxfer_siginfo>: New field.
14108 * linux-low.c (linux_xfer_siginfo): New.
14109 (linux_target_ops): Set it.
14110
62709adf
PA
141112009-01-26 Pedro Alves <pedro@codesourcery.com>
14112
14113 * server.c (gdbserver_usage): Mention --remote-debug.
14114 (main): Accept '--remote-debug' switch.
14115
aef93bd7
DE
141162009-01-18 Doug Evans <dje@google.com>
14117
14118 * regcache.c (new_register_cache): No need to check result of xcalloc.
14119 * server.c (handle_search_memory): Back out calls to xmalloc,
14120 result is checked and error is returned to user upon failure.
14121 (handle_query): Ditto. Add more checks for result of malloc.
14122 (handle_v_cont): Check result of malloc, report error back to
14123 user upon failure.
14124 (handle_v_run): Ditto. Call freeargv.
14125 * server.h (freeargv): Declare.
14126 * utils.c (freeargv): New fn.
14127
54363045
DE
141282009-01-15 Doug Evans <dje@google.com>
14129
f626972c
DE
14130 * gdbreplay.c (perror_with_name): Make arg const char *.
14131 * server.h (target_signal_to_name): Make return type const char *.
0842e787 14132 * thread-db.c (thread_db_err_str): Make return type const char *.
f626972c 14133 * utils.c (perror_with_name): Make arg const char *.
54363045 14134
18aae699
PA
141352009-01-14 Pedro Alves <pedro@codesourcery.com>
14136
14137 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
14138 when handling a EXIT_PROCESS_DEBUG_EVENT.
14139
ff703abe
JB
141402009-01-06 Joel Brobecker <brobecker@adacore.com>
14141
14142 * gdbreplay.c (gdbreplay_version): Update copyright year.
14143 * server.c (gdbserver_version): Likewise.
14144
f21cc1a2 141452009-01-05 Doug Evans <dje@google.com>
0e21c1ec
DE
14146
14147 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
f21cc1a2 14148 (handle_extended_wait): Improve comment.
0e21c1ec 14149
bca929d3
DE
141502008-12-13 Doug Evans <dje@google.com>
14151
14152 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
14153 * server.h (ATTR_MALLOC): New macro.
14154 (xmalloc,xcalloc,xstrdup): Declare.
14155 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
14156 * inferiors.c: Ditto.
14157 * linux-low.c: Ditto.
14158 * mem-break.c: Ditto.
14159 * regcache.c: Ditto.
14160 * remote-utils.c: Ditto.
14161 * server.c: Ditto.
14162 * target.c: Ditto.
14163 * win32-low.c: Ditto.
14164
97438e3f
DE
141652008-12-12 Doug Evans <dje@google.com>
14166
896c7fbb
DE
14167 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
14168 in debugging printf.
14169
97438e3f
DE
14170 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
14171
e3b886f8
DE
141722008-12-09 Doug Evans <dje@google.com>
14173
14174 * linux-low.h (struct process_info): Delete member tid, unused.
14175 * thread-db.c (find_one_thread): Update.
14176 (maybe_attach_thread): Update.
14177
07e059b5
VP
141782008-12-02 Pedro Alves <pedro@codesourcery.com>
14179
889bf7c5
PA
14180 * target.h (struct target_ops): Add qxfer_osdata member.
14181 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
14182 and dirent.h.
14183 (linux_qxfer_osdata): New functions.
14184 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
14185 callback.
14186 * server.c (handle_query): Handle "qXfer:osdata:read:".
14187 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
14188 (buffer_xml_printf): New functions.
14189 * server.h (struct buffer): New.
14190 (buffer_grow_str, buffer_grow_str0): New macros.
14191 (buffer_grow, buffer_free, buffer_init, buffer_finish)
14192 (buffer_xml_printf): Declare.
07e059b5 14193
4cab47ab
DE
141942008-11-24 Doug Evans <dje@google.com>
14195
14196 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
14197
f142445f
DJ
141982008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
14199
14200 * server.c (handle_v_run): Always use the supplied argument list.
14201
d0107bb6 142022008-11-19 Bob Wilson <bob.wilson@acm.org>
889bf7c5 14203
d0107bb6
BW
14204 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
14205 (xtensa_regmap_table): Add entry for scompare1.
889bf7c5 14206
2c4ad781
TJB
142072008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
14208
14209 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
14210 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
14211 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
14212 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
14213 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
14214 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
14215 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
14216 XML target descriptions.
14217 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
14218 when inferior is running on an ISA 2.05 or later processor. Add
14219 special case to return offset for full 64-bit slot of FPSCR when
14220 in 32-bits.
14221
dfb64f85
DJ
142222008-11-14 Daniel Gutson <dgutson@codesourcery.com>
14223
14224 * Makefile.in (SFILES, clean): Added sparc64 files.
14225 (reg-sparc64.o, reg-sparc64.c): New.
14226 * configure.srv (sparc*-*-linux*): New configuration.
14227 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
14228 syscall arguments for SPARC.
14229 (regsets_store_inferior_registers): Likewise.
14230 * linux-sparc-low.c: New file.
14231
66b6e1dd
DE
142322008-10-21 Doug Evans <dje@google.com>
14233
14234 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
14235 (READLINE_DIR,READLINE_DEP): Delete.
14236 (INTERNAL_CFLAGS): Update.
14237 (LINTFLAGS): Update.
14238
9b710a42
PA
142392008-10-10 Pedro Alves <pedro@codesourcery.com>
14240
14241 * server.c (handle_v_run): If GDB didn't specify an argv, use the
14242 whole argv from the last run, not just argv[0].
14243
5822d809
PA
142442008-09-08 Pedro Alves <pedro@codesourcery.com>
14245
14246 * regcache.c (new_register_cache): Return NULL if the register
14247 cache size isn't known yet.
14248 (free_register_cache): Avoid dereferencing a NULL regcache.
14249
74aac56f
DJ
142502008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
14251
14252 * configure.srv: Merge MIPS and MIPS64.
14253
400b20f5
MR
142542008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
14255
14256 * Makefile.in (uninstall): Apply $(EXEEXT) too.
14257
677c5bb1
LM
142582008-08-18 Luis Machado <luisgpm@br.ibm.com>
14259
14260 * Makefile.in: Add required vsx dependencies.
14261
14262 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
14263 Declare init_registers_powerpc_vsx32l.
14264 Declare init_registers_powerpc_vsx64l.
14265 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
14266 (ppc_arch_setup): Check for VSX in hwcap.
14267 (ppc_fill_vsxregset): New function.
14268 (ppc_store_vsxregset): New function.
14269 Add new VSX entry in regset_info target_regsets.
14270
14271 * configure.srv: Add new VSX dependencies.
14272
a6f3e723
SL
142732008-08-12 Pedro Alves <pedro@codesourcery.com>
14274
14275 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
14276 (remote_open): Set or clear transport_is_reliable.
14277 (putpkt_binary): Don't expect acks in noack mode.
14278 (getpkt): Don't send ack/nac in noack mode.
14279 * server.c (handle_general_set): Handle QStartNoAckMode.
14280 (handle_query): If connected by tcp pass QStartNoAckMode+ in
14281 qSupported.
14282 (main): Reset noack_mode on every connection.
14283 * server.h (noack_mode): Declare.
14284
a417dc56
RW
142852008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
14286
14287 * Makefile.in (GDBREPLAY_OBS): New variable.
14288 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
14289
3221518c
UW
142902008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
14291 Daniel Jacobowitz <dan@codesourcery.com>
14292
14293 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
14294 (usr_store_inferior_registers): Likewise.
14295 (regsets_store_inferior_registers): Likewise.
14296
ec56be1b
PA
142972008-07-31 Rolf Jansen <rj@surtec.com>
14298 Pedro Alves <pedro@codesourcery.com>
14299
14300 * configure.ac: Check for memmem declaration.
14301 * server.c [HAVE_MALLOC_H]: Include malloc.h.
14302 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
14303 (disable_packet_qfThreadInfo): Unconditionally compile.
14304 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
14305 * configure, config.in: Regenerate.
14306
2fe5e3ff
DE
143072008-07-28 Doug Kwan <dougkwan@google.com>
14308
14309 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
14310 (linux_write_memory): Remove declaration of errno.
14311
836acd6d
UW
143122008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
14313
14314 * linux-low.c (handle_extended_wait): Do not use "status"
14315 variable uninitialized.
14316
aeba519e
PA
143172008-07-07 Pedro Alves <pedro@codesourcery.com>
14318
14319 * server.c (handle_v_attach): Inhibit reporting dll changes.
14320
db42f210
PA
143212008-06-27 Pedro Alves <pedro@codesourcery.com>
14322
14323 * remote-utils.c (prepare_resume_reply): If requested, don't
14324 output "thread:TID" in the T stop reply.
14325
14326 * server.c (disable_packet_vCont, disable_packet_Tthread)
14327 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
14328 (handle_query): If requested, disable support for qC, qfThreadInfo
14329 and qsThreadInfo.
14330 (handle_v_requests): If requested, disable support for vCont.
14331 (gdbserver_show_disableable): New.
14332 (main): Handle --disable-packet and --disable-packet=LIST.
14333
14334 * server.h (disable_packet_vCont, disable_packet_Tthread)
14335 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
14336
8e4c5421
CD
143372008-06-20 Carlos O'Donell <carlos@codesourcery.com>
14338
14339 * server.c (gdbserver_usage): Mention --version.
14340
6e23a804
DJ
143412008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
14342
14343 * Makefile.in (gdbreplay.o): New rule.
14344
90aa6a40
JM
143452008-06-06 Joseph Myers <joseph@codesourcery.com>
14346
14347 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
14348 message, not gdbserver.
14349
c16158bc 143502008-06-05 Vladimir Prus <vladimir@codesourcery.com>
889bf7c5
PA
14351 Nathan Sidwell <nathan@codesourcery.com>
14352 Joseph Myers <joseph@codesourcery.com>
c16158bc
JM
14353
14354 * acinclude.m4: Include ../../config/acx.m4.
14355 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
14356 * configure, config.in: Regenerate.
14357 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
14358 * server.c (gdbserver_version): Print PKGVERSION.
14359 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
14360 (main): Adjust gdbserver_usage calls.
14361 * gdbreplay.c (version, host_name): Add declarations.
14362 (gdbreplay_version, gdbreplay_usage): New.
14363 (main): Accept --version and --help options.
14364
aeb75bf5
DJ
143652008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
14366
14367 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
14368 (arm_breakpoint_at): Handle Thumb.
14369 (the_low_target): Add comment.
14370
76b233dd
UW
143712008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
14372
14373 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
14374
08388c79
DE
143752008-05-09 Doug Evans <dje@google.com>
14376
a3c83fae
DE
14377 * server.h (decode_search_memory_packet): Declare.
14378 * remote-utils.c (decode_search_memory_packet): New fn.
14379 * server.c (handle_search_memory_1): New fn.
08388c79
DE
14380 (handle_search_memory): New fn.
14381 (handle_query): Process qSearch:memory packets.
14382
bb9c3d36
UW
143832008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
14384
14385 * regcache.c (registers_length): Remove.
14386 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
14387 full register packet.
14388 * regcache.h (registers_length): Remove prototype.
14389 * server.h (PBUFSIZ): Define to 16384.
14390
7284e1be
UW
143912008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
14392
14393 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
14394 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
14395 powerpc-64l.o, and powerpc-altivec64l.o.
14396 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
14397 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
14398 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
14399 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
14400 rs6000/power-linux.xml, and rs6000/power64-linux.xml
14401 to srv_xmlfiles.
14402
14403 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
14404 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
14405 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
14406 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
14407 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
14408 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
14409 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
14410 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
14411 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
14412 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
14413 (clean): Update.
14414
14415 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
14416 (init_registers_powerpc_32l): ... this new prototype.
14417 (init_registers_powerpc_32): Remove, replace by ...
14418 (init_registers_powerpc_altivec32l): ... this new prototype.
14419 (init_registers_powerpc_e500): Remove, replace by ...
14420 (init_registers_powerpc_e500l): ... this new prototype.
14421 (init_registers_ppc64): Remove, replace by ...
14422 (init_registers_powerpc_64l): ... this new prototype.
14423 (init_registers_powerpc_64): Remove, replace by ...
14424 (init_registers_powerpc_altivec64l): ... this new prototype.
14425 (ppc_num_regs): Set to 73.
14426 (PT_ORIG_R3, PT_TRAP): Define if necessary.
14427 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
14428 (ppc_cannot_store_register): Handle orig_r3 and trap.
14429 (ppc_arch_setup): Update init_registers_... calls.
14430 (ppc_fill_gregset): Handle orig_r3 and trap.
14431
14432 * inferiors.c (clear_inferiors): Reset current_inferior.
14433
fdc59709
PB
144342008-04-23 Paolo Bonzini <bonzini@gnu.org>
14435
889bf7c5
PA
14436 * acinclude.m4: Add override.m4.
14437 * configure: Regenerate.
fdc59709 14438
c9b2f845
UW
144392008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
14440
14441 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
14442 initial call to init_register_ppc64.
14443
550512b8
UW
144442008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
14445
43aaf8b6
PA
14446 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
14447 single powerpc*-*-linux* case.
550512b8
UW
14448 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
14449
b6430ec3
UW
144502008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
14451
14452 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
889bf7c5 14453 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
b6430ec3
UW
14454 from reg_xmlfiles.
14455 * linux-ppc-low.c: Include <elf.h>.
14456 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
14457 (ppc_hwcap): New global variable.
14458 (ppc_regmap): Remove __SPE__ #ifdef sections.
14459 (ppc_regmap_e500): New global variable.
14460 (ppc_cannot_store_register): Update __SPE__ special case.
14461 (ppc_get_hwcap): New function.
14462 (ppc_arch_setup): Use it to determine whether inferior supports
14463 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
14464 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
14465 Do not access registers if target does not support AltiVec.
14466 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
14467 Do not access registers if target does not support SPE.
14468 (target_regsets): Unconditionally include AltiVec and SPE regsets.
14469
52fa2412
UW
144702008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
14471
14472 * linux-low.c (disabled_regsets, num_regsets): New.
14473 (use_regsets_p): Delete.
14474 (linux_wait_for_process): Clear disabled_regsets.
14475 (regsets_fetch_inferior_registers): Check and set it.
14476 (regsets_store_inferior_registers): Likewise.
14477 (linux_fetch_registers, linux_store_registers): Do not use
14478 use_regsets_p.
14479 (initialize_low): Allocate disabled_regsets.
14480
e28b3332
DJ
144812008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
14482
14483 * Makefile.in (LIBOBJS): New.
14484 (OBS): Use LIBOBJS.
14485 (memmem.o): New rule.
14486 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
14487 * configure: Regenerated.
14488
4536995d
UW
144892008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
14490
14491 * server.c (handle_query): Never return "unsupported" for
14492 qXfer:features:read queries.
14493
221c031f
UW
144942008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
14495
14496 * server.c (get_features_xml): Fix inverted condition.
14497 (handle_query): Always support qXfer:feature:read.
14498
ccd213ac
DJ
144992008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
14500
14501 * server.c (wrapper_argv): New.
14502 (start_inferior): Handle wrapper_argv. If set, expect an extra
14503 trap.
14504 (gdbserver_usage): Document --wrapper.
14505 (main): Parse --wrapper.
14506
6fe305f7
UW
145072008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
14508
14509 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
14510 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
14511 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
14512 (ppc_set_pc): Likewise.
14513 (ppc_arch_setup): New function.
14514 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
14515 of collect_register.
889bf7c5 14516 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
6fe305f7 14517
5b0a002e
UW
145182008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
14519
14520 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
14521 instead of linux-ppc64-low.o.
14522 * linux-ppc64-low.c: Remove file.
14523 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
14524 (linux-ppc64-low.o): Remove rule.
14525
14526 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
14527 (init_registers_powerpc_64): Likewise.
14528 (ppc_regmap): Conditionally define depending on __powerpc64__.
14529 (ppc_cannot_store_register): Do not special-case "fpscr" when
14530 compiled on __powerpc64__.
14531 (ppc_collect_ptrace_register): New function.
14532 (ppc_supply_ptrace_register): New function.
14533 (ppc_breakpoint): Change type to "unsigned int".
14534 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
14535 (the_low_target): Conditionally provide initializers for the
889bf7c5 14536 arch_setup member depending on __powerpc64__. Install
5b0a002e
UW
14537 collect_ptrace_register and supply_ptrace_register members.
14538
9b4b61c8
UW
145392008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
14540
14541 * regcache.h (gdbserver_xmltarget): Add extern declaration.
14542 * server.c (gdbserver_xmltarget): Define.
14543 (get_features_xml): Use it to replace "target.xml" and arch_string.
14544
14545 * configure.srv: Remove srv_xmltarget. Add XML files that were
14546 mentioned there to srv_xmlfiles instead. Remove conditional tests
14547 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
14548 srv_xmlfiles and srv_regobj to include all possible choices.
14549 * configure.ac (srv_xmltarget): Remove.
14550 (srv_xmlfiles): Do not add "target.xml".
14551 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
14552 checks for supplementary target information.
14553 * configure: Regenerate.
14554 * Makefile.in (XML_TARGET): Remove.
14555 (target.xml): Remove rule.
14556 (clean): Do not clean up target.xml.
14557 (.PRECIOUS): Do not mention target.xml.
14558
14559 * target.h (struct target_ops): Remove arch_string member.
14560 * linux-low.c (linux_arch_string): Remove.
14561 (linux_target_ops): Remove arch_string initializer.
14562 * linux-low.h (struct linux_target_ops): Remove arch_string member.
14563 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
14564 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
14565 * spu-low.c (spu_arch_string): Remove.
14566 (spu_target_ops): Remove arch_string initializer.
14567 * win32-low.c (win32_arch_string): Remove.
14568 (win32_target_ops): Remove arch_string initializer.
14569 * win32-low.h (struct win32_target_ops): Remove arch_string member.
14570 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
14571 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
14572
ee1a7ae4
UW
145732008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
14574
14575 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
14576 by collect_ptrace_register and supply_ptrace_register hooks.
14577 * linux-low.c (fetch_register): Use supply_ptrace_register callback
14578 instead of checking for the_low_target.left_pad_xfer.
14579 (usr_store_inferior_registers): Use collect_ptrace_register callback
14580 instead of checking for the_low_target.left_pad_xfer.
14581
14582 * linux-s390-low.c (s390_collect_ptrace_register): New function.
14583 (s390_supply_ptrace_register): Likewise.
14584 (s390_fill_gregset): Call s390_collect_ptrace_register.
14585 (the_low_target): Update.
14586
14587 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
14588 (ppc_supply_ptrace_register): Likewise.
14589 (the_low_target): Update.
14590
14591 * linux-i386-low.c (the_low_target): Update.
14592 * linux-x86-64-low.c (the_low_target): Update.
14593
d61ddec4
UW
145942008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
14595
14596 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
14597 reg-s390.o and reg-s390x.o.
14598
14599 * linux-low.c (new_inferior): New global variable.
14600 (linux_create_inferior, linux_attach): Set it.
14601 (linux_wait_for_process): Call the_low_target.arch_setup after the
14602 target has stopped for the first time.
14603 (initialize_low): Do not call the_low_target.arch_setup.
14604
14605 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
14606 (s390_set_pc): Likewise.
14607 (s390_arch_setup): New function.
14608 (the_low_target): Use s390_arch_setup as arch_setup routine.
14609
14610 * regcache.c (realloc_register_cache): New function.
14611 (set_register_cache): Call it for each existing regcache.
14612
d05b4ac3
UW
146132008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
14614
14615 * server.h (init_registers): Remove prototype.
14616
14617 * linux-low.h (struct linux_target_ops): Add arch_setup field.
14618 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
14619 instead of init_registers ().
14620 * linux-arm-low.c (init_registers_arm): Add prototype.
14621 (init_registers_arm_with_iwmmxt): Likewise.
14622 (the_low_target): Add initializer for arch_setup field.
14623 * linux-cris-low.c (init_registers_cris): Add prototype.
14624 (the_low_target): Add initializer for arch_setup field.
14625 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
14626 (the_low_target): Add initializer for arch_setup field.
14627 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
14628 (the_low_target): Add initializer for arch_setup field.
14629 * linux-ia64-low.c (init_registers_ia64): Add prototype.
14630 (the_low_target): Add initializer for arch_setup field.
14631 * linux-m32r-low.c (init_registers_m32r): Add prototype.
14632 (the_low_target): Add initializer for arch_setup field.
14633 * linux-m68k-low.c (init_registers_m68k): Add prototype.
14634 (the_low_target): Add initializer for arch_setup field.
14635 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
14636 (init_registers_mips64_linux): Likewise.
14637 (the_low_target): Add initializer for arch_setup field.
14638 * linux-ppc-low.c (init_registers_ppc): Add prototype.
14639 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
14640 (the_low_target): Add initializer for arch_setup field.
14641 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
14642 (init_registers_powerpc_64): Likewise.
14643 (the_low_target): Add initializer for arch_setup field.
14644 * linux-s390-low.c (init_registers_s390): Add prototype.
14645 (init_registers_s390x): Likewise.
14646 (the_low_target): Add initializer for arch_setup field.
14647 * linux-sh-low.c (init_registers_sh): Add prototype.
14648 (the_low_target): Add initializer for arch_setup field.
14649 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
14650 (the_low_target): Add initializer for arch_setup field.
14651 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
14652 (the_low_target): Add initializer for arch_setup field.
14653
14654 * win32-low.h (struct win32_target_ops): Add arch_setup field.
14655 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
14656 instead of init_registers ().
14657 * win32-arm-low.c (init_registers_arm): Add prototype.
14658 (the_low_target): Add initializer for arch_setup field.
14659 * win32-i386-low.c (init_registers_i386): Add prototype.
14660 (the_low_target): Add initializer for arch_setup field.
14661
14662 * spu-low.c (init_registers_spu): Add prototype.
14663 (initialize_low): Call initialie_registers_spu () instead of
14664 initialize_registers ().
14665
fd96d250
PA
146662008-02-19 Pedro Alves <pedro@codesourcery.com>
14667
14668 * server.c (handle_v_requests): When handling the vRun and vAttach
14669 packets, if already debugging a process, don't kill it. Return an
14670 error instead.
14671
d41b6bb4
DJ
146722008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
14673
14674 * server.c (handle_query): Correct length check.
14675
5ac588cf
PA
146762008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
14677
14678 * win32-low.c (do_initial_child_stuff): Add process handle
14679 parameter. Set current_process_handle and current_process_id from the
14680 parameters. Clear globals.
14681 (win32_create_inferior): Don't set current_process_handle and
14682 current_process_id here. Instead pass them on the call to
14683 do_initial_child_stuff.
14684 (win32_attach): Likewise.
14685 (win32_clear_inferiors): New.
14686 (win32_kill): Don't close the current process handle or the
14687 current thread handle here. Instead call win32_clear_inferiors.
14688 (win32_detach): Don't open a new handle to the process. Call
14689 win32_clear_inferiors.
14690 (win32_join): Don't rely on current_process_handle; open a new
14691 handle using the process id.
14692 (win32_wait): Call win32_clear_inferiors when the inferior process
14693 has exited.
14694
ecd7ecbc
DJ
146952008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
14696
14697 * server.c (monitor_show_help): Add "exit".
14698
1525d545
MG
146992008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
14700
ecd7ecbc 14701 * Makefile.in (SFILES): Add linux-xtensa-low.c.
1525d545
MG
14702 (clean): Add reg-xtensa.c.
14703 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
ecd7ecbc
DJ
14704 * configure.srv (xtensa*-*-linux*) New target.
14705 * linux-xtensa-low.c: New.
14706 * xtensa-xtregs.c: New.
1525d545 14707
59a016f0
PA
147082008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
14709
14710 * hostio.c: Don't include errno.h.
14711 (errno_to_fileio_errno): Move to hostio-errno.
14712 * hostio.c: (hostio_error): Remove the error parameter. Defer the
14713 error number outputting to the target->hostio_last_error callback.
14714 (hostio_packet_error): Use FILEIO_EINVAL directly.
14715 (handle_open, handle_pread, hostio_error, handle_unlink): Update
14716 calls to hostio_error.
14717 * hostio-errno.c: New.
14718 * server.h (hostio_last_error_from_errno): Declare.
14719 * target.h (target_ops): Add hostio_last_error member.
14720 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
14721 as hostio_last_error handler.
889bf7c5 14722 * spu-low.c (spu_target_ops): Likewise.
59a016f0
PA
14723 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
14724 (wince_hostio_last_error): New functions.
14725 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
14726 as hostio_last_error handler.
14727 (win32_target_ops) [!_WIN32_WCE]: Register
14728 hostio_last_error_from_errno as hostio_last_error handler.
14729 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
14730 (hostio-errno.o): New rule.
14731 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
14732 * configure.srv (srv_hostio_err_objs): New variable. Default to
14733 hostio-errno.o.
14734 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
14735 * configure: Regenerate.
14736
2d717e4f
DJ
147372008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
14738
14739 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
14740 (linux_kill, linux_detach): Clean up the process list.
14741 * remote-utils.c (remote_open): Improve port number parsing.
14742 (putpkt_binary, input_interrupt): Only send interrupts if the target
14743 is running.
14744 * server.c (extended_protocol): Make static.
14745 (attached): Define earlier.
14746 (exit_requested, response_needed, program_argv): New variables.
14747 (target_running): New.
14748 (start_inferior): Clear attached here.
14749 (attach_inferior): Set attached here.
14750 (require_running): Define.
14751 (handle_query): Use require_running and target_running. Implement
14752 "monitor exit".
14753 (handle_v_attach, handle_v_run): New.
14754 (handle_v_requests): Use require_running. Handle vAttach and vRun.
14755 (gdbserver_usage): Update.
14756 (main): Redo argument parsing. Handle --debug and --multi. Handle
14757 --attach along with other options or after the port. Save
14758 program_argv. Support no initial program. Resynchronize
14759 communication with GDB after an error. Handle "monitor exit".
14760 Use require_running and target_running. Always allow the extended
14761 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
14762 restart in extended mode.
14763 * README: Refer to the GDB manual. Update --attach usage.
14764
7407e2de
AS
147652007-12-20 Andreas Schwab <schwab@suse.de>
14766
14767 * linux-low.c (STACK_SIZE): Define.
14768 (linux_tracefork_child): Use it. Use __clone2 on ia64.
14769 (linux_test_for_tracefork): Likewise.
14770
b65d95c5
DJ
147712007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
14772
14773 * linux-low.c (linux_wait_for_event): Update messages. Do not
14774 reinsert auto-delete breakpoints.
14775 * mem-break.c (struct breakpoint): Change return type of handler to
14776 int.
14777 (set_breakpoint_at): Update handler type.
14778 (reinsert_breakpoint_handler): Return 1 instead of calling
14779 delete_breakpoint.
14780 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
14781 setting a new one.
14782 (check_breakpoints): Delete auto-delete breakpoints and return 2.
14783 * mem-break.h (set_breakpoint_at): Update handler type.
14784 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
14785 * win32-low.c (auto_delete_breakpoint): New.
14786 (get_child_debug_event): Use it.
14787
4e799345
DJ
147882007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
14789
14790 * configure.ac: Check for pread and pwrite.
14791 * hostio.c (handle_pread): Fall back to lseek and read.
14792 (handle_pwrite): Fall back to lseek and write.
14793 * config.in, configure: Regenerated.
14794
27524b67
DJ
147952007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
14796
14797 * server.c (myresume): Add own_buf argument.
14798 (main): Update calls.
14799
a20d5e98
DJ
148002007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
14801
14802 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
14803 * remote-utils.c (remote_open): Do not call disable_async_io.
14804 (block_async_io): Delete.
14805 (unblock_async_io): Make static.
14806 (initialize_async_io): New.
14807 * server.c (handle_v_cont): Handle async I/O here.
14808 (myresume): Likewise. Move other common resume tasks here...
14809 (main): ... from here. Call initialize_async_io. Disable async
14810 I/O before the main loop.
14811 * server.h (initialize_async_io): Declare.
14812 (block_async_io, unblock_async_io): Delete prototypes.
14813 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
14814
b79d787e
DJ
148152007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
14816
14817 * remote-utils.c (readchar): Allow binary data in received messages.
14818
d97903b2
PA
148192007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14820
14821 * win32-low.c (attaching): New global.
14822 (win32_create_inferior): Clear the `attaching' global.
14823 (win32_attach): Set the `attaching' global.
14824 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
14825 attaching. Only set a breakpoint at the entry point if not
14826 attaching.
14827
311de423
PA
148282007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14829
14830 * server.c (main): Don't report dll events on the initial
14831 connection on attaches.
14832
6c2d16d2
PA
148332007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14834
14835 * server.c (main): Relax numerical bases supported for the pid of
14836 the --attach command line argument.
14837
5ca906e6
PA
148382007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14839
14840 * win32-low.c (win32_attach): Call OpenProcess before
14841 DebugActiveProcess, not after. Add last error output to error
14842 call.
14843
9c6c8194
PA
148442007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14845
14846 * win32-low.c (win32_get_thread_context)
14847 (win32_set_thread_context): New functions.
14848 (thread_rec): Use win32_get_thread_context.
14849 (continue_one_thread, win32_resume): Use win32_set_thread_context.
14850 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
14851 field.
14852
4d5d1aaa
PA
148532007-12-03 Leo Zayas
14854 Pedro Alves <pedro_alves@portugalmail.pt>
14855
14856 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
14857 global variables.
14858 (child_add_thread): Minor cleanup.
14859 (child_continue): Resume artificially suspended threads before
14860 calling ContinueDebugEvent.
14861 (suspend_one_thread): New.
14862 (fake_breakpoint_event): New.
14863 (get_child_debug_event): Change return type to int. Check here if
14864 gdb sent an interrupt request. If a soft interrupt was requested,
14865 fake a breakpoint event. Return 0 if there is no event to handle,
14866 and 1 otherwise.
14867 (win32_wait): Don't check here if gdb sent an interrupt request.
14868 Ensure there is a valid event to handle.
14869 (win32_request_interrupt): Add soft interruption method as last
14870 resort.
14871
c436e841
PA
148722007-12-03 Leo Zayas
14873 Pedro Alves <pedro_alves@portugalmail.pt>
14874
14875 * win32-low.h (win32_thread_info): Add descriptions to the
14876 structure members. Replace `suspend_count' counter by a
14877 `suspended' flag.
14878 * win32-low.c (thread_rec): Update condition of when to get the
14879 context from the inferior. Rely on ContextFlags being set if it
14880 has already been retrieved. Only suspend the inferior thread if
14881 we haven't already. Warn if that fails.
14882 (continue_one_thread): s/suspend_count/suspended/. Only call
14883 ResumeThread once. Warn if that fails.
14884
e7b5fa67
PA
148852007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
14886
14887 * win32-low.c (win32_wait): Don't read from the inferior when it
14888 has already exited.
14889
a385171d
PA
148902007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
14891
14892 * Makefile.in (win32_low_h): New variable.
14893 (win32-low.o): Add dependency on $(win32_low_h).
14894 (win32-arm-low.o, win32-i386-low.o): New rules.
14895
f80c84b3
DJ
148962007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
14897
14898 * hostio.c: Correct copyright year.
14899
a6b151f1
DJ
149002007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
14901
14902 * Makefile.in (OBS): Add hostio.o.
14903 (hostio.o): New rule.
14904 * server.h (handle_vFile): Declare.
14905 * hostio.c: New file.
14906 * server.c (handle_v_requests): Take packet_len and new_packet_len
14907 for binary packets. Call handle_vFile.
14908 (main): Update call to handle_v_requests.
14909
f9387fc3
DJ
149102007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
14911
14912 * linux-low.c: Include <sched.h>.
14913
51c2684e
DJ
149142007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
14915
14916 * linux-low.c (linux_tracefork_grandchild): New.
14917 (linux_tracefork_child): Use clone.
14918 (linux_test_for_tracefork): Use clone; allocate and free a stack.
14919
75f83163
JB
149202007-10-31 Joel Brobecker <brobecker@adacore.com>
14921
14922 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
14923
da5898ce
DJ
149242007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
14925
14926 * linux-low.c (handle_extended_wait): Handle unexpected signals.
14927
24a09b5f
DJ
149282007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
14929
14930 * inferiors.c (change_inferior_id): Delete.
14931 (add_pid_to_list, pull_pid_from_list): New.
14932 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
14933 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
14934 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
14935 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
14936 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
14937 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
14938 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
14939 (using_threads): Always set to 1.
14940 (handle_extended_wait): New.
14941 (add_process): Do not set TID.
14942 (linux_create_inferior): Set must_set_ptrace_flags.
14943 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
14944 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
14945 (linux_thread_alive): Rename TID argument to LWPID.
14946 (linux_wait_for_process): Handle unknown processes. Do not use TID.
14947 (linux_wait_for_event): Do not use TID or check using_threads. Update
14948 call to dead_thread_notify. Call handle_extended_wait.
14949 (linux_create_inferior): Use PTRACE_SETOPTIONS.
14950 (send_sigstop): Delete sigstop_sent.
14951 (wait_for_sigstop): Avoid TID.
14952 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
14953 (linux_test_for_tracefork): New.
14954 (linux_lookup_signals): Use thread_db_active and
14955 linux_supports_tracefork_flag.
14956 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
14957 * linux-low.h (get_process_thread): Avoid TID.
14958 (struct process_ifo): Move thread_known and tid to the end. Remove
14959 sigstop_sent.
14960 (linux_attach_lwp, thread_db_init): Update prototypes.
14961 * server.h (change_inferior_id): Delete prototype.
14962 (add_pid_to_list, pull_pid_from_list): New prototypes.
14963 * thread-db.c (thread_db_use_events): New.
14964 (find_first_thread): Rename to...
14965 (find_one_thread): ...this. Update callers and messages. Do not
14966 call fatal. Check thread_db_use_events. Do not call
14967 change_inferior_id or new_thread_notify.
14968 (maybe_attach_thread): Update. Do not call new_thread_notify.
14969 (thread_db_init): Set thread_db_use_events. Check use_events.
14970 * utils.c (fatal, warning): Correct message prefix.
14971
30ed0a8f
DJ
149722007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
14973
14974 * Makefile.in (clean): Remove new files.
14975 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
14976 (powerpc-64.o, powerpc-64.c): New rules.
14977 * configure.srv: Use alternate register sets for powerpc64-*-linux*
14978 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
14979 with SPE.
14980 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
14981 SPE targets.
14982 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
14983 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
14984 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
14985 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
14986 (target_regsets): Add AltiVec and SPE register sets.
14987 * configure.ac: Check for AltiVec and SPE.
14988 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
14989 (ppc_fill_vrregset, ppc_store_vrregset): New.
14990 (target_regsets): Add AltiVec register set.
14991 * configure: Regenerated.
14992
fd462a61
DJ
149932007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
14994
14995 * linux-low.c (O_LARGEFILE): Define.
14996 (linux_read_memory): Use /proc/PID/mem.
14997 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
14998 * configure, config.in: Regenerated.
14999
69f223ed
DJ
150002007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
15001
15002 * linux-low.c (linux_wait_for_event): Do not pass signals while
15003 single-stepping.
15004
aec18585
PA
150052007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
15006
15007 * win32-low.c (create_process): New.
15008 (win32_create_inferior): Use create_process instead of
15009 CreateProcess. If create_process failed retry appending an ".exe"
15010 suffix. Store the GetLastError result immediatelly after
15011 create_process calls and use it on the call to error.
15012
34d86ddd
PA
150132007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
15014
15015 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
15016
5a0e3bd0
JB
150172007-08-23 Joel Brobecker <brobecker@adacore.com>
15018
15019 * configure.ac: Switch license to GPLv3.
15020
f88c79e6
MS
150212007-08-01 Michael Snyder <msnyder@access-company.com>
15022
15023 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
15024
6b3d9b83
PA
150252007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
15026
15027 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
15028 typedef.
15029 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
15030 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
15031 CloseToolhelp32Snapshot.
15032 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
15033 CloseToolhelp32Snapshot.
15034
c588c53c
MS
150352007-07-27 Michael Snyder <michael.snyder@access-company.com>
15036
15037 * server.c (main): Check for inferior exit before main loop.
15038
aa0403d9
PA
150392007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
15040
15041 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
15042 instead of on tmp_desc.
15043
255e7678
DJ
150442007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
15045 Daniel Jacobowitz <dan@codesourcery.com>
15046
15047 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
15048 (add_thread): Minor cleanups.
15049 (clear_inferiors): Move lower in the file. Clear the DLL
15050 list.
15051 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
15052 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
15053 (xml_escape_text): New.
15054 * server.c (handle_query): Handle qXfer:libraries:read. Report it
15055 for qSupported.
15056 (handle_v_cont): Report errors.
15057 (gdbserver_version): Update.
15058 (main): Correct size of own_buf. Do not report initial DLL events.
15059 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
15060 (unloaded_dll, xml_escape_text): New.
15061 * win32-low.c (enum target_waitkind): Update comments.
15062 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
15063 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
15064 (win32_EnumProcessModules, win32_GetModuleInformation)
15065 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
15066 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
15067 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
15068 (win32_Module32First, win32_Module32Next, load_toolhelp)
15069 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
15070 (get_child_debug_event): Handle DLL events.
15071 (win32_wait): Likewise.
15072
0d37add9
DJ
150732007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
15074
15075 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
15076 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
15077
45e2715e
PA
150782007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
15079
15080 * win32-low.c (handle_output_debug_string): Ignore event if not
15081 waiting.
15082
c5674cf1
PA
150832007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
15084
15085 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
15086
2bbe3cc1
DJ
150872007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
15088
15089 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
15090
ae13219e
DJ
150912007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
15092
15093 * inferiors.c (change_inferior_id): Add comment.
15094 * linux-low.c (check_removed_breakpoint): Add an early
15095 prototype. Improve debug output.
15096 (linux_attach): Doc update.
15097 (linux_detach_one_process, linux_detach): Clean up before releasing
15098 each process.
15099 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
15100 * linux-low.h (struct process_info): Doc improvement.
15101 * mem-break.c (delete_all_breakpoints): New.
15102 * mem-break.h (delete_all_breakpoints): New prototype.
15103 * thread-db.c (find_first_thread): New.
15104 (thread_db_create_event): Call it instead of
15105 thread_db_find_new_threads. Clean up unused variables.
15106 (maybe_attach_thread): Remove first thread handling.
15107 (thread_db_find_new_threads): Use find_first_thread.
15108 (thread_db_get_tls_address): Likewise.
15109
4105de34
DJ
151102007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
15111
15112 * thread-db.c (thread_db_find_new_threads): Add prototype.
15113 (thread_db_create_event): Check for the main thread before adding
15114 a new thread.
15115 (maybe_attach_thread): Only enable event reporting if TID == 0.
15116 (thread_db_get_tls_address): Check for new threads.
15117
2b876972
DJ
151182007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
15119
15120 * linux-low.c (linux_create_inferior): Try execv before execvp.
15121 * spu-low.c (spu_create_inferior): Likewise.
15122
7a245884
DJ
151232007-06-13 Mike Frysinger <vapier@gentoo.org>
15124
15125 * linux-low.c (linux_create_inferior): Change execv to execvp.
15126 * spu-low.c (spu_create_inferior): Likewies.
15127
117ce543
DJ
151282007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
15129
15130 * Makefile.in (clean): Clean new files instead of deleted ones.
15131 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
15132 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
15133 rules.
15134 * configure.srv: Specify XML files and new regformats for MIPS and
15135 MIPS64 GNU/Linux.
15136 * linux-mips-low.c (mips_num_regs): Set to only used registers.
15137 (mips_regmap): Do not fetch $0. Remove unused registers. Add
15138 an entry for the restart register.
15139 (mips_cannot_fetch_register, mips_cannot_store_register)
15140 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
15141 register names to match the XML descriptions.
15142 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
15143 restart register instead of $0.
15144
0e7f50da
UW
151452007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
15146 Markus Deuling <deuling@de.ibm.com>
15147
15148 * remote-utils.c (decode_xfer_write): New function.
15149 * server.h (decode_xfer_write): Add prototype.
15150 * server.c (handle_query): Add PACKET_LEN argument. Support
15151 qXfer:spu:read and qXfer:spu:write packets.
15152 (main): Pass packet_len to handle_query.
15153 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
15154 * target.h (target_ops): Add qxfer_spu.
15155
374c1d38
UW
151562007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
15157
15158 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
15159 accessing non-seekable spufs files.
15160
bb63802a
UW
151612007-05-16 Markus Deuling <deuling@de.ibm.com>
15162
889bf7c5 15163 * server.c (handle_query): Add reply for qC packet.
bb63802a 15164
7390519e
PA
151652007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15166 Leo Zayas <lerele@champenstudios@com>
15167
15168 * server.h (check_remote_input_interrupt_request): New function.
15169 * remote_utils.c (INVALID_DESCRIPTOR): New define.
15170 (remote_desc): Initialize with INVALID_DESCRIPTOR.
15171 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
15172 (check_remote_input_interrupt_request): New function.
15173 * server.h (check_remote_input_interrupt_request): Declare.
3ecf0694 15174 * win32-low.c (winapi_DebugBreakProcess,
7390519e
PA
15175 winapi_GenerateConsoleCtrlEvent): New typedefs.
15176 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
15177 to 250 ms.
15178 (win32_wait): Check for remote interrupt request
15179 with check_remote_input_interrupt_request.
15180 (win32_request_interrupt): New function.
15181 (win32_target_op): Set request_interrupt to win32_request_interrupt.
15182
34b34921
PA
151832007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15184
15185 * win32-low.c (debug_registers_changed,
15186 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
15187 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
15188 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
15189 (thread_rec): Get context using the low target.
15190 (child_add_thread): Call thread_added on the low target,
15191 which does the same thing.
15192 (regptr): Delete.
15193 (do_initial_child_stuff): Remove debug registers references.
15194 Set context using the low target. Resume threads after
15195 setting the contexts.
15196 (child_continue): Remove dead variable. Remove debug
15197 registers references.
15198 (child_fetch_inferior_registers): Go through the low target.
15199 (do_child_store_inferior_registers): Remove.
15200 (child_store_inferior_registers): Go through the low target.
15201 (win32_resume): Remove debug registers references.
15202 Set context using the low target.
15203 (handle_exception): Change return type to void. Don't record
15204 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
15205 first chance exception.
889bf7c5 15206 (get_child_debug_event): Change return type to void. Remove
34b34921
PA
15207 goto loop. Always return after waiting for debug event.
15208 (win32_wait): Convert to switch statement. Handle spurious
15209 events.
15210
15211 * win32-i386-low.c (debug_registers_changed,
15212 debug_registers_used): New.
15213 (initial_stuff): Rename to ...
15214 (i386_initial_stuff): ... this. Clear debug registers
15215 state variables.
15216 (store_debug_registers): Delete.
15217 (i386_get_thread_context): New.
15218 (load_debug_registers): Delete.
15219 (i386_set_thread_context): New.
15220 (i386_thread_added): New.
15221 (single_step): Rename to ...
15222 (i386_single_step): ... this.
15223 (do_fetch_inferior_registers): Rename to ...
15224 (i386_fetch_inferior_register): ... this.
15225 (i386_store_inferior_register): New.
15226 (the_low_target): Adapt to new interface.
15227
15228 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
15229 (arm_get_thread_context): New.
15230 (arm_set_thread_context): New.
15231 (regptr): New.
15232 (do_fetch_inferior_registers): Rename to ...
15233 (arm_fetch_inferior_register): ... this.
15234 (arm_store_inferior_register): New.
15235 (arm_wince_breakpoint): Reimplement as unsigned long.
15236 (arm_wince_breakpoint_len): Define.
15237 (the_low_target): Adapt to new interface.
15238
15239 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
15240 load_debug_registers. Add get_thread_context, set_thread_context,
15241 thread_added and store_inferior_register. Rename
15242 fetch_inferior_registers to fetch_inferior_register.
15243 (regptr): Remove declaration.
15244
dd6953e1
PA
152452007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15246
15247 * linux-low.c (linux_detach): Change return type to int. Return 0.
15248 * spu-low.c (spu_detach): Likewise.
15249
444d6139
PA
152502007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15251
15252 * target.h (target_ops): Change return type of detach to int.
15253 Add join.
15254 (join_inferior): New.
15255 * server.c (main): Don't skip detach support on mingw32.
15256 If the inferior doesn't support detaching return error.
15257 Call join_inferior instead of using waitpid.
15258 * linux-low.c (linux_join): New.
15259 (linux_target_op): Add linux_join.
15260 * spu-low.c (spu_join): New.
15261 (spu_target_ops): Add spu_join.
15262 * win32-low.c (win32_detach): Adapt to new interface.
15263 Reopen current_process_handle before detaching. Issue a child
15264 resume before detaching.
15265 (win32_join): New.
15266 (win32_target_op): Add win32_join.
15267
1d5315fe
PA
152682007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15269
15270 * win32-low.c (win32-attach): Fix return value.
15271 * target.h (target_ops): Describe ATTACH return values.
15272
bf914831
PA
152732007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15274
15275 * win32-low.c (GETPROCADDRESS): Define.
15276 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
15277 (winapi_DebugSetProcessKillOnExit): Likewise.
15278 (win32_create_inferior): Force usage of ansi CreateProcessA.
15279 (win32_attach): Use GETPROCADDRESS.
15280 (win32_detach): Likewise.
15281
f72f3e60
PA
152822007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15283
15284 * win32-low.c (win32_wait): Don't use WSTOPSIG.
15285
ed50f18f
PA
152862007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
15287
15288 * win32-low.c: Commit leftover changes from 2007-03-29.
15289
0c2ead7e
DJ
152902007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
15291
15292 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
15293 fields short instead of int. Add explicit padding.
15294 (i387_cache_to_fsave): Remove unnecessary casts.
15295 (i387_fsave_to_cache): Doc fix.
15296 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
15297
73725ff3
DJ
152982007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
15299
15300 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
15301 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
15302
d99f33d8
PA
153032007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
15304
15305 * configure.srv (arm*-*-mingw32ce*): Move near the other
15306 arm targets.
15307
68070c10
PA
153082007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
15309
2482afc6 15310 * configure.ac: Add errno checking.
68070c10
PA
15311 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
15312 sys/file.h and malloc.h.
15313 (AC_CHECK_DECLS): Add perror.
15314 (srv_mingwce): Handle.
2482afc6 15315 * configure.srv (i[34567]86-*-cygwin*): Add
68070c10
PA
15316 win32-i386-low.o to srv_tgtobj.
15317 (i[34567]86-*-mingw*): Likewise.
15318 (arm*-*-mingw32ce*): Add case.
15319 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
15320 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
15321 [__MINGW32CE__] (strerror): New function.
15322 [__MINGW32CE__] (errno): Define to GetLastError.
15323 [__MINGW32CE__] (COUNTOF): New macro.
15324 (remote_open): Remove extra close call.
15325 * mem-break.c (delete_breakpoint_at): New function.
15326 * mem-break.h (delete_breakpoint_at): Declare.
15327 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
15328 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
15329 [USE_WIN32API] (read, write): Add char* casts.
15330 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
15331 * server.h: Include wincecompat.h on Windows CE.
15332 [HAVE_ERRNO_H]: Check.
15333 (perror): Declare if not declared.
15334 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
15335 (perror_with_name): Remove errno declaration.
15336 * wincecompat.h: New.
15337 * wincecompat.c: New.
15338 * win32-low.h: New.
15339 * win32-arm-low.c: New.
15340 * win32-i386-low.c: New.
15341 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
15342 (OUTMSG2): Make it safe.
15343 (_T): New macro.
15344 (COUNTOF): New macro.
15345 (NUM_REGS): Get it from the low target.
15346 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
15347 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
15348 (thread_rec): Let low target handle debug registers.
15349 (child_add_thread): Likewise.
15350 (child_init_thread_list): Likewise.
15351 (continue_one_thread): Likewise.
15352 (regptr): New.
15353 (do_child_fetch_inferior_registers): Move to ...
15354 * win32-i386-low.c: ... here, and rename to ...
15355 (do_fetch_inferior_registers): ... this.
889bf7c5 15356 * win32-low.c (child_fetch_inferior_registers):
68070c10
PA
15357 Go through the low target.
15358 (do_child_store_inferior_registers): Use regptr.
15359 (strwinerror): New function.
15360 (win32_create_inferior): Handle Windows CE.
15361 Use strwinerror instead of strerror on Windows error
15362 codes. Add program to the error output.
15363 Don't close the main thread handle on Windows CE.
15364 (win32_attach): Use coredll.dll on Windows CE.
15365 (win32_kill): Close current process and current
15366 thread handles.
15367 (win32_detach): Use coredll.dll on Windows CE.
15368 (win32_resume): Let low target handle debug registers, and
15369 step request.
15370 (handle_exception): Add/Remove initial breakpoint. Avoid
15371 non-existant WSTOPSIG on Windows CE.
15372 (win32_read_inferior_memory): Cast to remove warning.
15373 (win32_arch_string): Go through the low target.
15374 (initialize_low): Call set_breakpoint_data with the low
15375 target's breakpoint.
15376 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
15377 FOP_REGNUM, mappings): Move to ...
15378 * win32-i386-low.c: ... here.
15379 * win32-low.c (win32_thread_info): Move to ...
15380 * win32-low.h: ... here.
15381 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
15382 win32-arm-low.c and wincecompat.c.
15383 (all:): Add $EXEEXT.
15384 (install-only:): Likewise.
15385 (gdbserver:): Likewise.
15386 (gdbreplay:): Likewise.
15387 * config.in: Regenerate.
15388 * configure: Regenerate.
15389
41093d81
PA
153902007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
15391
15392 * win32-low.c: Rename typedef thread_info to
15393 win32_thread_info throughout.
15394
544afa54
PA
153952007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
15396
15397 * win32-i386-low.c: Rename to ...
15398 * win32-low.c: ... this.
15399 * configure.srv: Replace win32-i386-low.o with win32-low.o.
15400 * Makefile.in: Likewise.
15401
bce7165d
PA
154022007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
15403
15404 * remote-utils.c (monitor_output): Constify msg parameter.
15405 * server.h (monitor_output): Likewise.
15406 * win32-i386-low.c (handle_output_debug_string): New.
15407 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
15408 handle_output_debug_string.
15409 (get_child_debug_event): Likewise.
15410
506c7aa0
DJ
154112007-03-27 Mat Hostetter <mat@lcs.mit.edu>
15412
15413 * server.c (main): Correct strtoul check.
15414
42c81e2a
DJ
154152007-03-27 Jon Ringle <jon@ringle.org>
15416
15417 * linux-low.c: Check __ARCH_HAS_MMU__ also.
15418
9453113a
DJ
154192007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
15420
15421 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
15422
64a69107
DJ
154232007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
15424
15425 * terminal.h: Check HAVE_SGTTY_H.
15426
154272007-02-27 Mat Hostetter <mat@lcs.mit.edu>
6f8486da
DJ
15428
15429 * remote-utils.c (remote_open): Print out the assigned port number.
15430
c74d0ad8
DJ
154312007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
15432
15433 * remote-utils.c (monitor_output): New function.
15434 * server.c (debug_threads): Define here.
15435 (monitor_show_help): New function.
15436 (handle_query): Handle qRcmd.
15437 (main): Do not handle 'd' packet.
15438 * server.h (debug_threads, remote_debug, monitor_output): Declare.
15439 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
15440 of debug_threads.
15441
de7c3b4a
PA
154422007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
15443
15444 * Makefile.in (EXEEXT): New.
15445 (clean): Use $(EXEEXT).
15446
ef57601b
PA
154472007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
15448
15449 * target.h (target_ops): Rename send_signal to request_interrupt,
15450 and remove enum target_signal parameter.
15451 * linux-low.c (linux_request_interrupt): Rename from
15452 linux_send_signal, and always send SIGINT.
15453 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
15454 and always send SIGINT.
15455 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
15456 of send_signal.
15457 (input_interrupt): Likewise.
15458
820f2bda
PA
154592007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
15460
15461 * server.c (get_features_xml): Check if target implemented
15462 arch_string.
15463 * win32-i386-low.c (win32_arch_string): New.
15464 (win32_target_ops): Add win32_arch_string as arch_string member.
15465
ab39bf24
UW
154662007-02-22 Markus Deuling <deuling@de.ibm.com>
15467
15468 * spu-low.c (spu_arch_string): New.
15469 (spu_target_ops): Add spu_arch_string.
15470
61ff6e04
DJ
154712007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
15472
15473 * remote-utils.c: Remove HAVE_TERMINAL_H check.
15474 * configure.ac: Do not check for terminal.h.
15475 * configure, config.in: Regenerated.
15476
fb1e4ffc
DJ
154772007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
15478
15479 * Makefile.in (OBS): Add $(XML_BUILTIN).
15480 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
15481 (clean): Update.
15482 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
15483 (arm-with-iwmmxt.c): New.
15484 * config.in, configure: Regenerate.
15485 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
15486 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
15487 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
15488 (arm*-*-linux*): Add iWMMXt and regset support.
15489 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
15490 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
15491 (arm_store_wmmxregset, target_regsets): New.
15492 * server.c (get_features_xml): Take annex argument. Check builtin
15493 XML documents.
15494 (handle_query): Handle multiple annexes.
15495
0f48aa01
DJ
154962007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
15497
15498 * remote-utils.c [USE_WIN32API] (read, write): Define.
15499 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
15500 write.
15501
23181151
DJ
155022007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
15503
15504 * linux-i386-low.c (the_low_target): Set arch_string.
15505 * linux-x86-64-low.c (the_low_target): Likewise.
15506 * linux-low.c (linux_arch_string): New.
15507 (linux_target_ops): Add it.
15508 * linux-low.h (struct linux_target_ops): Add arch_string.
15509 * server.c (write_qxfer_response): Use const void * for DATA.
15510 (get_features_xml): New.
15511 (handle_query): Handle qXfer:features:read. Report it for qSupported.
15512 * target.h (struct target_ops): Add arch_string method.
15513
9d606399
DJ
155142007-01-03 Denis Pilat <denis.pilat@st.com>
15515 Daniel Jacobowitz <dan@codesourcery.com>
15516
15517 * linux-low.c (linux_kill): Handle being called with no threads.
15518 * win32-i386-low.c (win32_kill): Likewise.
15519 (get_child_debug_event): Clear current_process_handle.
15520
155212006-12-30 Denis PILAT <denis.pilat@st.com>
8264bb58
DJ
15522 Daniel Jacobowitz <dan@codesourcery.com>
15523
15524 * remote-utils.c (remote_open): Check the type of specified
15525 serial port devices before opening them.
15526 * server.c (main): Kill the inferior if an error occurs during
15527 the first remote_open.
15528
a5e13d24
DJ
155292006-12-05 Markus Deuling <deuling@de.ibm.com>
15530
15531 * README: Update supported targets.
15532
186947f7
DJ
155332006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
15534
15535 * Makefile.in (clean): Remove reg-mips64.c.
15536 (reg-mips64.c, reg-mips64.o): New rules.
15537 * configure.srv: Handle mips64. Include regset support for mips.
15538 * linux-mips-low.c (union mips_register): New.
15539 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
15540 (mips_breakpoint, mips_breakpoint_at): Use int.
15541 (mips_collect_register, mips_supply_register)
15542 (mips_collect_register_32bit, mips_supply_register_32bit)
15543 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
15544 (mips_store_fpregset, target_regsets): New.
15545 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
15546
a13e2c95
UW
155472006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
15548
15549 * configure.srv: Add target "spu*-*-*".
15550 * Makefile.in (clean): Remove reg-spu.c.
15551 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
15552 * spu-low.c: New file.
15553
cb7283db
DJ
155542006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
15555
15556 * configure.ac: Correct td_thr_tls_get_addr test.
15557 * configure: Regenerated.
15558
89be2091
DJ
155592006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
15560
15561 * linux-low.c (linux_wait_for_event): Reformat. Use the
15562 pass_signals array.
15563 * remote-utils.c (decode_address_to_semicolon): New.
15564 * server.c (pass_signals, handle_general_set): New.
15565 (handle_query): Mention QPassSignals for qSupported.
15566 (main): Call handle_general_set.
15567 * server.h (pass_signals, decode_address_to_semicolon): New.
15568
000ef4f0
DJ
155692006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
15570
15571 * server.c (handle_query): Correct error handling for read_auxv.
15572
b7149293
UW
155732005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
15574
15575 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
15576 and srv_linux_thread_db to yes.
15577 * linux-s390-low.c (s390_fill_gregset): New function.
15578 (target_regsets): Define data structure.
15579
dae5f5cf
DJ
155802006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
15581
15582 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
15583 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
15584 * config.in, configure: Regenerated.
15585 * inferiors.c (gdb_id_to_thread): New function.
15586 (gdb_id_to_thread_id): Use it.
15587 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
15588 * linux-low.h (struct process_info): Add th member.
15589 (thread_db_get_tls_address): New prototype.
15590 * remote-utils.c (decode_address): Make non-static.
15591 * server.c (handle_query): Handle qGetTLSAddr.
15592 * server.h (gdb_id_to_thread, decode_address): New prototypes.
15593 * target.h (struct target_ops): Add get_tls_address.
15594 * thread-db.c (maybe_attach_thread): Save the thread handle.
15595 (thread_db_get_tls_address): New.
15596
32ca6d61
DJ
155972006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
15598
15599 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
15600 (linux_resume_one_process): Take a siginfo_t *. Update all
15601 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
15602 (struct pending_signals): Add a siginfo_t.
15603 (linux_wait_for_process): Always set last_status.
15604 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
15605 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
15606 * linux-low.h (struct process_info): Add last_status.
15607
5ffff7c1
DJ
156082006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
15609
15610 * remote-utils.c (try_rle): New function.
15611 (putpkt_binary): Use it.
15612
8695c747
DJ
156132006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
15614
15615 * Makefile.in (clean): Clean reg-x86-64-linux.c.
15616 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
15617 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
15618 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
15619 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
15620 point registers.
15621
290fadea
RS
156222006-08-08 Richard Sandiford <richard@codesourcery.com>
15623
15624 * server.c (terminal_fd): New variable.
15625 (old_foreground_pgrp): Likewise.
15626 (restore_old_foreground_pgrp): New function.
15627 (start_inferior): Record the terminal file descriptor in terminal_fd
15628 and its original foreground group in old_foreground_pgrp. Register
15629 restore_old_foreground_pgrp with atexit().
15630
9f2e1e63
DJ
156312006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
15632
15633 * server.c (handle_query): Correct qPart to qXfer.
15634
b80864fb
DJ
156352006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
15636
15637 * configure.ac: Check for more headers which are missing on
15638 Windows. Automatically supply -lwsock32 and USE_WIN32API.
15639 * configure.srv: Add Cygwin and mingw32.
15640 * remote-utils.c: Don't include headers unconditionally which
15641 are missing on mingw32. Include <winsock.h> for mingw32.
15642 (remote_open): Adjust for mingw32 support. Flush
15643 standard error after writing to it.
15644 (remote_close, putpkt_binary, input_interrupt, block_async_io)
15645 (unblock_async_io, enable_async_io, disable_async_io)
15646 (readchar, getpkt): Update for Winsock support.
15647 (prepare_resume_reply): Expect a protocol signal number.
15648 * server.c: Disable <sys/wait.h> on mingw32.
15649 (start_inferior): Adjust for mingw32 support. Flush
15650 standard error after writing to it.
15651 (attach_inferior): Likewise. Use protocol signal
15652 numbers.
15653 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
15654 and names.
15655 * win32-i386-low.c: New file.
15656 * Makefile.in (XM_CLIBS): Set.
15657 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
15658 (win32-i386-low.o): New dependency rule.
15659 * linux-low.c (linux_wait): Use target signal numbers.
15660 * target.h (struct target_ops): Doc fix.
15661 * server.h (target_signal_to_name): New prototype.
15662 * gdbreplay.c: Don't include headers unconditionally which
15663 are missing on mingw32. Include <winsock.h> for mingw32.
15664 (remote_close, remote_open): Adjust for Winsock support.
15665 * configure, config.in: Regenerated.
15666
0876f84a
DJ
156672006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
15668
15669 * server.c (decode_xfer_read, write_qxfer_response): New.
15670 (handle_query): Take a packet length argument. Handle
15671 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
15672 the qSupported response.
15673 (main): Update call to handle_query.
15674
01f9e8fa
DJ
156752006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
15676
15677 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
15678 (putpkt_binary): Renamed from putpkt and adjusted for binary
15679 data.
15680 (putpkt): New wrapper for putpkt_binary.
15681 (readchar): Don't mask off the high bit.
15682 (decode_X_packet): New function.
15683 * server.c (main): Call putpkt_binary if a handler sets the packet
15684 length. Save the length of the incoming packet. Handle 'X'.
15685 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
15686
be2a5f71
DJ
156872006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
15688
15689 * server.c (handle_query): Handle qSupported.
15690
ea025f5f
DJ
156912006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
15692
15693 * remote-utils.c (all_symbols_looked_up): New variable.
15694 (look_up_one_symbol): Check it.
15695 * server.h (look_up_one_symbol): New declaration.
15696 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
15697
9308fc88
DJ
156982006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
15699
15700 * Makefile.in (linux-arm-low.o): Update dependencies.
66f338c7 15701 * linux-arm-low.c: Include "gdb_proc_service.h".
9308fc88
DJ
15702 (PTRACE_GET_THREAD_AREA): Define.
15703 (ps_get_thread_area): New function.
15704
52fb6437
NS
157052006-05-09 Nathan Sidwell <nathan@codesourcery.com>
15706
15707 * configure.srv (m68k*-*-uclinux*): New target.
15708 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
15709 (linux_resume_one_process): Remove extraneous cast.
15710 (linux_read_offsets): New.
15711 (linux_target_op): Add linux_read_offsets on mmuless systems.
15712 * server.c (handle_query): Add qOffsets logic.
15713 * target.h (struct target_ops): Add read_offsets.
15714
21b0f40c
DJ
157152006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
15716
15717 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
15718 (PTRACE_GET_THREAD_AREA): Define.
15719 (ps_get_thread_area): New function.
15720 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
15721 (linux-x86-64-low.o): Update.
15722
0050a760
DJ
157232006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
15724
15725 * configure.ac: Remove checks for prfpregset_t.
15726 * gdb_proc_service.h: New file.
15727 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
15728 new "gdb_proc_service.h".
15729 * proc-service.c: Likewise.
15730 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
15731 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
15732 * Makefile.in (gdb_proc_service_h): Updated.
15733 * configure, config.in: Regenerated.
15734
b92a518e
DJ
157352006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
15736
15737 * remote-utils.c (prepare_resume_reply): Move declaration
15738 of gdb_id_from_wait to the top of the block.
15739
545587ee
DJ
157402006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
15741
15742 * linux-low.c (regsets_store_inferior_registers): Read the regset
15743 from the target before filling it.
15744
9db87ebd
DJ
157452006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
15746
15747 * server.c (attach_inferior): Return SIGTRAP for a successful
15748 attach.
15749
dd24457d
DJ
157502006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
15751
15752 * Makefile.in (OBS): Add version.o.
15753 (STAGESTUFF): Delete.
15754 (version.o): Add dependencies.
15755 (version.c): Replace rule.
15756 (clean): Remove version.c.
15757 * server.c (gdbserver_version): New.
15758 (gdbserver_usage): Use printf.
15759 (main): Handle --version and --help.
15760 * server.h (version, host_name): Add declarations.
15761
6f0f660e
EZ
157622005-12-23 Eli Zaretskii <eliz@gnu.org>
15763
889bf7c5
PA
15764 * linux-arm-low.c:
15765 * linux-arm-low.c:
15766 * inferiors.c:
15767 * i387-fp.h:
15768 * i387-fp.c:
15769 * gdbreplay.c:
15770 * regcache.c:
15771 * proc-service.c:
15772 * mem-break.h:
15773 * mem-break.c:
15774 * linux-x86-64-low.c:
15775 * linux-sh-low.c:
15776 * linux-s390-low.c:
15777 * linux-ppc64-low.c:
15778 * linux-ppc-low.c:
15779 * linux-mips-low.c:
15780 * linux-m68k-low.c:
15781 * linux-m32r-low.c:
15782 * linux-low.h:
15783 * linux-low.c:
15784 * linux-ia64-low.c:
15785 * linux-i386-low.c:
15786 * linux-crisv32-low.c:
15787 * thread-db.c:
15788 * terminal.h:
15789 * target.h:
15790 * target.c:
15791 * server.h:
15792 * server.c:
15793 * remote-utils.c:
15794 * regcache.h:
15795 * utils.c:
15796 * Makefile.in:
15797 * configure.ac:
6f0f660e
EZ
15798 * gdbserver.1: Add (C) after Copyright. Update the FSF
15799 address.
15800
9d1fb177
DJ
158012005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
15802
15803 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
15804 (arm_breakpoint_at): Recognize both breakpoints.
15805 (the_low_target): Use the correct breakpoint instruction.
15806
011a70c2
DJ
158072005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
15808
15809 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
15810 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
15811 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
15812 (the_low_target): Update.
15813
7fb85e41
AS
158142005-10-25 Andreas Schwab <schwab@suse.de>
15815
15816 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
15817
15818 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
15819 (ia64_num_regs): Reduce to 462.
15820
3db0444b
DJ
158212005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
15822
15823 * acinclude.m4: Correct quoting.
15824 * aclocal.m4: Regenerated.
15825
15826 Suggested by SZOKOVACS Robert <szo@ies.hu>:
15827 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
15828 (thread_db_init): Call thread_db_err_str.
15829 * configure.ac: Check for TD_VERSION.
15830 * config.in, configure: Regenerated.
15831
bee0189a
DJ
158322005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15833
15834 * server.h (error, fatal, warning): Add ATTR_FORMAT.
15835
e9d25b98
DJ
158362005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
15837
15838 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
15839 is not available. Define HAVE_PTRACE_GETREGS if it is.
15840 * config.in, configure: Regenerated.
15841 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
15842 * linux-i386-low.c, linux-m68k-low.c: Update to use
15843 HAVE_PTRACE_GETREGS.
15844 * linux-low.c (regsets_fetch_inferior_registers)
15845 (regsets_store_inferior_registers): Only return 0 if we processed
15846 GENERAL_REGS.
15847 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
15848 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
15849
a06660f7
DJ
158502005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
15851
15852 * inferiors.c (struct thread_info): Add gdb_id.
15853 (add_thread): Add gdb_id argument.
15854 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
15855 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
15856 calls to add_thread.
15857 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
15858 * server.c (handle_query): Use thread_to_gdb_id.
15859 (handle_v_cont, main): Use gdb_id_to_thread_id.
15860 * server.h (add_thread): Update prototype.
15861 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
15862 prototypes.
15863
5a1f5858
DJ
158642005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
15865
15866 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
15867 left-padded registers.
15868 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
15869 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
15870
e122f1f5
SE
158712005-07-01 Steve Ellcey <sje@cup.hp.com>
15872
15873 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
15874 * configure: Regenerate.
15875 * config.in: Regenerate.
15876 * server.h (NEED_DECLARATION_STRERROR):
15877 Replace with !HAVE_DECL_STRERROR.
15878
d592fa2f
DJ
158792005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
15880
15881 * linux-low.c (linux_wait, linux_send_signal): Don't test
15882 an unsigned long variable for > 0 if it could be MAX_ULONG.
15883 * server.c (myresume): Likewise.
15884 * target.c (set_desired_inferior): Likewise.
15885
ccbd4912
MK
158862005-06-13 Mark Kettenis <kettenis@gnu.org>
15887
15888 * configure.ac: Simplify and improve check for socklen_t.
15889 * configure, config.in: Regenerate.
15890
f450004a
DJ
158912005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
15892
15893 * acconfig.h: Remove.
15894 * configure.ac: Add a test for socklen_t. Use three-argument
15895 AC_DEFINE throughout.
15896 * config.in: Regenerated using autoheader 2.59.
15897 * configure: Regenerated.
15898
15899 * gdbreplay.c (socklen_t): Provide a default.
15900 (remote_open): Use socklen_t.
15901 * remote-utils.c (socklen_t): Provide a default.
15902 (remote_open): Use socklen_t.
15903 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
15904 unsigned char.
15905
15906 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
15907 char for buffers.
15908 * linux-low.c (linux_read_memory, linux_write_memory)
15909 (linux_read_auxv): Likewise.
15910 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
15911 (check_mem_write): Likewise.
15912 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
15913 Likewise.
15914 * regcache.c (struct inferior_rgcache_data, registers_to_string)
15915 (registers_from_string, register_data): Likewise.
15916 * server.c (handle_query, main): Likewise.
15917 * server.h (convert_ascii_to_int, convert_int_to_ascii)
15918 (decode_M_packet): Likewise.
15919 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
15920 * target.h (struct target_ops): Update read_memory, write_memory,
15921 and read_auxv.
15922 (read_inferior_memory, write_inferior_memory): Update.
15923 * linux-low.h (struct linux_target_ops): Change type of breakpoint
15924 to unsigned char *.
15925 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
15926 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
15927 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
15928 linux-s390-low.c, linux-sh-low.c: Update for changes in
15929 read_inferior_memory and the_low_target->breakpoint.
15930
eee84df1
DJ
159312005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
15932
15933 * Makefile.in (SFILES): Add linux-ppc64-low.c.
15934 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
15935 * configure.srv: Add powerpc64-*-linux*.
15936 * linux-ppc64-low.c: New file.
15937
45b134e5
OF
159382005-05-23 Orjan Friberg <orjanf@axis.com>
15939
15940 * linux-cris-low.c: New file with support for CRIS.
15941 * linux-crisv32-low.c: Ditto for CRISv32.
15942 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
15943 (clean): Add reg-cris.c and reg-crisv32.c.
889bf7c5 15944 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
45b134e5
OF
15945 reg-crisv32.o, and reg-crisv32.c to make rules.
15946 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
15947 recognized targets.
15948
48d93c75
UW
159492005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
15950
15951 * linux-low.c (fetch_register): Ensure buffer size is a multiple
15952 of sizeof (PTRACE_XFER_TYPE).
15953 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
15954
e013ee27
OF
159552005-05-12 Orjan Friberg <orjanf@axis.com>
15956
889bf7c5 15957 * target.h (struct target_ops): Add insert_watchpoint,
e013ee27
OF
15958 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
15959 pointers for hardware watchpoint support.
15960 * linux-low.h (struct linux_target_ops): Ditto.
15961 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
15962 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
15963 to linux_target_ops.
15964 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
15965 reply packet.
15966 * server.c (main): Recognize 'Z' and 'z' packets.
15967
b0ded00b
UW
159682005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
15969
15970 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
15971 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
15972 (the_low_target): Add new members.
15973
8643e2ad
DJ
159742005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
15975
15976 * proc-service.c (ps_lgetregs): Search all_processes instead of
15977 all_threads.
15978
fc620387
DJ
159792005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
15980
15981 * server.c (start_inferior): Change return type to int.
15982 (attach_inferior): Change sigptr to int *.
15983 (handle_v_cont, handle_v_requests): Change signal to int *.
15984 (main): Change signal to int.
15985
159862005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
7cfbc4a0
KI
15987
15988 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
15989 * configure.srv: Add m32r*-*-linux*.
15990 * linux-m32r-low.c: New file.
15991
e0e76420
DJ
159922005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
15993
15994 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
15995
a1928bad
DJ
159962005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
15997
15998 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
15999 Take unsigned long arguments for PIDs.
16000 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
16001 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
16002 (wait_for_sigstop, linux_resume_one_process)
16003 (regsets_fetch_inferior_registers, linux_send_signal)
16004 (linux_read_auxv): Likewise. Update the types of variables holding
16005 PIDs. Update format string specifiers.
16006 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
16007 * remote-utils.c (prepare_resume_reply): Likewise.
16008 * server.c (cont_thread, general_thread, step_thread)
16009 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
16010 unsigned long.
16011 (handle_query): Update format specifiers.
16012 (handle_v_cont, main): Use strtoul for thread IDs.
16013 * server.h (struct inferior_list_entry): Use unsigned long for ID.
16014 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
16015 (general_thread, step_thread, thread_from_wait)
16016 (old_thread_from_wait): Update.
16017 * target.h (struct thread_resume): Use unsigned long for THREAD.
16018 (struct target_ops): Use unsigned long for arguments to attach and
16019 thread_alive.
16020
dcdb98d2
DJ
160212005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
16022
16023 * acinclude.m4: Include bfd/bfd.m4 directly.
16024 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
16025 <agriffis@toolchain.org>.
16026 * aclocal.m4, configure: Regenerated.
16027
bec39cab
AC
160282005-01-07 Andrew Cagney <cagney@gnu.org>
16029
16030 * configure.ac: Rename configure.in, require autoconf 2.59.
16031 * configure: Re-generate.
16032
434c4c77
DJ
160332004-12-08 Daniel Jacobowitz <dan@debian.org>
16034
16035 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
16036 LIBS when finished.
16037 * aclocal.m4: Regenerated.
16038 * configure: Regenerated.
16039
db1d3e1b
AS
160402004-11-21 Andreas Schwab <schwab@suse.de>
16041
16042 * linux-m68k-low.c (m68k_num_gregs): Define.
16043 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
16044 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
16045 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
16046 (m68k_breakpoint_at): New. Add to the_low_target.
16047
16048 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
16049 srv_linux_thread_db to yes.
16050
43360365
JB
160512004-10-20 Joel Brobecker <brobecker@gnat.com>
16052
16053 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
16054 (ARCH_SET_FS): Likewise.
16055 (ARCH_GET_FS): Likewise.
16056 (ARCH_GET_GS): Likewise.
16057
fd500816
DJ
160582004-10-16 Daniel Jacobowitz <dan@debian.org>
16059
16060 * linux-i386-low.c (ps_get_thread_area): New.
16061 * linux-x86-64-low.c (ps_get_thread_area): New.
16062 * linux-low.c: Include <sys/syscall.h>.
16063 (linux_kill_one_process): Don't kill the first thread here.
16064 (linux_kill): Kill the first thread here.
16065 (kill_lwp): New function.
16066 (send_sigstop, linux_send_signal): Use it.
16067 * proc-service.c: Clean up #ifdefs.
16068 (fpregset_info): Delete.
16069 (ps_lgetregs): Update and enable implementation.
16070 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
16071 implementations.
16072 * remote-utils.c (struct sym_cache, symbol_cache): New.
16073 (input_interrupt): Print a clearer message.
16074 (async_io_enabled): New variable.
16075 (enable_async_io, disable_async_io): Use it. Update comments.
16076 (look_up_one_symbol): Use the symbol cache.
16077 * thread-db.c (thread_db_look_up_symbols): New function.
16078 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
16079
f6de3c42
DJ
160802004-10-16 Daniel Jacobowitz <dan@debian.org>
16081
16082 * configure.in: Test for -rdynamic.
16083 * configure: Regenerated.
16084 * Makefile (INTERNAL_LDFLAGS): New.
16085 (gdbserver, gdbreplay): Use it.
16086
2c0fc042
AC
160872004-09-02 Andrew Cagney <cagney@gnu.org>
16088
16089 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
16090
075b3282
DJ
160912004-03-23 Daniel Jacobowitz <drow@mvista.com>
16092
16093 * linux-low.c (linux_wait): Clear all_processes list also.
16094
fa6a77dc
DJ
160952004-03-12 Daniel Jacobowitz <drow@mvista.com>
16096
16097 * linux-low.c: Include <errno.h>. Remove extern declaration of
16098 errno.
16099
6d782a97
DJ
161002004-03-12 Daniel Jacobowitz <drow@mvista.com>
16101
16102 * gdbreplay.c, server.h, utils.c: Update copyright years.
16103
3a7fb99b
DJ
161042004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
16105
16106 * server.c (main): Print child status or termination signal from
16107 variable 'signal', not 'sig'.
16108
c3e735a6
DJ
161092004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
16110
16111 * linux-low.c (linux_read_memory): Change return type to
16112 int. Check for and return error from ptrace().
16113 * target.c (read_inferior_memory): Change return type to int. Pass
16114 back return status from the_target->read_memory().
16115 * target.h (struct target_ops): Adapt *read_memory() prototype.
16116 Update comment.
16117 (read_inferior_memory): Adapt prototype.
16118 * server.c (main): Return an error packet if
16119 read_inferior_memory() returns an error.
16120
a59d1c82
DJ
161212004-03-04 Daniel Jacobowitz <drow@mvista.com>
16122
16123 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
16124 Unify with other clean targets.
16125
dc3f8883
DJ
161262004-02-29 Daniel Jacobowitz <drow@mvista.com>
16127
16128 * server.c (handle_v_cont): Call set_desired_inferior.
16129
89a208da
DJ
161302004-02-29 Daniel Jacobowitz <drow@mvista.com>
16131
16132 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
16133
62ea82f5
DJ
161342004-02-29 Daniel Jacobowitz <drow@mvista.com>
16135
16136 * linux-low.c (linux_wait): Unblock async I/O.
16137 (linux_resume): Block and enable async I/O.
16138 * remote-utils.c (block_async_io, unblock_async_io): New functions.
16139 * server.h (block_async_io, unblock_async_io): Add prototypes.
16140
6910d122
DJ
161412004-02-29 Daniel Jacobowitz <drow@mvista.com>
16142
16143 * remote-utils.c (remote_open): Print a status notice after
16144 opening a TCP port.
16145 * server.c (attach_inferior): Print a status notice after
16146 attaching.
16147
161482004-02-29 Daniel Jacobowitz <drow@mvista.com>
d677d77d
DJ
16149
16150 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
16151
c89dc5d4
DJ
161522004-02-26 Daniel Jacobowitz <drow@mvista.com>
16153
16154 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
16155 error packet.
16156 * server.c, target.h: Update copyright years.
16157
4b8dad4a
RM
161582004-02-25 Roland McGrath <roland@redhat.com>
16159
16160 * target.h (struct target_ops): New member `read_auxv'.
16161 * server.c (handle_query): Handle qPart:auxv:read: query using that.
16162 * linux-low.c (linux_read_auxv): New function.
16163 (linux_target_ops): Initialize `read_auxv' member to that.
16164
d7446758
JB
161652004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
16166
16167 Committed by Jim Blandy <jimb@redhat.com>.
16168
16169 * linux-s390-low.c (s390_num_regs): Update.
4b8dad4a 16170 (s390_regmap): Remove control registers. Use __s390x__ predefine
d7446758
JB
16171 instead of GPR_SIZE to distiguish s390 and s390x targets.
16172
5544ad89
DJ
161732004-01-31 Daniel Jacobowitz <drow@mvista.com>
16174
16175 * linux-low.c: Update copyright year.
16176 (check_removed_breakpoint): Clear pending_is_breakpoint.
16177 (linux_set_resume_request, linux_queue_one_thread)
16178 (resume_status_pending_p): New functions.
16179 (linux_continue_one_thread): Use process->resume.
16180 (linux_resume): Only resume threads if there are no pending events.
16181 * linux-low.h (struct process_info): Add resume request
16182 pointer.
16183
2a68b70e
DJ
161842004-01-30 Daniel Jacobowitz <drow@mvista.com>
16185
16186 * regcache.c (new_register_cache): Clear the allocated register
16187 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
16188
64386c31
DJ
161892003-10-13 Daniel Jacobowitz <drow@mvista.com>
16190
16191 * linux-low.c (linux_resume): Take a struct thread_resume *
16192 argument.
16193 (linux_wait): Update call.
16194 (resume_ptr): New static variable.
16195 (linux_continue_one_thread): Renamed from
16196 linux_continue_one_process. Use resume_ptr.
16197 (linux_resume): Use linux_continue_one_thread.
16198 * server.c (handle_v_cont, handle_v_requests): New functions.
16199 (myresume): New function.
16200 (main): Handle 'v' case.
16201 * target.h (struct thread_resume): New type.
16202 (struct target_ops): Change argument of "resume" to struct
16203 thread_resume *.
16204 (myresume): Delete macro.
16205
c938e9b0
L
162062003-08-08 H.J. Lu <hongjiu.lu@intel.com>
16207
16208 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
16209 (uninstall): Support DESTDIR.
16210
7f313d07
BC
16211Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
16212
16213 * configure.srv: Add xscale*linux copy of arm*linux entry.
16214
3b2fc2ea
DJ
162152003-07-24 Daniel Jacobowitz <drow@mvista.com>
16216
16217 * linux-arm-low.c (arm_reinsert_addr): New function.
16218 (the_low_target): Add arm_reinsert_addr.
16219
1c0a559e
MK
162202003-07-08 Mark Kettenis <kettenis@gnu.org>
16221
16222 * mem-break.c: Remove whitespace at end of file.
16223
43d5792c
DJ
162242003-06-28 Daniel Jacobowitz <drow@mvista.com>
16225
16226 * configure.in: Check whether we need to prototype strerror.
16227 * server.h: Optionally prototype strerror.
16228 * gdbreplay.c (perror_with_name): Use strerror.
16229 * linux-low.c (linux_attach_lwp): Use strerror.
16230 * utils.c (perror_with_name): Use strerror.
16231 * config.in, configure: Regenerated.
16232
c8a86edf
DJ
162332003-06-28 Daniel Jacobowitz <drow@mvista.com>
16234
16235 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
16236 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
16237
73d37363
DJ
162382003-06-20 Daniel Jacobowitz <drow@mvista.com>
16239
16240 * Makefile.in (SFILES): Update.
16241 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
16242 low-sun3.c: Remove files.
16243
6ad8ae5c
DJ
162442003-06-17 Daniel Jacobowitz <drow@mvista.com>
16245
16246 * linux-low.c: Move comment to linux_thread_alive where it belonged.
16247 (linux_detach_one_process, linux_detach): New functions.
16248 (linux_target_ops): Add linux_detach.
16249 * server.c (main): Handle 'D' packet.
16250 * target.h (struct target_ops): Add "detach" member.
16251 (detach_inferior): Define.
16252
1581182a
MK
162532003-06-13 Mark Kettenis <kettenis@gnu.org>
16254
16255 From Kelley Cook <kelleycook@wideopenwest.com>:
16256 * configure.srv: Accept i[34567]86 variants.
16257
e5379b03
DJ
162582003-06-05 Daniel Jacobowitz <drow@mvista.com>
16259
16260 * linux-low.c (linux_wait_for_event): Correct comment typos.
16261 (linux_resume_one_process): Call check_removed_breakpoint.
16262 (linux_send_signal): New function.
16263 (linux_target_ops): Add linux_send_signal.
16264 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
16265 of kill.
16266 * target.h (struct target_ops): Add send_signal.
16267
2ff29de4
JB
162682003-05-29 Jim Blandy <jimb@redhat.com>
16269
16270 * linux-low.c (usr_store_inferior_registers): Transfer buf in
16271 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
16272 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
16273 away part of the register's value.
16274
254787d4
DJ
162752003-03-26 Daniel Jacobowitz <drow@mvista.com>
16276
16277 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
16278 (linux_wait_for_event, linux_init_signals): Likewise.
16279
94e10508
DJ
162802003-03-17 Daniel Jacobowitz <drow@mvista.com>
16281
16282 * configure.in: Check for stdlib.h.
16283 * configure: Regenerated.
16284 * config.in: Regenerated.
16285
4c0711e0
DJ
162862003-01-04 Andreas Schwab <schwab@suse.de>
16287
16288 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
16289
ef66e766
AC
162902003-01-02 Andrew Cagney <ac131313@redhat.com>
16291
16292 * Makefile.in: Remove obsolete code.
16293
a1358604
DJ
162942002-11-20 Daniel Jacobowitz <drow@mvista.com>
16295
16296 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
16297 defined(PT_FPR0_HI).
16298
23ce3b1c
DJ
162992002-11-17 Stuart Hughes <seh@zee2.com>
16300
16301 * linux-arm-low.c (arm_num_regs): Increase.
16302 (arm_regmap): Include status register.
16303
163042002-11-17 Daniel Jacobowitz <drow@mvista.com>
16305
16306 * linux-low.c (register_addr): Remove incorrect -1 check.
16307
a9fa9f7d
DJ
163082002-08-29 Daniel Jacobowitz <drow@mvista.com>
16309
16310 * linux-low.c (linux_create_inferior): Call setpgid. Return
16311 the new PID.
16312 (unstopped_p, linux_signal_pid): Remove.
16313 (linux_target_ops): Remove linux_signal_pid.
16314 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
16315 global instead of target method.
16316 * target.h (struct target_ops): Remove signal_pid. Update comment
16317 for create_inferior.
16318 * server.c (signal_pid): New variable.
16319 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
4b8dad4a 16320 gdbserver. Set the child to be the foreground process group.
a9fa9f7d
DJ
16321 (attach_inferior): Set signal_pid.
16322
17574093
DJ
163232002-08-23 Daniel Jacobowitz <drow@mvista.com>
16324
16325 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
16326
163272002-08-20 Jim Blandy <jimb@redhat.com>
16328
16329 * Makefile.in (LDFLAGS): Allow the configure script to establish a
16330 default for this.
16331
163322002-08-01 Andrew Cagney <cagney@redhat.com>
16333
16334 * Makefile.in: Make chill references obsolete.
16335
163362002-07-24 Kevin Buettner <kevinb@redhat.com>
16337
16338 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
16339 * configure: Regenerate.
16340 * config.in: Regenerate.
16341
163422002-07-09 David O'Brien <obrien@FreeBSD.org>
16343
16344 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
16345 (perror_with_name, remote_close, remote_open, expect, play): Static.
16346
163472002-07-04 Michal Ludvig <mludvig@suse.cz>
16348
4b8dad4a 16349 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17574093
DJ
16350 byte offsets instead of an array of indexes.
16351 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
16352
163532002-06-13 Daniel Jacobowitz <drow@mvista.com>
16354
16355 * regcache.c: Add comment.
16356
163572002-06-11 Daniel Jacobowitz <drow@mvista.com>
16358
16359 * thread-db.c: New file.
16360 * proc-service.c: New file.
16361 * acinclude.m4: New file.
16362 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
16363 proc-service.o, and thread-db.o.
16364 (linux-low.o): Add USE_THREAD_DB.
16365 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
16366 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
16367 * aclocal.m4: Regenerated.
16368 * config.in: Regenerated.
16369 * configure: Regenerated.
16370 * configure.in: Check for proc_service.h, sys/procfs.h,
16371 thread_db.h, and linux/elf.h headrs.
16372 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
16373 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
16374 Check for -lthread_db and thread support.
16375 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
16376 PowerPC, and SuperH.
16377 * i387-fp.c: Constify arguments.
16378 * i387-fp.h: Likewise.
16379 * inferiors.c: (struct thread_info): Renamed from
16380 `struct inferior_info'. Remove PID member. Use generic inferior
16381 list header. All uses updated.
16382 (inferiors, signal_pid): Removed.
16383 (all_threads): New variable.
16384 (get_thread): Define.
16385 (add_inferior_to_list): New function.
16386 (for_each_inferior): New function.
16387 (change_inferior_id): New function.
16388 (add_inferior): Removed.
16389 (remove_inferior): New function.
16390 (add_thread): New function.
16391 (free_one_thread): New function.
16392 (remove_thread): New function.
16393 (clear_inferiors): Use for_each_inferior and free_one_thread.
16394 (find_inferior): New function.
16395 (find_inferior_id): New function.
16396 (inferior_target_data): Update argument type.
16397 (set_inferior_target_data): Likewise.
16398 (inferior_regcache_data): Likewise.
16399 (set_inferior_regcache_data): Likewise.
16400 * linux-low.c (linux_bp_reinsert): Remove.
16401 (all_processes, stopping_threads, using_thrads)
16402 (struct pending_signals, debug_threads, pid_of): New.
16403 (inferior_pid): Replace with macro.
16404 (struct inferior_linux_data): Remove.
16405 (get_stop_pc, add_process): New functions.
16406 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
16407 Use add_process and add_thread.
16408 (linux_attach_lwp): New function, based on old linux_attach. Use
16409 add_process and add_thread. Set stop_expected for new threads.
16410 (linux_attach): New function.
16411 (linux_kill_one_process): New function.
16412 (linux_kill): Kill all LWPs.
16413 (linux_thread_alive): Use find_inferior_id.
16414 (check_removed_breakpoints, status_pending_p): New functions.
16415 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
16416 Update. Use WNOHANG. Wait for cloned processes also. Update process
16417 struct for the found process.
16418 (linux_wait_for_event): New function.
16419 (linux_wait): Use it. Support LWPs.
16420 (send_sigstop, wait_for_sigstop, stop_all_processes)
16421 (linux_resume_one_process, linux_continue_one_process): New functions.
16422 (linux_resume): Support LWPs.
16423 (REGISTER_RAW_SIZE): Remove.
16424 (fetch_register): Use register_size instead. Call supply_register.
16425 (usr_store_inferior_registers): Likewise. Call collect_register.
16426 Fix recursive case.
16427 (regsets_fetch_inferior_registers): Improve error message.
16428 (regsets_store_inferior_registers): Add debugging.
16429 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
16430 (unstopped_p, linux_signal_pid): New functions.
16431 (linux_target_ops): Add linux_signal_pid.
16432 (linux_init_signals): New function.
16433 (initialize_low): Call it. Initialize using_threads.
16434 * regcache.c (inferior_regcache_data): Add valid
16435 flag.
16436 (get_regcache): Fetch registers lazily. Add fetch argument
16437 and update all callers.
16438 (regcache_invalidate_one, regcache_invalidate): New
16439 functions.
16440 (new_register_cache): Renamed from create_register_cache.
16441 Return the new regcache.
16442 (free_register_cache): Change argument to a void *.
16443 (registers_to_string, registers_from_string): Call get_regcache
16444 with fetch flag set.
16445 (register_data): Make static. Pass fetch flag to get_regcache.
16446 (supply_register): Call get_regcache with fetch flag clear.
16447 (collect_register): Call get_regcache with fetch flag set.
16448 (collect_register_as_string): New function.
16449 * regcache.h: Update.
16450 * remote-utils.c (putpkt): Flush after debug output and use
16451 stderr.
16452 Handle input interrupts while waiting for an ACK.
16453 (input_interrupt): Use signal_pid method.
16454 (getpkt): Flush after debug output and use stderr.
16455 (outreg): Use collect_register_as_string.
16456 (new_thread_notify, dead_thread_notify): New functions.
16457 (prepare_resume_reply): Check using_threads. Set thread_from_wait
16458 and general_thread.
16459 (look_up_one_symbol): Flush after debug output.
16460 * server.c (step_thread, server_waiting): New variables.
16461 (start_inferior): Don't use signal_pid. Update call to mywait.
16462 (attach_inferior): Update call to mywait.
16463 (handle_query): Handle qfThreadInfo and qsThreadInfo.
16464 (main): Don't fetch/store registers explicitly. Use
16465 set_desired_inferior. Support proposed ``Hs'' packet. Update
16466 calls to mywait.
16467 * server.h: Update.
16468 (struct inferior_list, struct_inferior_list_entry): New.
16469 * target.c (set_desired_inferior): New.
16470 (write_inferior_memory): Constify.
16471 (mywait): New function.
16472 * target.h: Update.
16473 (struct target_ops): New signal_pid method.
16474 (mywait): Removed macro, added prototype.
16475
16476 * linux-low.h (regset_func): Removed.
16477 (regset_fill_func, regset_store_func): New.
16478 (enum regset_type): New.
16479 (struct regset_info): Add type field. Use new operation types.
16480 (struct linux_target_ops): stop_pc renamed to get_pc.
16481 Add decr_pc_after_break and breakpoint_at.
16482 (get_process, get_thread_proess, get_process_thread)
16483 (strut process_info, all_processes, linux_attach_lwp)
16484 (thread_db_init): New.
16485
16486 * linux-arm-low.c (arm_get_pc, arm_set_pc,
16487 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
16488 (the_low_target): Add new members.
16489 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
16490 (i386_store_fpxregset): Constify.
16491 (target_regsets): Add new kind identifier.
16492 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
16493 (i386_set_pc): Add debugging.
16494 (i386_breakpoint_at): New function.
16495 (the_low_target): Add new members.
16496 * linux-mips-low.c (mips_get_pc, mips_set_pc)
16497 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
16498 (mips_breakpoint_at): New.
16499 (the_low_target): Add new members.
16500 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
16501 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
16502 (the_low_target): Add new members.
16503 * linux-sh-low.c (sh_get_pc, sh_set_pc)
16504 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
16505 (the_low_target): Add new members.
16506 * linux-x86-64-low.c (target_regsets): Add new kind
16507 identifier.
16508
165092002-05-15 Daniel Jacobowitz <drow@mvista.com>
16510
16511 From Martin Pool <mbp@samba.org>:
16512 * server.c (gdbserver_usage): New function.
16513 (main): Call it.
16514
165152002-05-14 Daniel Jacobowitz <drow@mvista.com>
16516
16517 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
16518 stop_at -> stop_pc.
16519
165202002-05-04 Andrew Cagney <ac131313@redhat.com>
16521
16522 * Makefile.in: Remove obsolete code.
16523
165242002-04-24 Michal Ludvig <mludvig@suse.cz>
16525
16526 * linux-low.c (regsets_fetch_inferior_registers),
16527 (regsets_store_inferior_registers): Removed cast to int from
16528 ptrace() calls.
16529 * regcache.h: Added declaration of struct inferior_info.
16530
165312002-04-20 Daniel Jacobowitz <drow@mvista.com>
16532
16533 * inferiors.c (struct inferior_info): Add regcache_data.
16534 (add_inferior): Call create_register_cache.
16535 (clear_inferiors): Call free_register_cache.
16536 (inferior_regcache_data, set_inferior_regcache_data): New functions.
16537 * regcache.c (struct inferior_regcache_data): New.
16538 (registers): Remove.
16539 (get_regcache): New function.
16540 (create_register_cache, free_register_cache): New functions.
16541 (set_register_cache): Don't initialize the register cache here.
16542 (registers_to_string, registers_from_string, register_data): Call
16543 get_regcache.
16544 * regcache.h: Add prototypes.
16545 * server.h: Likewise.
16546
165472002-04-20 Daniel Jacobowitz <drow@mvista.com>
16548
16549 * mem-break.c: New file.
16550 * mem-break.h: New file.
16551 * Makefile.in: Add mem-break.o rule; update server.h
16552 dependencies.
16553 * inferiors.c (struct inferior_info): Add target_data
16554 member.
16555 (clear_inferiors): Free target_data member if set.
16556 (inferior_target_data, set_inferior_target_data): New functions.
16557 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
16558 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
16559 * linux-low.c (linux_bp_reinsert): New variable.
16560 (struct inferior_linux_data): New.
16561 (linux_create_inferior): Use set_inferior_target_data.
16562 (linux_attach): Likewise. Call add_inferior.
16563 (linux_wait_for_one_inferior): New function.
16564 (linux_wait): Call it.
16565 (linux_write_memory): Add const.
16566 (initialize_low): Call set_breakpoint_data.
16567 * linux-low.h (struct linux_target_ops): Add breakpoint
16568 handling members.
16569 * server.c (attach_inferior): Remove extra add_inferior
16570 call.
16571 * server.h: Include mem-break.h. Update inferior.c
16572 prototypes.
16573 * target.c (read_inferior_memory)
16574 (write_inferior_memory): New functions.
16575 * target.h (read_inferior_memory)
16576 (write_inferior_memory): Change macros to prototypes.
16577 (struct target_ops): Update comments. Add const to write_memory
16578 definition.
16579
165802002-04-11 Daniel Jacobowitz <drow@mvista.com>
16581
16582 * linux-low.c (usr_store_inferior_registers): Support
16583 registers which are allowed to fail to store.
16584 * linux-low.h (linux_target_ops): Likewise.
16585 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
16586 (ppc_cannot_store_register): FPSCR may not be storable.
16587
165882002-04-09 Daniel Jacobowitz <drow@mvista.com>
16589
16590 * server.h: Include <string.h> if HAVE_STRING_H.
16591 * ChangeLog: Correct paths in last ChangeLog entry.
16592
165932002-04-09 Daniel Jacobowitz <drow@mvista.com>
16594
16595 * linux-low.h: Remove obsolete prototypes.
16596 (struct linux_target_ops): New.
16597 (extern the_low_target): New.
16598 * linux-low.c (num_regs, regmap): Remove declarations.
16599 (register_addr): Use the_low_target explicitly.
16600 (fetch_register): Likewise.
16601 (usr_fetch_inferior_registers): Likewise.
16602 (usr_store_inferior_registers): Likewise.
16603 * linux-arm-low.c (num_regs): Remove.
16604 (arm_num_regs): Define.
16605 (arm_regmap): Renamed from regmap, made static.
16606 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
16607 made static.
16608 (arm_cannot_store_register): Renamed from cannot_store_register,
16609 made static.
16610 (the_low_target): New.
16611 * linux-i386-low.c (num_regs): Remove.
16612 (i386_num_regs): Define.
16613 (i386_regmap): Renamed from regmap, made static.
16614 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
16615 made static.
16616 (i386_cannot_store_register): Renamed from cannot_store_register,
16617 made static.
16618 (the_low_target): New.
16619 * linux-ia64-low.c (num_regs): Remove.
16620 (ia64_num_regs): Define.
16621 (ia64_regmap): Renamed from regmap, made static.
16622 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
16623 made static.
16624 (ia64_cannot_store_register): Renamed from cannot_store_register,
16625 made static.
16626 (the_low_target): New.
16627 * linux-m68k-low.c (num_regs): Remove.
16628 (m68k_num_regs): Define.
16629 (m68k_regmap): Renamed from regmap, made static.
16630 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
16631 made static.
16632 (m68k_cannot_store_register): Renamed from cannot_store_register,
16633 made static.
16634 (the_low_target): New.
16635 * linux-mips-low.c (num_regs): Remove.
16636 (mips_num_regs): Define.
16637 (mips_regmap): Renamed from regmap, made static.
16638 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
16639 made static.
16640 (mips_cannot_store_register): Renamed from cannot_store_register,
16641 made static.
16642 (the_low_target): New.
16643 * linux-ppc-low.c (num_regs): Remove.
16644 (ppc_num_regs): Define.
16645 (ppc_regmap): Renamed from regmap, made static.
16646 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
16647 made static.
16648 (ppc_cannot_store_register): Renamed from cannot_store_register,
16649 made static.
16650 (the_low_target): New.
16651 * linux-s390-low.c (num_regs): Remove.
16652 (s390_num_regs): Define.
16653 (s390_regmap): Renamed from regmap, made static.
16654 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
16655 made static.
16656 (s390_cannot_store_register): Renamed from cannot_store_register,
16657 made static.
16658 (the_low_target): New.
16659 * linux-sh-low.c (num_regs): Remove.
16660 (sh_num_regs): Define.
16661 (sh_regmap): Renamed from regmap, made static.
16662 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
16663 made static.
16664 (sh_cannot_store_register): Renamed from cannot_store_register,
16665 made static.
16666 (the_low_target): New.
16667 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
16668 (the_low_target): New.
16669
166702002-04-09 Daniel Jacobowitz <drow@mvista.com>
16671
16672 * Makefile.in: Add stamp-h target.
16673 * configure.in: Create stamp-h.
16674 * configure: Regenerated.
16675
166762002-04-09 Daniel Jacobowitz <drow@mvista.com>
16677
16678 * inferiors.c: New file.
16679 * target.c: New file.
16680 * target.h: New file.
16681 * Makefile.in: Add target.o and inferiors.o. Update
16682 dependencies.
16683 * linux-low.c (inferior_pid): New static variable,
16684 moved from server.c.
16685 (linux_create_inferior): Renamed from create_inferior.
16686 Call add_inferior. Return 0 on success instead of a PID.
16687 (linux_attach): Renamed from myattach.
16688 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
16689 (linux_thread_alive): Renamed from mythread_alive.
16690 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
16691 child dies.
16692 (linux_resume): Renamed from myresume. Add missing ``return 0''.
16693 (regsets_store_inferior_registers): Correct error message.
16694 Add missing ``return 0''.
16695 (linux_fetch_registers): Renamed from fetch_inferior_registers.
16696 (linux_store_registers): Renamed from store_inferior_registers.
16697 (linux_read_memory): Renamed from read_inferior_memory.
16698 (linux_write_memory): Renamed from write_inferior_memory.
16699 (linux_target_ops): New structure.
16700 (initialize_low): Call set_target_ops ().
16701 * remote-utils.c (unhexify): New function.
16702 (hexify): New function.
16703 (input_interrupt): Send signals to ``signal_pid''.
16704 * server.c (inferior_pid): Remove.
16705 (start_inferior): Update create_inferior call.
16706 (attach_inferior): Call add_inferior.
16707 (handle_query): New function.
16708 (main): Call handle_query for `q' packets.
16709 * server.h: Include "target.h". Remove obsolete prototypes.
16710 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
16711
167122002-04-09 Daniel Jacobowitz <drow@mvista.com>
16713
16714 * Makefile.in: Add WARN_CFLAGS. Update configury
16715 dependencies.
16716 * configure.in: Check for <string.h>
16717 * configure: Regenerate.
16718 * config.in: Regenerate.
16719 * gdbreplay.c: Include needed system headers.
16720 (remote_open): Remove strchr prototype.
16721 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
16722 * regcache.c (supply_register): Change buf argument to const void *.
16723 (supply_register_by_name): Likewise.
16724 (collect_register): Change buf argument to void *.
16725 (collect_register_by_name): Likewise.
16726 * regcache.h: Add missing prototypes.
16727 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
16728 * server.c (handle_query): New function.
16729 (attached): New static variable, moved out of main.
16730 (main): Quiet longjmp clobber warnings.
16731 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
16732 * utils.c (error): Remove NORETURN.
16733 (fatal): Likewise.