OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [tags/] [gnu-src/] [gdb-7.2/] [gdb-7.2-or32-1.0rc1/] [gdb/] [gdbserver/] [ChangeLog] - Blame information for rev 578

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 330 jeremybenn
2010-08-11  Thomas Schwinge  
2
 
3
        * linux-low.c (linux_wait_1): Correctly return the ptid of the child
4
        after its termination.
5
 
6
2010-07-21  Ozkan Sezer  
7
 
8
        * server.c (handle_query): strcpy() the returned string from paddress()
9
        instead of sprintf().
10
        * utils.c (paddress): Return phex_nz().
11
 
12
2010-07-07  Joel Brobecker  
13
 
14
        * server.c (handle_v_cont): Call mourn_inferior if process
15
        just exited.
16
        (myresume): Likewise.
17
 
18
2010-07-01  Pedro Alves  
19
 
20
        Static tracepoints, and integration with UST.
21
 
22
        * configure.ac: Handle --with-ust.  substitute ustlibs and ustinc.
23
        * mem-break.c (uninsert_all_breakpoints)
24
        (reinsert_all_breakpoints): New.
25
        * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
26
        * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
27
        (gdb_agent_ust_loaded, helper_thread_id)
28
        (gdb_agent_helper_thread_id): New macros.
29
        (struct ipa_sym_addresses): Add addr_ust_loaded,
30
        addr_helper_thread_id, addr_cmd_buf.
31
        (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
32
        (in_process_agent_loaded_ust): New.
33
        (write_e_ust_not_loaded): New.
34
        (maybe_write_ipa_ust_not_loaded): New.
35
        (struct collect_static_trace_data_action): New.
36
        (enum tracepoint_type) : New.
37
        (struct tracepoint) : Mention static tracepoints.
38
        (struct static_tracepoint_ctx): New.
39
        (CMD_BUF_SIZE): New.
40
        (add_tracepoint_action): Handle static tracepoint actions.
41
        (unprobe_marker_at): New.
42
        (clear_installed_tracepoints): Handle static tracepoints.
43
        (cmd_qtdp): Handle static tracepoints.
44
        (probe_marker_at): New.
45
        (cmd_qtstart): Handle static tracepoints.
46
        (response_tracepoint): Handle static tracepoints.
47
        (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
48
        (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
49
        (get_context_regcache): Handle static tracepoints.
50
        (do_action_at_tracepoint): Handle static tracepoint actions.
51
        (traceframe_find_block_type): Handle static trace data blocks.
52
        (traceframe_read_sdata): New.
53
        (download_tracepoints): Download static tracepoint actions.
54
        [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
55
        (GDB_PROBE_NAME): New.
56
        (ust_ops): New.
57
        (GET_UST_SYM): New.
58
        (USTF): New.
59
        (dlsym_ust): New.
60
        (ust_marker_to_static_tracepoint): New.
61
        (gdb_probe): New.
62
        (collect_ust_data_at_tracepoint): New.
63
        (gdb_ust_probe): New.
64
        (UNIX_PATH_MAX, SOCK_DIR): New.
65
        (gdb_ust_connect_sync_socket): New.
66
        (resume_thread, stop_thread): New.
67
        (run_inferior_command): New.
68
        (init_named_socket): New.
69
        (gdb_ust_socket_init): New.
70
        (cstr_to_hexstr): New.
71
        (next_st): New.
72
        (first_marker, next_marker): New.
73
        (response_ust_marker): New.
74
        (cmd_qtfstm, cmd_qtsstm): New.
75
        (unprobe_marker_at, probe_marker_at): New.
76
        (cmd_qtstmat, gdb_ust_thread): New.
77
        (gdb_ust_init): New.
78
        (initialize_tracepoint_ftlib): Call gdb_ust_init.
79
        * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
80
        (ST_REGENTRY): New.
81
        (x86_64_st_collect_regmap): New.
82
        (X86_64_NUM_ST_COLLECT_GREGS): New.
83
        (AMD64_RIP_REGNUM): New.
84
        (supply_static_tracepoint_registers): New.
85
        * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
86
        (ST_REGENTRY): New.
87
        (i386_st_collect_regmap): New.
88
        (i386_NUM_ST_COLLECT_GREGS): New.
89
        (supply_static_tracepoint_registers): New.
90
        * server.c (handle_query): Handle qXfer:statictrace:read.
91
        : Report support for StaticTracepoints, and
92
        qXfer:statictrace:read features.
93
        * server.h (traceframe_read_sdata)
94
        (supply_static_tracepoint_registers): Declare.
95
        * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
96
        (unpack_varlen_hex): Include in IPA build.
97
        * Makefile.in (ustlibs, ustinc): New.
98
        (IPA_OBJS): Add remote-utils-ipa.o.
99
        ($(IPA_LIB)): Link -ldl and -lpthread.
100
        (UST_CFLAGS): New.
101
        (IPAGENT_CFLAGS): Add UST_CFLAGS.
102
        * config.in, configure: Regenerate.
103
 
104
2010-06-20  Ian Lance Taylor  
105
            Pedro Alves  
106
 
107
        * linux-x86-low.c (always_true): Delete.
108
        (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
109
        trying to fool the compiler with always_true.
110
 
111
2010-06-20  Pedro Alves  
112
 
113
        * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
114
        conditions in gdbserver.
115
 
116
2010-06-19  Ulrich Weigand  
117
 
118
        * spu-low.c (spu_read_memory): Wrap around local store limit.
119
        (spu_write_memory): Likewise.
120
 
121
2010-06-15  Pedro Alves  
122
 
123
        * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
124
        (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
125
        LONGEST uses.
126
        * server.h (struct emit_ops): Replace int64_t uses with LONGEST
127
        uses.
128
        * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
129
        uses with LONGEST uses.
130
 
131
2010-06-14  Stan Shebs  
132
            Pedro Alves  
133
 
134
        Bytecode compiler.
135
 
136
        * linux-x86-low.c: Include limits.h.
137
        (add_insns): New.
138
        (always_true): New.
139
        (EMIT_ASM): New.
140
        (EMIT_ASM32): New.
141
        (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
142
        (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
143
        (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
144
        (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
145
        (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
146
        (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
147
        (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
148
        (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
149
        (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
150
        (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
151
        (amd64_emit_void_call_2): New.
152
        (amd64_emit_ops): New.
153
        (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
154
        (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
155
        (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
156
        (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
157
        (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
158
        (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
159
        (i386_emit_goto, i386_write_goto_address, i386_emit_const)
160
        (i386_emit_call, i386_emit_reg, i386_emit_pop)
161
        (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
162
        (i386_emit_stack_adjust, i386_emit_int_call_1)
163
        (i386_emit_void_call_2): New.
164
        (i386_emit_ops): New.
165
        (x86_emit_ops): New.
166
        (the_low_target): Install x86_emit_ops.
167
        * server.h (struct emit_ops): New.
168
        (get_raw_reg_func_addr): Declare.
169
        (current_insn_ptr, emit_error): Declare.
170
        * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
171
        (set_trace_state_variable_value): New defines.
172
        (struct ipa_sym_addresses): New fields addr_get_raw_reg,
173
        addr_get_trace_state_variable_value and
174
        addr_set_trace_state_variable_value.
175
        (symbol_list): New fields for get_raw_reg,
176
        get_trace_state_variable_value and set_trace_state_variable_value.
177
        (condfn): New typedef.
178
        (struct tracepoint): New field `compiled_cond'.
179
        (do_action_at_tracepoint): Clear compiled_cond.
180
        (get_trace_state_variable_value, set_trace_state_variable_value):
181
        Export in the IPA.
182
        (condition_true_at_tracepoint): If there's a compiled condition,
183
        run that.
184
        (current_insn_ptr, emit_error): New globals.
185
        (struct bytecode_address): New.
186
        (get_raw_reg_func_addr): New.
187
        (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
188
        (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
189
        (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
190
        (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
191
        (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
192
        (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
193
        (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
194
        (compile_tracepoint_condition, compile_bytecodes): New.
195
        * target.h (emit_ops): Forward declare.
196
        (struct target_ops): New field emit_ops.
197
        (target_emit_ops): New.
198
        * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
199
        * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
200
        * linux-low.c (linux_emit_ops): New.
201
        (linux_target_ops): Install it.
202
        * linux-low.h (struct linux_target_ops): New field emit_ops.
203
 
204
2010-06-14  Ulrich Weigand  
205
 
206
        * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
207
        * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
208
 
209
2010-06-01  Pedro Alves  
210
            Stan Shebs  
211
 
212
        * Makefile.in (IPA_DEPFILES, extra_libraries): New.
213
        (all): Depend on $(extra_libraries).
214
        (install-only): Install the IPA.
215
        (IPA_OBJS, IPA_LIB): New.
216
        (clean): Remove the IPA lib.
217
        (IPAGENT_CFLAGS): New.
218
        (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
219
        (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
220
        (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
221
        * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
222
        * configure.ac: Check for atomic builtins support in the compiler.
223
        (IPA_DEPFILES, extra_libraries): Define.
224
        * configure.srv (ipa_obj): Add description.
225
        (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
226
        (i[34567]86-*-linux*): Set ipa_obj.
227
        (x86_64-*-linux*): Set ipa_obj.
228
        * linux-low.c (stabilizing_threads): New.
229
        (supports_fast_tracepoints): New.
230
        (linux_detach): Stabilize threads before detaching.
231
        (handle_tracepoints): Handle internal tracing breakpoints.  Assert
232
        the lwp is either not stabilizing, or is moving out of a jump pad.
233
        (linux_fast_tracepoint_collecting): New.
234
        (maybe_move_out_of_jump_pad): New.
235
        (enqueue_one_deferred_signal): New.
236
        (dequeue_one_deferred_signal): New.
237
        (linux_wait_for_event_1): If moving out of a jump pad, defer
238
        pending signals to later.
239
        (linux_stabilize_threads): New.
240
        (linux_wait_1): Check if threads need moving out of jump pads, and
241
        do it if so.
242
        (stuck_in_jump_pad_callback): New.
243
        (move_out_of_jump_pad_callback): New.
244
        (lwp_running): New.
245
        (linux_resume_one_lwp): Handle moving out of jump pads.
246
        (linux_set_resume_request): Dequeue deferred signals.
247
        (need_step_over_p): Also step over fast tracepoint jumps.
248
        (start_step_over): Also uninsert fast tracepoint jumps.
249
        (finish_step_over): Also reinsert fast tracepoint jumps.
250
        (linux_install_fast_tracepoint_jump): New.
251
        (linux_target_ops): Install linux_stabilize_threads and
252
        linux_install_fast_tracepoint_jump_pad.
253
        * linux-low.h (linux_target_ops) 
254
        install_fast_tracepoint_jump_pad>: New fields.
255
        (struct lwp_info) 
256
        pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
257
        (linux_get_thread_area): Declare.
258
        * linux-x86-low.c (jump_insn): New.
259
        (x86_get_thread_area): New.
260
        (append_insns): New.
261
        (push_opcode): New.
262
        (amd64_install_fast_tracepoint_jump_pad): New.
263
        (i386_install_fast_tracepoint_jump_pad): New.
264
        (x86_install_fast_tracepoint_jump_pad): New.
265
        (the_low_target): Install x86_get_thread_area and
266
        x86_install_fast_tracepoint_jump_pad.
267
        * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
268
        (struct fast_tracepoint_jump): New.
269
        (fast_tracepoint_jump_insn): New.
270
        (fast_tracepoint_jump_shadow): New.
271
        (find_fast_tracepoint_jump_at): New.
272
        (fast_tracepoint_jump_here): New.
273
        (delete_fast_tracepoint_jump): New.
274
        (set_fast_tracepoint_jump): New.
275
        (uninsert_fast_tracepoint_jumps_at): New.
276
        (reinsert_fast_tracepoint_jumps_at): New.
277
        (set_breakpoint_at): Use write_inferior_memory.
278
        (uninsert_raw_breakpoint): Use write_inferior_memory.
279
        (check_mem_read): Mask out fast tracepoint jumps.
280
        (check_mem_write): Mask out fast tracepoint jumps.
281
        * mem-break.h (struct fast_tracepoint_jump): Forward declare.
282
        (set_fast_tracepoint_jump): Declare.
283
        (delete_fast_tracepoint_jump)
284
        (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
285
        (reinsert_fast_tracepoint_jumps_at): Declare.
286
        * regcache.c: Don't compile many functions when building the
287
        in-process agent library.
288
        (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
289
        the register buffer in the heap.
290
        (free_register_cache): If the register buffer isn't owned by the
291
        regcache, don't free it.
292
        (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
293
        pre-existing register caches.
294
        * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
295
        type.
296
        (convert_ascii_to_int): : Constify `from' parameter type.
297
        (decode_M_packet, decode_X_packet): Replace the `to' parameter by
298
        a `to_p' pointer to pointer parameter.  If TO_P is NULL, malloc
299
        the needed buffer in-place.
300
        (relocate_instruction): New.
301
        * server.c (handle_query) : If the target supports
302
        tracepoints, give it a chance of looking up symbols.  Report
303
        support for fast tracepoints.
304
        (handle_status): Stabilize threads.
305
        (process_serial_event): Adjust.
306
        * server.h (struct fast_tracepoint_jump): Forward declare.
307
        (struct process_info) : New field.
308
        (convert_ascii_to_int, convert_int_to_ascii): Adjust.
309
        (decode_X_packet, decode_M_packet): Adjust.
310
        (relocate_instruction): Declare.
311
        (in_process_agent_loaded): Declare.
312
        (tracepoint_look_up_symbols): Declare.
313
        (struct fast_tpoint_collect_status): Declare.
314
        (fast_tracepoint_collecting): Declare.
315
        (force_unlock_trace_buffer): Declare.
316
        (handle_tracepoint_bkpts): Declare.
317
        (initialize_low_tracepoint)
318
        (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
319
        * target.h (struct target_ops) 
320
        install_fast_tracepoint_jump_pad>: New fields.
321
        (stabilize_threads, install_fast_tracepoint_jump_pad): New.
322
        * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
323
        [HAVE_STDINT_H]: Include stdint.h.
324
        (trace_debug_1): Rename to ...
325
        (trace_vdebug): ... this.
326
        (trace_debug): Rename to ...
327
        (trace_debug_1): ... this.  Add `level' parameter.
328
        (trace_debug): New.
329
        (ATTR_USED, ATTR_NOINLINE): New.
330
        (IP_AGENT_EXPORT): New.
331
        (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
332
        (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
333
        (about_to_request_buffer_space, trace_buffer_is_full)
334
        (stopping_tracepoint, expr_eval_result, error_tracepoint)
335
        (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
336
        (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
337
        (traceframe_write_count, traceframes_created)
338
        (trace_state_variables)
339
        New renaming defines.
340
        (struct ipa_sym_addresses): New.
341
        (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
342
        (symbol_list): New.
343
        (ipa_sym_addrs): New.
344
        (all_tracepoint_symbols_looked_up): New.
345
        (in_process_agent_loaded): New.
346
        (write_e_ipa_not_loaded): New.
347
        (maybe_write_ipa_not_loaded): New.
348
        (tracepoint_look_up_symbols): New.
349
        (debug_threads) [IN_PROCESS_AGENT]: New.
350
        (read_inferior_memory) [IN_PROCESS_AGENT]: New.
351
        (UNKNOWN_SIDE_EFFECTS): New.
352
        (stop_tracing): New.
353
        (flush_trace_buffer): New.
354
        (stop_tracing_bkpt): New.
355
        (flush_trace_buffer_bkpt): New.
356
        (read_inferior_integer): New.
357
        (read_inferior_uinteger): New.
358
        (read_inferior_data_pointer): New.
359
        (write_inferior_data_pointer): New.
360
        (write_inferior_integer): New.
361
        (write_inferior_uinteger): New.
362
        (struct collect_static_trace_data_action): Delete.
363
        (enum tracepoint_type): New.
364
        (struct tracepoint) : New field `type'.
365
        : Only include in GDBserver.
366
        
367
        : New fields.
368
        (tracepoints): Use IP_AGENT_EXPORT.
369
        (last_tracepoint): Don't include in the IPA.
370
        (stopping_tracepoint): Use IP_AGENT_EXPORT.
371
        (trace_buffer_is_full): Use IP_AGENT_EXPORT.
372
        (alloced_trace_state_variables): New.
373
        (trace_state_variables): Use IP_AGENT_EXPORT.
374
        (traceframe_t): Delete unused variable.
375
        (circular_trace_buffer): Don't include in the IPA.
376
        (trace_buffer_start): Delete.
377
        (struct trace_buffer_control): New.
378
        (trace_buffer_free): Delete.
379
        (struct ipa_trace_buffer_control): New.
380
        (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
381
        (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
382
        New.
383
        (trace_buffer_ctrl): New.
384
        (TRACE_BUFFER_CTRL_CURR): New.
385
        (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
386
        Reimplement as macros.
387
        (trace_buffer_wrap): Delete.
388
        (traceframe_write_count, traceframe_read_count)
389
        (traceframes_created, tracing): Use IP_AGENT_EXPORT.
390
        (struct tracepoint_hit_ctx) : New field.
391
        (struct fast_tracepoint_ctx): New.
392
        (memory_barrier): New.
393
        (cmpxchg): New.
394
        (record_tracepoint_error): Update atomically in the IPA.
395
        (clear_inferior_trace_buffer): New.
396
        (about_to_request_buffer_space): New.
397
        (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
398
        updating the same buffer.
399
        (add_tracepoint): Default the tracepoint's type to trap
400
        tracepoint, and orig_size to -1.
401
        (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
402
        internal variables.
403
        (create_trace_state_variable): New parameter `gdb'.  Handle it.
404
        (clear_installed_tracepoints): Clear fast tracepoint jumps.
405
        (cmd_qtdp): Handle fast tracepoints.
406
        (cmd_qtdv): Adjust.
407
        (max_jump_pad_size): New.
408
        (gdb_jump_pad_head): New.
409
        (get_jump_space_head): New.
410
        (claim_jump_space): New.
411
        (sort_tracepoints): New.
412
        (MAX_JUMP_SIZE): New.
413
        (cmd_qtstart): Handle fast tracepoints.  Sync tracepoints with the
414
        IPA.
415
        (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
416
        support.  Upload fast traceframes, and delete internal IPA
417
        breakpoints.
418
        (stop_tracing_handler): New.
419
        (flush_trace_buffer_handler): New.
420
        (cmd_qtstop): Upload fast tracepoints.
421
        (response_tracepoint): Handle fast tracepoints.
422
        (tracepoint_finished_step): Upload fast traceframes.  Set the
423
        tracepoint hit context's tracepoint type.
424
        (handle_tracepoint_bkpts): New.
425
        (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
426
        type.  Add comment about fast tracepoints.
427
        (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
428
        non-existing action_str field.
429
        (get_context_regcache): Handle fast tracepoints.
430
        (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
431
        to the regcache.
432
        (fast_tracepoint_from_jump_pad_address): New.
433
        (fast_tracepoint_from_ipa_tpoint_address): New.
434
        (collecting_t): New.
435
        (force_unlock_trace_buffer): New.
436
        (fast_tracepoint_collecting): New.
437
        (collecting): New.
438
        (gdb_collect): New.
439
        (write_inferior_data_ptr): New.
440
        (target_tp_heap): New.
441
        (target_malloc): New.
442
        (download_agent_expr): New.
443
        (UALIGN): New.
444
        (download_tracepoints): New.
445
        (download_trace_state_variables): New.
446
        (upload_fast_traceframes): New.
447
        (IPA_FIRST_TRACEFRAME): New.
448
        (IPA_NEXT_TRACEFRAME_1): New.
449
        (IPA_NEXT_TRACEFRAME): New.
450
        [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
451
        [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
452
        (gdb_jump_pad_buffer_end): New.
453
        [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
454
        (initialize_tracepoint): Adjust.
455
        [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
456
        buffer.  Initialize the low module.
457
        * utils.c (PREFIX, TOOLNAME): New.
458
        (malloc_failure): Use PREFIX.
459
        (error): In the IPA, an error causes an exit.
460
        (fatal, warning): Use PREFIX.
461
        (internal_error): Use TOOLNAME.
462
        (NUMCELLS): Increase to 10.
463
        * configure, config.in: Regenerate.
464
 
465
2010-06-01  Pedro Alves  
466
 
467
        * server.c (handle_query) : Do two passes over the
468
        qSupported string to avoid nesting strtok.
469
 
470
2010-05-28  Jan Kratochvil  
471
 
472
        * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
473
        (CDEPS): New.
474
        * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping.  Test also
475
        -Wl,--dynamic-list.
476
        * configure: Regenerate.
477
        * proc-service.list: New.
478
 
479
2010-05-28  Jan Kratochvil  
480
 
481
        * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
482
        New comment.
483
 
484
2010-05-26  Ozkan Sezer  
485
 
486
        * gdbreplay.c (remote_open): Check error return from socket() call by
487
        its equality to -1 not by it being negative.
488
        * remote-utils.c (remote_open): Likewise.
489
 
490
2010-05-23  Pedro Alves  
491
 
492
        * config.h: Regenerate.
493
 
494
2010-05-19  Maxim Kuvyrkov  
495
 
496
        * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
497
        doesn't provide PTRACE_GET_THREAD_AREA.
498
 
499
2010-05-19  Maxim Kuvyrkov  
500
 
501
        * linux-m68k-low.c: Include 
502
        (ps_get_thread_area): Implement.
503
 
504
2010-05-03  Doug Evans  
505
 
506
        * event-loop.c (struct callback_event): New struct.
507
        (callback_list): New global.
508
        (append_callback_event, delete_callback_event): New functions.
509
        (process_callback): New function.
510
        (start_event_loop): Call it.
511
        * remote-utils.c (NOT_SCHEDULED): Define.
512
        (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
513
        moved out of readchar.
514
        (readchar): Rewrite.  Call reschedule before returning.
515
        (reset_readchar): New function.
516
        (remote_close): Call it.
517
        (process_remaining, reschedule): New functions.
518
        * server.h (callback_handler_func): New typedef.
519
        (append_callback_event, delete_callback_event): Declare.
520
 
521
2010-05-03  Pedro Alves  
522
 
523
        * proc-service.c (ps_pglobal_lookup): Use
524
        thread_db_look_up_one_symbol.
525
        * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
526
        parameter.  Use it instead of all_symbols_looked_up.
527
        * server.h (struct process_info) : Delete
528
        field.
529
        (all_symbols_looked_up): Don't declare.
530
        (look_up_one_symbol): Add new `may_ask_gdb' parameter.
531
        * thread-db.c (struct thread_db) : New
532
        field.
533
        (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
534
        Set all_symbols_looked_up here.
535
        (thread_db_look_up_one_symbol): New.
536
        (thread_db_get_tls_address): Adjust.
537
        (thread_db_load_search, try_thread_db_load_1): Always allocate the
538
        thread_db object on the heap, and tentatively set it in the
539
        process structure.
540
        (thread_db_init): Don't set all_symbols_looked_up here.
541
        * linux-low.h (thread_db_look_up_one_symbol): Declare.
542
 
543
2010-05-03  Pedro Alves  
544
 
545
        * linux-low.c (linux_kill, linux_detach): Adjust.
546
        (status_pending_p_callback): Remove redundant statement.  Check
547
        for !TARGET_WAITIKIND_IGNORE, instead of
548
        TARGET_WAITKIND_STOPPED.
549
        (handle_tracepoints): Make sure LWP is locked.  Adjust.
550
        (linux_wait_for_event_1): Adjust.
551
        (linux_cancel_breakpoints): New.
552
        (unsuspend_one_lwp): New.
553
        (unsuspend_all_lwps): New.
554
        (linux_wait_1): If finishing a step-over, unsuspend all lwps.
555
        (send_sigstop_callback): Change return type to int, add new
556
        `except' parameter and handle it.
557
        (suspend_and_send_sigstop_callback): New.
558
        (stop_all_lwps): Add new `suspend' and `expect' parameters, and
559
        pass them down.  If SUSPEND, also increment the lwp's suspend
560
        count.
561
        (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
562
        (need_step_over_p): Don't consider suspended LWPs.
563
        (start_step_over): Adjust.
564
        (proceed_one_lwp): Change return type to int, add new `except'
565
        parameter and handle it.
566
        (unsuspend_and_proceed_one_lwp): New.
567
        (proceed_all_lwps): Use find_inferior instead of
568
        for_each_inferior.
569
        (unstop_all_lwps): Add `unsuspend' parameter.  If UNSUSPEND, them
570
        also decrement the suspend count of LWPs.  Pass `except' down,
571
        instead of hacking its suspend count.
572
        (linux_pause_all): Add `freeze' parameter.  Adjust.
573
        (linux_unpause_all): New.
574
        (linux_target_ops): Install linux_unpause_all.
575
        * server.c (handle_status): Adjust.
576
        * target.h (struct target_ops): New fields `unpause_all' and
577
        `cancel_breakpoints'.  Add new parameter to `pause_all'.
578
        (pause_all): Add new `freeze' parameter.
579
        (unpause_all): New.
580
        (cancel_breakpoints): New.
581
        * tracepoint.c (clear_installed_tracepoints): Pause threads, and
582
        cancel breakpoints.
583
        (cmd_qtstart): Pause threads.
584
        (stop_tracing): Pause threads, and cancel breakpoints.
585
        * win32-low.c (win32_target_ops): Adjust.
586
 
587
2010-05-03  Pedro Alves  
588
 
589
        * linux-low.c (linux_wait_for_event_1): Move passing the signal to
590
        the inferior right away from here...
591
        (linux_wait_1): ... to here, and adjust to check the thread's
592
        last_resume_kind instead of the lwp's step or stop_expected flags.
593
 
594
2010-05-02  Pedro Alves  
595
 
596
        * README: Use consistent `GDB' and `GDBserver' spellings.
597
 
598
2010-05-02  Pedro Alves  
599
 
600
        * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
601
        (linux_kill): Stop all lwps here.  Don't delete the main lwp here.
602
        (linux_detach_one_lwp): Assume the lwp is stopped.
603
        (any_thread_of): Delete.
604
        (linux_detach): Stop all lwps here.  Don't blindly delete all
605
        breakpoints.
606
        (delete_lwp_callback): New.
607
        (linux_mourn): Delete all lwps of the process that is gone.
608
        (linux_wait_1): Don't delete the last lwp of the process here.
609
        * mem-break.h (mark_breakpoints_out): Declare.
610
        * mem-break.c (mark_breakpoints_out): New.
611
        (free_all_breakpoints): Use it.
612
        * server.c (handle_target_event): If the process is gone, mark
613
        breakpoints out.
614
        * thread-db.c (struct thread_db) : New field.
615
        (thread_db_enable_reporting): Fix prototype.  Store a thread event
616
        breakpoint reference in the thread_db struct.
617
        (thread_db_load_search): Clear the thread_db object.
618
        (try_thread_db_load_1): Ditto.
619
        (switch_to_process): New.
620
        (disable_thread_event_reporting): Use it.
621
        (remove_thread_event_breakpoints): New.
622
        (thread_db_detach, thread_db_mourn): Use it.
623
 
624
2010-05-01  Pedro Alves  
625
 
626
        * linux-low.c (linux_enable_event_reporting): New.
627
        (linux_wait_for_event_1, handle_extended_wait): Use it.
628
 
629
2010-04-30  Pedro Alves  
630
 
631
        * linux-low.c (linux_kill_one_lwp, linux_kill)
632
        (linux_detach_one_lwp): Adjust to send_sigstop interface change.
633
        (send_sigstop): Take an lwp_info as parameter instead.  Queue a
634
        SIGSTOP even if the LWP is stopped.
635
        (send_sigstop_callback): New.
636
        (stop_all_lwps): Use send_sigstop_callback instead.
637
        (linux_resume_one_thread): Adjust.
638
        (proceed_one_lwp): Still proceed an LWP that the client has
639
        requested to stop, if we haven't reported it as stopped yet.  Make
640
        sure that LWPs the client want stopped, have a pending SIGSTOP.
641
 
642
2010-04-26  Doug Evans  
643
 
644
        * server.c (handle_general_set): Make static.
645
 
646
        * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
647
        Print received char after testing for error/eof instead of before.
648
        (input_interrupt): Tweak comment.
649
 
650
2010-04-23  Doug Evans  
651
 
652
        * server.c (start_inferior): Print inferior argv if --debug.
653
 
654
2010-04-21  Aleksandar Ristovski  
655
 
656
        * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
657
        * nto-x86-low.c: Include server.h
658
 
659
2010-04-20  Pierre Muller  
660
 
661
        * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
662
        be consistent with other sources of this directory.
663
        (init_registers_amd64): Correct name of source file of this function
664
        in the comment.
665
 
666
2010-04-19  Pierre Muller  
667
 
668
        * configure.srv (x86_64-*-mingw*): New configuration for Windows
669
        64-bit executables.
670
 
671
2010-04-19  Pierre Muller  
672
 
673
        * win32-i386-low.c: Add 64-bit support.
674
        (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
675
        (init_registers_amd64): Declare.
676
        (mappings): Add 64-bit version of array.
677
        (init_windows_x86): New function.
678
        (the_low_target): Change init_arch field to init_windows_x86.
679
 
680
2010-04-19  Pierre Muller  
681
 
682
        * win32-low.c: Adapt to support also 64-bit architecture.
683
        (child_xfer_memory): Use uintptr_t type for local variable `addr'.
684
        (get_image_name): Use SIZE_T type for local variable `done'.
685
        (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
686
        (toolhelp_get_dll_name): Idem.
687
        (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
688
        Use uintptr_t typecast to avoid warning.
689
        (handle_unload_dll): Use uintptr_t typecast to avoid warning.
690
        (handle_exception): Use phex_nz to avoid warning.
691
        (win32_wait): Remove unused local variable `process'.
692
 
693
2010-04-19  Pierre Muller  
694
 
695
        * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
696
        `amd64-avx.o'.
697
 
698
2010-04-17  Pierre Muller  
699
 
700
        * configure.ac: Use `ws2_32' library for srv_mingw.
701
        * configure: Regenerate.
702
        * gdbreplay.c: Include winsock2.h instead of winsock.h.
703
        * remote-utils.c: Likewise.
704
 
705
2010-04-17  H.J. Lu  
706
 
707
        * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
708
        if __x86_64__ is defined.
709
 
710
2010-04-16  Pierre Muller  
711
 
712
        * configure: Regenerate.
713
 
714
2010-04-16  Pierre Muller  
715
 
716
        * server.c (handle_query): Handle 'qGetTIBAddr' query.
717
        * target.h (target_ops): New get_tib_address field.
718
        * win32-low.h (win32_thread_info): Add thread_local_base field.
719
        * win32-low.c (child_add_thread): Add tlb argument.
720
        Set thread_local_base field to TLB.
721
        (get_child_debug_event): Adapt to child_add_thread change.
722
        (win32_get_tib_address): New function.
723
        (win32_target_ops): Set get_tib_address field to
724
        win32_get_tib_address.
725
        * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
726
 
727
2010-04-12  Pedro Alves  
728
 
729
        * linux-low.c (linux_mourn): Also remove the process.
730
        * server.c (handle_target_event): Don't remove the process here.
731
        * nto-low.c (nto_mourn): New.
732
        (nto_target_ops): Install it.
733
        * spu-low.c (spu_mourn): New.
734
        (spu_target_ops): Install it.
735
        * win32-low.c (win32_mourn): New.
736
        (win32_target_ops): Install it.
737
 
738
2010-04-12  Pedro Alves  
739
 
740
        * server.h (buffer_xml_printf): Remove redundant `;'.
741
 
742
2010-04-12  Pedro Alves  
743
 
744
        * regcache.c (set_register_cache): Invalidate regcaches before
745
        changing the register cache layout.
746
        (regcache_invalidate_one): Allow a NULL regcache.
747
        * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
748
        regcaches before changing the register cache layout or the target
749
        regsets.
750
 
751
2010-04-12  H.J. Lu  
752
 
753
        * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
754
        variable warning on Linux/x86-64.
755
 
756
2010-04-11  Pedro Alves  
757
 
758
        GDBserver disconnected tracing support.
759
 
760
        * linux-low.c (linux_remove_process): Delete.
761
        (add_lwp): Don't set last_resume_kind here.
762
        (linux_kill): Use `mourn'.
763
        (linux_detach): Use `thread_db_detach', and `mourn'.
764
        (linux_mourn): New.
765
        (linux_attach_lwp_1): Adjust comment.
766
        (linux_attach): last_resume_kind moved the thread_info; adjust.
767
        (status_pending_p_callback): Adjust.
768
        (linux_wait_for_event_1): Adjust.
769
        (count_events_callback, select_singlestep_lwp_callback)
770
        (select_event_lwp_callback, cancel_breakpoints_callback)
771
        (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
772
        (proceed_one_lwp): Adjust.
773
        (linux_async): Add debug output.
774
        (linux_thread_stopped): New.
775
        (linux_pause_all): New.
776
        (linux_target_ops): Install linux_mourn, linux_thread_stopped and
777
        linux_pause_all.
778
        * linux-low.h (struct lwp_info): Delete last_resume_kind field.
779
        (thread_db_free): Delete declaration.
780
        (thread_db_detach, thread_db_mourn): Declare.
781
        * thread-db.c (thread_db_init): Use thread_db_mourn.
782
        (thread_db_free): Delete, split in two.
783
        (disable_thread_event_reporting): New.
784
        (thread_db_detach): New.
785
        (thread_db_mourn): New.
786
 
787
        * server.h (struct thread_info) : New field.
788
        : Add comment.
789
        : New field.
790
        (handler_func): Change return type to int.
791
        (handle_serial_event, handle_target_event): Ditto.
792
        (gdb_connected): Declare.
793
        (tracing): Delete.
794
        (disconnected_tracing): Declare.
795
        (stop_tracing): Declare.
796
 
797
        * server.c (handle_query) : Report support for
798
        disconnected tracing.
799
        (queue_stop_reply_callback): Account for running threads.
800
        (gdb_wants_thread_stopped): New.
801
        (gdb_wants_all_threads_stopped): New.
802
        (gdb_reattached_process): New.
803
        (handle_status): Clear the `gdb_detached' flag of all processes.
804
        In all-stop, stop all threads.
805
        (main): Be sure to leave tfind mode.  Handle disconnected tracing.
806
        (process_serial_event): If the remote connection breaks, or if an
807
        exit was forced with "monitor exit", force an event loop exit.
808
        Handle disconnected tracing on detach.
809
        (handle_serial_event): Adjust.
810
        (handle_target_event): If GDB isn't connected, forward events back
811
        to the inferior, unless the last process exited, in which case,
812
        exit gdbserver.  Adjust interface.
813
 
814
        * remote-utils.c (remote_open): Don't block in accept.  Instead
815
        register an event loop source on the listen socket file
816
        descriptor.  Refactor bits into ...
817
        (listen_desc): ... this new global.
818
        (gdb_connected): ... this new function.
819
        (enable_async_notification): ... this new function.
820
        (handle_accept_event): ... this new function.
821
        (remote_close): Clear remote_desc.
822
 
823
        * inferiors.c (add_thread): Set the new thread's last_resume_kind.
824
 
825
        * target.h (struct target_ops) :
826
        New fields.
827
        (mourn_inferior): Define.
828
        (target_process_qsupported): Avoid the dangling else problem.
829
        (thread_stopped): Define.
830
        (pause_all): Define.
831
        (target_waitstatus_to_string): Declare.
832
        * target.c (target_waitstatus_to_string): New.
833
 
834
        * tracepoint.c (tracing): Make extern.
835
        (disconnected_tracing): New.
836
        (stop_tracing): Make extern.  Handle tracing stops due to GDB
837
        disconnecting.
838
        (cmd_qtdisconnected): New.
839
        (cmd_qtstatus): Report disconnected tracing status in trace reply.
840
        (handle_tracepoint_general_set): Handle QTDisconnected.
841
 
842
        * event-loop.c (event_handler_func): Change return type to int.
843
        (process_event): Bail out if the event handler wants the event
844
        loop to stop.
845
        (handle_file_event): Ditto.
846
        (start_event_loop): Bail out if the event handler wants the event
847
        loop to stop.
848
 
849
        * nto-low.c (nto_target_ops): Adjust.
850
        * spu-low.c (spu_wait): Don't remove the process here.
851
        (spu_target_ops): Adjust.
852
        * win32-low.c (win32_wait): Don't remove the process here.
853
        (win32_target_ops): Adjust.
854
 
855
2010-04-11  Pedro Alves  
856
 
857
        * regcache.c (realloc_register_cache): Invalidate inferior's
858
        regcache before recreating it.
859
 
860
2010-04-09  Pedro Alves  
861
 
862
        * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
863
 
864
2010-04-09  Stan Shebs  
865
            Pedro Alves  
866
 
867
        * server.h (LONGEST): New.
868
        (struct thread_info) : New field.
869
        (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
870
        Declare.
871
        (initialize_tracepoint, handle_tracepoint_general_set)
872
        (handle_tracepoint_query, tracepoint_finished_step)
873
        (tracepoint_was_hit, release_while_stepping_state_list):
874
        (current_traceframe): Declare.
875
        * server.c (handle_general_set): Handle tracepoint packets.
876
        (read_memory): New.
877
        (write_memory): New.
878
        (handle_search_memory_1): Use read_memory.
879
        (handle_query): Report support for conditional tracepoints, trace
880
        state variables, and tracepoint sources.  Handle tracepoint
881
        queries.
882
        (main): Initialize the tracepoints module.
883
        (process_serial_event): Handle traceframe reads/writes.
884
 
885
        * linux-low.c (handle_tracepoints): New.
886
        (linux_wait_1): Call it.
887
        (linux_resume_one_lwp): Handle while-stepping.
888
        (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
889
        (linux_target_ops): Install them.
890
        * linux-low.h (struct linux_target_ops) :
891
        New field.
892
        * linux-x86-low.c (x86_supports_tracepoints): New.
893
        (the_low_target). Install it.
894
 
895
        * mem-break.h (delete_breakpoint): Declare.
896
        * mem-break.c (delete_breakpoint): Make external.
897
 
898
        * target.h (struct target_ops): Add `supports_tracepoints',
899
        `read_pc', and `write_pc' fields.
900
        (target_supports_tracepoints): Define.
901
        * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
902
        (phex_nz): New.
903
 
904
        * regcache.h (struct regcache) : New field.
905
        (init_register_cache, regcache_cpy): Declare.
906
        (regcache_read_pc, regcache_write_pc): Declare.
907
        (register_cache_size): Declare.
908
        (supply_regblock): Declare.
909
        * regcache.c (init_register_cache): New.
910
        (new_register_cache): Use it.
911
        (regcache_cpy): New.
912
        (register_cache_size): New.
913
        (supply_regblock): New.
914
        (regcache_read_pc, regcache_write_pc): New.
915
 
916
        * tracepoint.c: New.
917
 
918
        * Makefile.in (OBS): Add tracepoint.o.
919
        (tracepoint.o): New rule.
920
 
921
2010-04-08  H.J. Lu  
922
 
923
        * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
924
        (i386-mmx.o): New.
925
        (i386-mmx.c): Likewise.
926
        (i386-mmx-linux.o): Likewise.
927
        (i386-mmx-linux.c): Likewise.
928
 
929
        * configure.srv (srv_i386_regobj): Add i386-mmx.o.
930
        (srv_i386_linux_regobj): Add i386-mmx-linux.o.
931
        (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
932
        (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
933
 
934
        * linux-x86-low.c (init_registers_i386_mmx_linux): New.
935
        (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
936
        and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
937
 
938
2010-04-07  H.J. Lu  
939
 
940
        * Makefile.in (clean): Updated.
941
        (i386-avx.o): New.
942
        (i386-avx.c): Likewise.
943
        (i386-avx-linux.o): Likewise.
944
        (i386-avx-linux.c): Likewise.
945
        (amd64-avx.o): Likewise.
946
        (amd64-avx.c): Likewise.
947
        (amd64-avx-linux.o): Likewise.
948
        (amd64-avx-linux.c): Likewise.
949
 
950
        * configure.srv (srv_i386_regobj): Add i386-avx.o.
951
        (srv_i386_linux_regobj): Add i386-avx-linux.o.
952
        (srv_amd64_regobj): Add amd64-avx.o.
953
        (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
954
        (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
955
        (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
956
        (srv_i386_xmlfiles): Add i386/i386-avx.xml.
957
        (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
958
        (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
959
        (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
960
 
961
        * i387-fp.c: Include "i386-xstate.h".
962
        (i387_xsave): New.
963
        (i387_cache_to_xsave): Likewise.
964
        (i387_xsave_to_cache): Likewise.
965
        (x86_xcr0): Likewise.
966
 
967
        * i387-fp.h (i387_cache_to_xsave): Likewise.
968
        (i387_xsave_to_cache): Likewise.
969
        (x86_xcr0): Likewise.
970
 
971
        * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
972
        * linux-crisv32-low.c (target_regsets): Likewise.
973
        * linux-m68k-low.c (target_regsets): Likewise.
974
        * linux-mips-low.c (target_regsets): Likewise.
975
        * linux-ppc-low.c (target_regsets): Likewise.
976
        * linux-s390-low.c (target_regsets): Likewise.
977
        * linux-sh-low.c (target_regsets): Likewise.
978
        * linux-sparc-low.c (target_regsets): Likewise.
979
        * linux-xtensa-low.c (target_regsets): Likewise.
980
 
981
        * linux-low.c: Include .
982
        (regsets_fetch_inferior_registers): Support nt_type.
983
        (regsets_store_inferior_registers): Likewise.
984
        (linux_process_qsupported): New.
985
        (linux_target_ops): Add linux_process_qsupported.
986
 
987
        * linux-low.h (regset_info): Add nt_type.
988
        (linux_target_ops): Add process_qsupported.
989
 
990
        * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
991
        and .
992
        (init_registers_i386_avx_linux): New.
993
        (init_registers_amd64_avx_linux): Likewise.
994
        (xmltarget_i386_linux_no_xml): Likewise.
995
        (xmltarget_amd64_linux_no_xml): Likewise.
996
        (PTRACE_GETREGSET): Likewise.
997
        (PTRACE_SETREGSET): Likewise.
998
        (x86_fill_xstateregset): Likewise.
999
        (x86_store_xstateregset): Likewise.
1000
        (use_xml): Likewise.
1001
        (x86_linux_update_xmltarget): Likewise.
1002
        (x86_linux_process_qsupported): Likewise.
1003
        (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
1004
        (x86_arch_setup): Don't call init_registers_amd64_linux nor
1005
        init_registers_i386_linux here.  Call
1006
        x86_linux_update_xmltarget.
1007
        (the_low_target): Add x86_linux_process_qsupported.
1008
 
1009
        * server.c (handle_query): Call target_process_qsupported.
1010
 
1011
        * target.h (target_ops): Add process_qsupported.
1012
        (target_process_qsupported): New.
1013
 
1014
2010-04-03  Pedro Alves  
1015
 
1016
        * inferiors.c (add_thread): Set last_status kind to
1017
        TARGET_WAITKIND_IGNORE.
1018
        * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
1019
        fetch.  Use ptid_of.  Avoid unnecessary get_lwp_thread calls.
1020
        (linux_wait_1): Move `thread' local definition to block that uses
1021
        it.  Don't NULL initialize `event_child'.
1022
        (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
1023
        Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
1024
        * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
1025
 
1026
2010-04-01  Pedro Alves  
1027
 
1028
        * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
1029
        an extended waitstatus, or by a watchpoint.
1030
        (cancel_breakpoints_callback): Don't cancel a breakpoint if the
1031
        thread was stepping or has been stopped by a watchpoint.
1032
 
1033
2010-04-01  Pedro Alves  
1034
 
1035
        * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
1036
        (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
1037
        of another, then delete the previous, and validate all
1038
        breakpoints.
1039
        (validate_inserted_breakpoint): New.
1040
        (delete_disabled_breakpoints): New.
1041
        (validate_breakpoints): New.
1042
        (check_mem_read): Validate breakpoints before trusting their
1043
        shadow.  Delete disabled breakpoints.
1044
        (check_mem_write): Validate breakpoints before trusting they
1045
        should be inserted.  Delete disabled breakpoints.
1046
        * mem-break.h (validate_breakpoints):
1047
        * server.c (handle_query): Validate breakpoints when we see a
1048
        qSymbol query.
1049
 
1050
2010-04-01  Pedro Alves  
1051
 
1052
        * linux-low.c (linux_wait_1): Avoid setting need_step_over is
1053
        there's a GDB breakpoint at stop_pc.  Always report a trap to GDB
1054
        if we could tell there's a GDB breakpoint at stop_pc.
1055
        (need_step_over_p): Don't do a step over if we find a GDB
1056
        breakpoint at the resume PC.
1057
 
1058
        * mem-break.c (struct raw_breakpoint): New.
1059
        (enum bkpt_type): New type `gdb_breakpoint'.
1060
        (struct breakpoint): Delete the `PC', `old_data' and `inserted'
1061
        fields.  New field `raw'.
1062
        (find_raw_breakpoint_at): New.
1063
        (set_raw_breakpoint_at): Handle refcounting.  Create a raw
1064
        breakpoint instead.
1065
        (set_breakpoint_at): Adjust.
1066
        (delete_raw_breakpoint): New.
1067
        (release_breakpoint): New.
1068
        (delete_breakpoint): Rename to...
1069
        (delete_breakpoint_1): ... this.  Add proc parameter.  Use
1070
        release_breakpoint.  Return ENOENT.
1071
        (delete_breakpoint): Reimplement.
1072
        (find_breakpoint_at): Delete.
1073
        (find_gdb_breakpoint_at): New.
1074
        (delete_breakpoint_at): Delete.
1075
        (set_gdb_breakpoint_at): New.
1076
        (delete_gdb_breakpoint_at): New.
1077
        (gdb_breakpoint_here): New.
1078
        (set_reinsert_breakpoint): Use release_breakpoint.
1079
        (uninsert_breakpoint): Rename to ...
1080
        (uninsert_raw_breakpoint): ... this.
1081
        (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
1082
        (reinsert_raw_breakpoint): Change parameter type to
1083
        raw_breakpoint.
1084
        (reinsert_breakpoints_at): Adjust to handle raw breakpoints
1085
        instead.
1086
        (check_breakpoints): Adjust.  Use release_breakpoint.
1087
        (breakpoint_here): Rewrite using find_raw_breakpoint_at.
1088
        (breakpoint_inserted_here): Ditto.
1089
        (check_mem_read): Adjust to iterate over raw breakpoints instead.
1090
        Don't trust the breakpoint's shadow if it is not inserted.
1091
        (check_mem_write): Adjust to iterate over raw breakpoints instead.
1092
        (delete_all_breakpoints): Adjust.
1093
        (free_all_breakpoints): Mark all breakpoints as uninserted, and
1094
        use delete_breakpoint_1.
1095
 
1096
        * mem-break.h (breakpoints_supported): Delete declaration.
1097
        (set_gdb_breakpoint_at): Declare.
1098
        (gdb_breakpoint_here): Declare.
1099
        (delete_breakpoint_at): Delete.
1100
        (delete_gdb_breakpoint_at): Declare.
1101
 
1102
        * server.h (struct raw_breakpoint): Forward declare.
1103
        (struct process_info): New field `raw_breakpoints'.
1104
 
1105
        * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
1106
        breakpoints.
1107
 
1108
2010-03-24  Pedro Alves  
1109
 
1110
        * linux-low.c (status_pending_p_callback): Fix comment.
1111
        (linux_wait_for_event_1): Move most of the internal breakpoint
1112
        handling from here...
1113
        (linux_wait_1): ... to here.
1114
        (count_events_callback): New.
1115
        (select_singlestep_lwp_callback): New.
1116
        (select_event_lwp_callback): New.
1117
        (cancel_breakpoints_callback): New.
1118
        (select_event_lwp): New.
1119
        (linux_wait_1): Simplify internal breakpoint handling.  Give equal
1120
        priority to all LWPs that have had events that should be reported
1121
        to the client.  Cancel breakpoints when about to reporting the
1122
        event to the client, not while stopping lwps.  No longer cancel
1123
        finished single-steps here.
1124
        (cancel_finished_single_step): Delete.
1125
        (cancel_finished_single_steps): Delete.
1126
 
1127
2010-03-24  Pedro Alves  
1128
 
1129
        * mem-break.c (enum bkpt_type): New.
1130
        (struct breakpoint): New field `type'.
1131
        (set_breakpoint_at): Change return type to struct breakpoint
1132
        pointer.  Set type to `other_breakpoint' by default.
1133
        (delete_breakpoint): Rewrite, supporting more than one breakpoint
1134
        in the breakpoint list.
1135
        (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
1136
        (reinsert_breakpoint): Rename to ...
1137
        (reinsert_raw_breakpoint): ... this.
1138
        (reinsert_breakpoints_at): Adjust.
1139
        * mem-break.h (struct breakpoint): Declare.
1140
        (set_breakpoint_at): Change return type to struct breakpoint
1141
        pointer.
1142
 
1143
2010-03-24  Pedro Alves  
1144
 
1145
        * server.c (handle_query): Assign, not compare.
1146
 
1147
2010-03-24  Pedro Alves  
1148
 
1149
        Teach linux gdbserver to step-over-breakpoints.
1150
 
1151
        * linux-low.c (can_hardware_single_step): New.
1152
        (supports_breakpoints): New.
1153
        (handle_extended_wait): If stopping threads, read the stop pc of
1154
        the new cloned LWP.
1155
        (get_pc): New.
1156
        (get_stop_pc): Add `lwp' parameter.  Handle it.  Bail out if the
1157
        low target doesn't support retrieving the PC.
1158
        (add_lwp): Set last_resume_kind to resume_continue.
1159
        (linux_attach_lwp_1): Adjust comments.  Always set stop_expected.
1160
        (linux_attach): Don't clear stop_expected.  Set the lwp's
1161
        last_resume_kind to resume_stop.
1162
        (linux_detach_one_lwp): Don't check for removed breakpoints.
1163
        (check_removed_breakpoint): Delete.
1164
        (status_pending_p): Rename to ...
1165
        (status_pending_p_callback): ... this.  Don't check for removed
1166
        breakpoints.  Don't consider threads that are stopped from GDB's
1167
        perspective.
1168
        (linux_wait_for_lwp): Always read the stop_pc here.
1169
        (cancel_breakpoint): New.
1170
        (step_over_bkpt): New global.
1171
        (linux_wait_for_event_1): Implement stepping over breakpoints.
1172
        (gdb_wants_lwp_stopped): New.
1173
        (gdb_wants_all_stopped): New.
1174
        (linux_wait_1): Tag threads as gdb-wants-stopped.  Cancel finished
1175
        single-step traps here.  Store the thread's last reported target
1176
        wait status.
1177
        (send_sigstop): Don't clear stop_expected.  Always set it,
1178
        instead.
1179
        (mark_lwp_dead): Remove reference to pending_is_breakpoint.
1180
        (cancel_finished_single_step): New.
1181
        (cancel_finished_single_steps): New.
1182
        (wait_for_sigstop): Don't cancel finished single-step traps here.
1183
        (linux_resume_one_lwp): Don't check for removed breakpoints.
1184
        Don't set `step' on non-hardware step archs.
1185
        (linux_set_resume_request): Ignore resume_stop requests if already
1186
        stopping or stopped.  Set the lwp's last_resume_kind.
1187
        (resume_status_pending_p): Don't check for removed breakpoints.
1188
        (need_step_over_p): New.
1189
        (start_step_over): New.
1190
        (finish_step_over): New.
1191
        (linux_resume_one_thread): Always queue a sigstop for resume_stop
1192
        requests.  Clear the thread's last reported target waitstatus.
1193
        Don't use the `suspended' flag.  Don't consider pending breakpoints.
1194
        (linux_resume): Start a step-over if necessary.
1195
        (proceed_one_lwp): New.
1196
        (proceed_all_lwps): New.
1197
        (unstop_all_lwps): New.
1198
        * linux-low.h (struct lwp_info): Rewrite comment for the
1199
        `suspended' flag.  Add the `stop_pc' field.  Delete the
1200
        `pending_stop_pc' field.  Tweak the `stepping' flag's comment.
1201
        Add `'last_resume_kind' and `need_step_over' fields.
1202
        * inferiors.c (struct thread_info): Delete, moved elsewhere.
1203
        * mem-break.c (struct breakpoint): Delete `reinserting' flag.
1204
        Delete `breakpoint_to_reinsert' field.  New flag `inserted'.
1205
        (set_raw_breakpoint_at): New.
1206
        (set_breakpoint_at): Rewrite to use it.
1207
        (reinsert_breakpoint_handler): Delete.
1208
        (set_reinsert_breakpoint): New.
1209
        (reinsert_breakpoint_by_bp): Delete.
1210
        (delete_reinsert_breakpoints): New.
1211
        (uninsert_breakpoint): Rewrite.
1212
        (uninsert_breakpoints_at): New.
1213
        (reinsert_breakpoint): Rewrite.
1214
        (reinsert_breakpoints_at): New.
1215
        (check_breakpoints): Rewrite.
1216
        (breakpoint_here): New.
1217
        (breakpoint_inserted_here): New.
1218
        (check_mem_read): Adjust.
1219
        * mem-break.h (breakpoints_supported, breakpoint_here)
1220
        (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
1221
        (reinsert_breakpoint_by_bp): Delete declaration.
1222
        (delete_reinsert_breakpoints): Declare.
1223
        (reinsert_breakpoint): Delete declaration.
1224
        (reinsert_breakpoints_at): Declare.
1225
        (uninsert_breakpoint): Delete declaration.
1226
        (uninsert_breakpoints_at): Declare.
1227
        (check_breakpoints): Adjust prototype.
1228
        * server.h: Adjust include order.
1229
        (struct thread_info): Declare here.  Add a `last_status' field.
1230
 
1231
2010-03-23  Michael Snyder  
1232
 
1233
        * server.c (crc32): New function.
1234
        (handle_query): Add handling for 'qCRC:' request.
1235
 
1236
2010-03-23  Pedro Alves  
1237
 
1238
        * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
1239
        lwp had been stopped by a watchpoint.
1240
 
1241
2010-03-16  Pedro Alves  
1242
 
1243
        * server.h (internal_error): Declare.
1244
        (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
1245
        * utils.c (internal_error): New function.
1246
 
1247
2010-03-15  Andreas Schwab  
1248
 
1249
        * configure.srv: Fix typo setting srv_regobj.
1250
 
1251
2010-03-15  Pedro Alves  
1252
 
1253
        * linux-low.c (fetch_register): Avoid passing a non string literal
1254
        format to `error'.
1255
        (usr_store_inferior_registers): Ditto.
1256
 
1257
2010-03-14  Pedro Alves  
1258
 
1259
        * linux-low.c (linux_write_memory): Bail out early if peeking
1260
        memory failed.
1261
 
1262
2010-03-14  Pedro Alves  
1263
 
1264
        * linux-low.h (struct lwp_info): New fields
1265
        `stopped_by_watchpoint' and `stopped_data_address'.
1266
        * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
1267
        here, and cache them in the lwp object.
1268
        (wait_for_sigstop): Check stopped_by_watchpoint lwp field
1269
        directly.
1270
        (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
1271
        field.
1272
        (linux_stopped_by_watchpoint): Rewrite.
1273
        (linux_stopped_data_address): Rewrite.
1274
 
1275
2010-03-06  Simo Melenius  
1276
 
1277
        * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
1278
        switching the current inferior, not before.
1279
 
1280
2010-03-01  H.J. Lu  
1281
 
1282
        * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
1283
        reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
1284
        i386-linux.c and amd64-linux.c.
1285
        (reg-i386.o): Removed.
1286
        (reg-i386.c): Likewise.
1287
        (reg-i386-linux.o): Likewise.
1288
        (reg-i386-linux.c): Likewise.
1289
        (reg-x86-64.o): Likewise.
1290
        (reg-x86-64.c): Likewise.
1291
        (reg-x86-64-linux.o): Likewise.
1292
        (reg-x86-64-linux.c): Likewise.
1293
        (i386.o): New.
1294
        (i386.c): Likewise.
1295
        (i386-linux.o): Likewise.
1296
        (i386-linux.c): Likewise.
1297
        (amd64.o): Likewise.
1298
        (amd64.c): Likewise.
1299
        (amd64-linux.o): Likewise.
1300
        (amd64-linux.c): Likewise.
1301
 
1302
        * configure.srv (srv_i386_regobj): New.
1303
        (srv_i386_linux_regobj): Likewise.
1304
        (srv_amd64_regobj): Likewise.
1305
        (srv_amd64_linux_regobj): Likewise.
1306
        (srv_i386_32bit_xmlfiles): Likewise.
1307
        (srv_i386_64bit_xmlfiles): Likewise.
1308
        (srv_i386_xmlfiles): Likewise.
1309
        (srv_amd64_xmlfiles): Likewise.
1310
        (srv_i386_linux_xmlfiles): Likewise.
1311
        (srv_amd64_linux_xmlfiles): Likewise.
1312
        (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj.  Set
1313
        srv_xmlfiles to $srv_i386_xmlfiles.
1314
        (i[34567]86-*-mingw32ce*): Likewise.
1315
        (i[34567]86-*-mingw*): Likewise.
1316
        (i[34567]86-*-nto*): Likewise.
1317
        (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
1318
        and $srv_amd64_linux_regobj.  Set srv_xmlfiles to
1319
        $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
1320
        (x86_64-*-linux*): Likewise.
1321
 
1322
        * linux-x86-low.c (init_registers_x86_64_linux): Removed.
1323
        (init_registers_amd64_linux): New.
1324
        (x86_arch_setup): Replace init_registers_x86_64_linux with
1325
        init_registers_amd64_linux.
1326
 
1327
2010-02-23  Maxim Kuvyrkov  
1328
 
1329
        * configure.ac: Check for libdl.  If it is not available link against
1330
        static libthread_db.
1331
        * configure: Regenerate.
1332
 
1333
2010-02-22  Pedro Alves  
1334
 
1335
        PR9605
1336
 
1337
        * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
1338
        handing a read watchpoint.
1339
        (i386_low_insert_watchpoint): Read watchpoints aren't supported.
1340
 
1341
2010-02-12  Doug Evans  
1342
 
1343
        * linux-low.c (linux_supports_tracefork_flag): Document.
1344
        (linux_look_up_symbols): Add comment.
1345
 
1346
2010-02-03  H.J. Lu  
1347
 
1348
        * regcache.c (supply_register): Clear regcache if buf is NULL.
1349
 
1350
2010-02-02  Nicolas Roche  
1351
            Joel Brobecker  
1352
 
1353
        * inferiors.c (find_inferior): Add function documentation.
1354
        (unloaded_dll): Handle the case where the unloaded dll has not
1355
        been previously registered in the dll list.
1356
 
1357
2010-02-01  Daniel Jacobowitz  
1358
 
1359
        * linux-arm-low.c (thumb_breakpoint_len): Delete.
1360
        (thumb2_breakpoint): New.
1361
        (arm_breakpoint_at): Check for Thumb-2 breakpoints.
1362
 
1363
2010-01-29  Daniel Jacobowitz  
1364
 
1365
        * linux-low.c (get_stop_pc): Check for SIGTRAP.
1366
        (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
1367
        breakpoints.
1368
 
1369
2010-01-21  Pedro Alves  
1370
 
1371
        * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
1372
 
1373
2010-01-21  Jan Kratochvil  
1374
 
1375
        * linux-s390-low.c (s390_collect_ptrace_register)
1376
        (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
1377
 
1378
2010-01-21  Doug Evans  
1379
 
1380
        * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
1381
        (PTRACE_ARG4_TYPE): New macro.
1382
        (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
1383
        (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
1384
        (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
1385
        (usr_store_inferior_registers): Ditto.
1386
        (linux_read_memory, linux_write_memory): Ditto.
1387
        (linux_test_for_tracefork): Ditto.
1388
 
1389
        * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
1390
        Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
1391
 
1392
2010-01-21  Pedro Alves  
1393
 
1394
        * proc-service.c (ps_lgetregs): Don't refetch registers from the
1395
        target.
1396
 
1397
2010-01-21  Pedro Alves  
1398
 
1399
        * spu-low.c (spu_fetch_registers, spu_store_registers): Change
1400
        prototype to take a regcache.  Adjust.
1401
 
1402
2010-01-20  Pedro Alves  
1403
 
1404
        * regcache.h (struct thread_info): Forward declare.
1405
        (struct regcache): New.
1406
        (new_register_cache): Adjust prototype.
1407
        (get_thread_regcache): Declare.
1408
        (free_register_cache): Adjust prototype.
1409
        (registers_to_string, registers_from_string): Ditto.
1410
        (supply_register, supply_register_by_name, collect_register)
1411
        (collect_register_as_string, collect_register_by_name): Ditto.
1412
        * regcache.c (struct inferior_regcache_data): Delete.
1413
        (get_regcache): Rename to ...
1414
        (get_thread_regcache): ... this.  Adjust.  Switch inferior before
1415
        fetching registers.
1416
        (regcache_invalidate_one): Adjust.
1417
        (regcache_invalidate): Fix prototype.
1418
        (new_register_cache): Return the new register cache.
1419
        (free_register_cache): Change prototype.
1420
        (realloc_register_cache): Adjust.
1421
        (registers_to_string): Change prototype to take a regcache.  Adjust.
1422
        (registers_from_string): Ditto.
1423
        (register_data): Ditto.
1424
        (supply_register): Ditto.
1425
        (supply_register_by_name): Ditto.
1426
        (collect_register): Ditto.
1427
        (collect_register_as_string): Ditto.
1428
        (collect_register_by_name): Ditto.
1429
        * server.c (process_serial_event): Adjust.
1430
        * linux-low.h (regset_fill_func, regset_store_func): Change
1431
        prototype.
1432
        (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
1433
        Change prototype.
1434
        * linux-low.c (get_stop_pc): Adjust.
1435
        (check_removed_breakpoint): Adjust.
1436
        (linux_wait_for_event): Adjust.
1437
        (linux_resume_one_lwp): Adjust.
1438
        (fetch_register): Add regcache parameter.  Adjust.
1439
        (usr_store_inferior_registers): Ditto.
1440
        (regsets_fetch_inferior_registers): Ditto.
1441
        (regsets_store_inferior_registers): Ditto.
1442
        (linux_fetch_registers, linux_store_registers): Ditto.
1443
        * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
1444
        regcache.  Adjust.
1445
        (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
1446
        * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
1447
        prototype to take a regcache.
1448
        (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
1449
        * remote-utils.c (convert_ascii_to_int, outreg)
1450
        (prepare_resume_reply): Change prototype to take a regcache.
1451
        Adjust.
1452
        * target.h (struct target_ops) :
1453
        Change prototype to take a regcache.
1454
        (fetch_inferior_registers, store_inferior_registers): Change
1455
        prototype to take a regcache.  Adjust.
1456
        * proc-service.c (ps_lgetregs): Adjust.
1457
        * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
1458
        (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
1459
        (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
1460
        take a regcache.  Adjust.
1461
        * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
1462
        (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
1463
        (arm_store_vfpregset, arm_get_pc, arm_set_pc):
1464
        (arm_breakpoint_at): Change prototype to take a regcache.  Adjust.
1465
        * linux-cris-low.c (cris_get_pc, cris_set_pc)
1466
        (cris_cannot_fetch_register):
1467
        (cris_breakpoint_at): Change prototype to take a regcache.
1468
        Adjust.
1469
        * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
1470
        cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
1471
        to take a regcache.  Adjust.
1472
        (cris_breakpoint_at, cris_insert_point, cris_remove_point):
1473
        Adjust.
1474
        * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
1475
        take a regcache.  Adjust.
1476
        * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
1477
        (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
1478
        (m68k_set_pc): Change prototype to take a regcache.  Adjust.
1479
        * linux-mips-low.c (mips_get_pc):
1480
        (mips_set_pc): Change prototype to take a regcache.  Adjust.
1481
        (mips_reinsert_addr): Adjust.
1482
        (mips_collect_register): Change prototype to take a regcache.
1483
        Adjust.
1484
        (mips_supply_register):
1485
        (mips_collect_register_32bit, mips_supply_register_32bit)
1486
        (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
1487
        (mips_store_fpregset): Ditto.
1488
        * linux-ppc-low.c (ppc_supply_ptrace_register, ppc_supply_ptrace_register):
1489
        Ditto.
1490
        (parse_spufs_run): Adjust.
1491
        (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
1492
        (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
1493
        (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
1494
        take a regcache.  Adjust.
1495
        * linux-s390-low.c (s390_collect_ptrace_register)
1496
        (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
1497
        (s390_set_pc): Change prototype to take a regcache.  Adjust.
1498
        (s390_arch_setup): Adjust.
1499
        * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
1500
        (sh_fill_gregset): Change prototype to take a regcache.  Adjust.
1501
        * linux-sparc-low.c (sparc_fill_gregset_to_stack)
1502
        (sparc_fill_gregset, sparc_store_gregset_from_stack)
1503
        (sparc_store_gregset, sparc_get_pc): Change prototype to take a
1504
        regcache.  Adjust.
1505
        (sparc_breakpoint_at): Adjust.
1506
        * linux-xtensa-low.c (xtensa_fill_gregset):
1507
        (xtensa_store_gregset):
1508
        (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
1509
        (xtensa_set_pc): Change prototype to take a regcache.  Adjust.
1510
        * nto-low.c (nto_fetch_registers, nto_store_registers): Change
1511
        prototype to take a regcache.  Adjust.
1512
        * win32-arm-low.c (arm_fetch_inferior_register)
1513
        (arm_store_inferior_register): Change prototype to take a
1514
        regcache.  Adjust.
1515
        * win32-i386-low.c (i386_fetch_inferior_register)
1516
        (i386_store_inferior_register): Change prototype to take a
1517
        regcache.  Adjust.
1518
        * win32-low.c (child_fetch_inferior_registers)
1519
        (child_store_inferior_registers): Change prototype to take a
1520
        regcache.  Adjust.
1521
        (win32_wait): Adjust.
1522
        (win32_fetch_inferior_registers): Change prototype to take a
1523
        regcache.  Adjust.
1524
        (win32_store_inferior_registers): Adjust.
1525
        * win32-low.h (struct win32_target_ops) 
1526
        store_inferior_register>: Change prototype to take a regcache.
1527
 
1528
2010-01-20  Doug Evans  
1529
 
1530
        * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
1531
        #ifdef.
1532
        (linux_wait_for_event1, linux_init_signals): Ditto.
1533
        (W_STOPCODE): Provide definition if missing.
1534
 
1535
2010-01-13  Vladimir Prus  
1536
 
1537
        * linux-low.c (linux_core_of_thread): New.
1538
        (compare_ints, show_process, list_threads): New.
1539
        (linux_qxfer_osdata): Report threads and cores.
1540
        (linux_target_op): Register linux_core_of_thread.
1541
        * remote-utils.c (prepare_resume_reply): Report the core.
1542
        (buffer_xml_printf): Support %d specifier.
1543
        * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
1544
        New.
1545
        (handle_query): Handle qXfer:threads.  Announce availability
1546
        thereof.
1547
        * target.h (struct target_ops): New field core_of_thread.
1548
 
1549
2010-01-04  Ulrich Weigand  
1550
 
1551
        * Makefile.in (clean): Remove new generated files.
1552
        (reg-s390.o, reg-s390.c): Remove rules.
1553
        (reg-s390x.o, reg-s390x.c): Likewise.
1554
        (s390-linux32.o, s390-linux32.c): Add rules.
1555
        (s390-linux64.o, s390-linux64.c): Likewise.
1556
        (s390x-linux64.o, s390x-linux64.c): Likewise.
1557
        * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
1558
        * linux-s390-low.c: Include .
1559
        (HWCAP_S390_HIGH_GPRS): Define if undefined.
1560
        (init_registers_s390): Remove prototype.
1561
        (init_registers_s390x): Likewise.
1562
        (init_registers_s390_linux32): Add prototype.
1563
        (init_registers_s390_linux64): Likewise.
1564
        (init_registers_s390x_linux64): Likewise.
1565
        (s390_num_regs_3264): New define.
1566
        (s390_regmap_3264): New global variable.
1567
        (s390_cannot_fetch_register): Remove obsolete check.
1568
        (s390_cannot_store_register): Likewise.
1569
        (s390_collect_ptrace_register): Handle upper/lower register halves.
1570
        (s390_supply_ptrace_register): Likewise.
1571
        (s390_fill_gregset): Update to register number changes.
1572
        (s390_get_hwcap): New routine.
1573
        (s390_arch_setup): Detect 32-bit process running on 64-bit system.
1574
        Install appropriate regmap and register set.
1575
 
1576
2010-01-01  Joel Brobecker  
1577
 
1578
        * server.c (gdbserver_version): Update copyright year to 2010.
1579
        * gdbreplay.c (gdbreplay_version): Likewise.
1580
 
1581
2009-12-28  Doug Evans  
1582
 
1583
        * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
1584
        elf/external.h.  Include  instead but only if necessary.
1585
 
1586
2009-12-28  Pedro Alves  
1587
 
1588
        * linux-low.c (linux_remove_process): Remove `detaching'
1589
        parameter.  Don't release/detach from thread_db here.
1590
        (linux_kill): Release/detach from thread_db here, ...
1591
        (linux_detach): ... and here, before actually detaching.
1592
        (linux_wait_1): ... and here, when a process exits.
1593
        * thread-db.c (any_thread_of): New.
1594
        (thread_db_free): Switch the current inferior to a thread of the
1595
        passed in process.
1596
 
1597
2009-12-21  Doug Evans  
1598
 
1599
        * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
1600
 
1601
        * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
1602
        Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
1603
        warning ifndef __NR_tkill.  Move setting of errno there too.
1604
        Delete unnecessary resetting of errno after syscall.
1605
        Minor comment changes to match gdb/linux-nat.c:kill_lwp.
1606
 
1607
        * configure.ac: Check for dladdr.
1608
        * config.in: Regenerate.
1609
        * configure: Regenerate.
1610
        * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
1611
        (try_thread_db_load): Update.
1612
 
1613
        * linux-low.c (my_waitpid): Delete unnecessary prototype.
1614
 
1615
2009-12-18  Doug Evans  
1616
 
1617
        * event-loop.c: Include unistd.h if it exists.
1618
 
1619
        * linux-low.c (my_waitpid): Move definition away from being in
1620
        between linux_tracefork_child/linux_test_for_tracefork.
1621
 
1622
        * gdb_proc_service.h (psaddr_t): Fix type.
1623
        * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
1624
        signature to match glibc.
1625
 
1626
2009-12-16  Doug Evans  
1627
 
1628
        * linux-low.c (linux_read_memory): Fix argument to read.
1629
 
1630
2009-11-26  Pedro Alves  
1631
 
1632
        * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
1633
        events, don't leave current_inferior pointing at null.
1634
 
1635
2009-11-26  Pedro Alves  
1636
 
1637
        * win32-low.c (LOG): Delete.
1638
        (OUTMSG): Output to stderr.
1639
        (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
1640
        on compile time LOG macro.
1641
        (win32_wait): Fix debug output.
1642
 
1643
2009-11-26  Pedro Alves  
1644
 
1645
        * win32-low.c (win32_add_one_solib): If the dll name is
1646
        "ntdll.dll", prepend the system directory to the dll path.
1647
 
1648
2009-11-17  Daniel Jacobowitz  
1649
 
1650
        * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
1651
 
1652
2009-11-17  Nathan Sidwell  
1653
            Vladimir Prus  
1654
 
1655
        * Makefile.in (reg-cf.o, reg-cf.c): New targets.
1656
        * configure.ac: Check for __mcoldfire__ and set
1657
        gdb_cv_m68k_is_coldfire.
1658
        * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
1659
        reg-cf.o and reg-m68k.o.
1660
        * configure: Regenerated.
1661
 
1662
2009-11-16  Pedro Alves  
1663
 
1664
        * linux-low.c (linux_remove_process): Add `detaching' parameter.
1665
        Pass it to thread_db_free.
1666
        (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
1667
        proper `detaching' argument to linux_remove_process.
1668
        * linux-low.h (thread_db_free): Add `detaching' parameter.
1669
        * thread-db.c (thread_db_init): Pass false as `detaching' argument
1670
        to thread_db_free.
1671
        (thread_db_free): Add `detaching' parameter.  Only
1672
        call td_ta_clear_event if detaching from process.
1673
 
1674
2009-11-12  Maxim Kuvyrkov  
1675
 
1676
        * thread-db.c (thread_db_free): Fix typo.
1677
 
1678
2009-11-11  Paul Pluzhnikov  
1679
 
1680
        PR gdb/10838
1681
        * thread-db.c (thread_db_free): Call td_ta_clear_event.
1682
 
1683
2009-11-03  Nathan Sidwell  
1684
 
1685
        * configure.ac (i[34567]86-*): Check if we're targetting x86-64
1686
        with an i686 compiler.
1687
        * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
1688
        needed.
1689
        * configure: Rebuilt.
1690
 
1691
2009-10-29  Sandra Loosemore  
1692
 
1693
        PR gdb/10783
1694
 
1695
        * server.c (handle_search_memory_1): Correct read_addr initialization
1696
        in loop for searching subsequent chunks.
1697
 
1698
2009-10-29  Paul Pluzhnikov  
1699
 
1700
        * configure.ac: New --with-libthread-db option.
1701
        * thread-db.c: Allow direct dependence on libthread_db.
1702
        (thread_db_free): Adjust.
1703
        * config.in: Regenerate.
1704
        * configure: Likewise.
1705
 
1706
2009-10-28  Paul Pluzhnikov  
1707
 
1708
        PR gdb/10757
1709
        * thread-db.c (attach_thread): New function.
1710
        (maybe_attach_thread): Return success/failure.
1711
        (find_new_threads_callback): Adjust.
1712
        (thread_db_find_new_threads): Loop until no new threads.
1713
 
1714
2009-10-13  Pedro Alves  
1715
 
1716
        * proc-service.c (ps_lgetregs): Formatting.
1717
 
1718
2009-10-08  Paul Pluzhnikov  
1719
 
1720
        * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
1721
        * configure.ac: Adjust.
1722
        * linux-low.h (struct process_info_private): Move members to struct
1723
        thread_db.
1724
        (thread_db_free, thread_db_handle_monitor_command): New prototype.
1725
        * linux-low.c (linux_remove_process): Adjust.
1726
        (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
1727
        * server.c (handle_query): Move code ...
1728
        (handle_monitor_command): ... here. New function.
1729
        * target.h (struct target_ops): New member.
1730
        * thread-db.c (struct thread_db): New.
1731
        (libthread_db_search_path): New variable.
1732
        (thread_db_create_event, thread_db_enable_reporting)
1733
        (find_one_thread, maybe_attach_thread, find_new_threads_callback)
1734
        (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
1735
        (try_thread_db_load_1, dladdr_to_soname): New functions.
1736
        (try_thread_db_load, thread_db_load_search): New functions.
1737
        (thread_db_init): Search for libthread_db.
1738
        (thread_db_free): New function.
1739
        (thread_db_handle_monitor_command): Likewise.
1740
        * config.in: Regenerate.
1741
        * configure: Regenerate.
1742
 
1743
2009-09-27  Ulrich Weigand  
1744
 
1745
        * spu-low.c (spu_kill): Wait for inferior to terminate.
1746
        Call clear_inferiors.
1747
        (spu_detach): Call clear_inferiors.
1748
 
1749
2009-08-22  Ralf Wildenhues  
1750
 
1751
        * aclocal.m4: Regenerate.
1752
        * config.in: Likewise.
1753
        * configure: Likewise.
1754
 
1755
2009-07-31  Ulrich Weigand  
1756
 
1757
        * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
1758
        (parse_spufs_run): New function.
1759
        (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
1760
        (ppc_breakpoint_at): Handle SPU breakpoints.
1761
 
1762
2009-07-31  Ulrich Weigand  
1763
 
1764
        * linux-low.c: Include  and .
1765
        (SPUFS_MAGIC): Define.
1766
        (spu_enumerate_spu_ids): New function.
1767
        (linux_qxfer_spu): New function.
1768
        (linux_target_ops): Install linux_qxfer_spu.
1769
 
1770
2009-07-31  Ulrich Weigand  
1771
 
1772
        * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
1773
        and powerpc-cell64l.o to srv_regobj.  Add rs6000/powerpc-cell32l.xml
1774
        and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
1775
        * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
1776
        (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
1777
        (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
1778
        * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
1779
        (init_registers_powerpc_cell32l): Add prototype.
1780
        (init_registers_powerpc_cell64l): Likewise.
1781
        (ppc_arch_setup): Detect Cell/B.E. architecture.
1782
 
1783
2009-07-30  Ralf Wildenhues  
1784
 
1785
        * Makefile.in (datarootdir): New variable.
1786
 
1787
2009-07-28  Daniel Jacobowitz  
1788
 
1789
        * linux-low.c (linux_write_memory): Update debugging output.
1790
        * Makefile.in (clean): Add new descriptions.
1791
        (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
1792
        (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
1793
        * configure.srv: Add new files for arm*-*-linux*.
1794
        * linux-arm-low.c: Add new declarations.
1795
        (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
1796
        (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
1797
        (HWCAP_VFPv3D16): New.
1798
        (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
1799
        instead of __IWMMXT__.
1800
        (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
1801
        (arm_arch_setup): New.
1802
        (target_regsets): Remove #ifdef.  Add VFP regset.
1803
        (the_low_target): Use arm_arch_setup.
1804
 
1805
2009-07-28  Daniel Jacobowitz  
1806
 
1807
        * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
1808
        the main thread again.
1809
 
1810
2009-07-06  Aleksandar Ristovski  
1811
 
1812
        Adding Neutrino gdbserver.
1813
        * configure: Regenerated.
1814
        * configure.ac: Add case for srv_qnx and set LIBS accordingly.
1815
        * configure.srv (i[34567]86-*-nto*): New target.
1816
        * nto-low.c, nto-low.h, nto-x86-low.c: New files.
1817
        * remote-utils.c [__QNX__]: Include sys/iomgr.h
1818
        (nto_comctrl) [__QNX__]: New function.
1819
        (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
1820
 
1821
2009-07-05  Danny Backx  
1822
 
1823
        * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
1824
        srv_tgtobj.
1825
 
1826
2009-07-04  Danny Backx  
1827
            Pedro Alves  
1828
 
1829
        * win32-i386-low.c (i386_get_thread_context): Handle systems that
1830
        don't support CONTEXT_EXTENDED_REGISTERS.
1831
        (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
1832
        (the_low_target): Install them.
1833
        * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
1834
        failing with ERROR_PIPE_NOT_CONNECTED.
1835
 
1836
2009-06-30  Doug Evans  
1837
            Pierre Muller  
1838
 
1839
        Add h/w watchpoint support to x86-linux, win32-i386.
1840
        * Makefile.in (SFILES): Add i386-low.c
1841
        (i386_low_h): Define.
1842
        (i386-low.o): Add dependencies.
1843
        (linux-x86-low.o): Add i386-low.h dependency.
1844
        (win32-i386-low.o): Ditto.
1845
        * i386-low.c: New file.
1846
        * i386-low.h: New file.
1847
        * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
1848
        (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
1849
        * linux-low.c (linux_add_process): Initialize arch_private.
1850
        (linux_remove_process): Free arch_private.
1851
        (add_lwp): Initialize arch_private.
1852
        (delete_lwp): Free arch_private.
1853
        (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
1854
        provided.
1855
        * linux-low.h (process_info_private): New member arch_private.
1856
        (lwp_info): New member arch_private.
1857
        (linux_target_ops): New members new_process, new_thread,
1858
        prepare_to_resume.
1859
        (ptid_of): New macro.
1860
        * linux-x86-low.c: Include stddef.h, i386-low.h.
1861
        (arch_process_info): New struct.
1862
        (arch_lwp_info): New struct.
1863
        (x86_linux_dr_get, x86_linux_dr_set): New functions.
1864
        (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
1865
        (i386_dr_low_get_status): New function.
1866
        (x86_insert_point, x86_remove_point): New functions.
1867
        (x86_stopped_by_watchpoint): New function.
1868
        (x86_stopped_data_address): New function.
1869
        (x86_linux_new_process, x86_linux_new_thread): New functions.
1870
        (x86_linux_prepare_to_resume): New function.
1871
        (the_low_target): Add entries for insert_point, remove_point,
1872
        stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
1873
        prepare_to_resume.
1874
        * server.c (debug_hw_points): New global.
1875
        (monitor_show_help): Document set debug-hw-points.
1876
        (handle_query): Process "set debug-hw-points".
1877
        * server.h (debug_hw_points): Declare.
1878
        (paddress): Declare.
1879
        * utils.c (NUMCELLS, CELLSIZE): New macros.
1880
        (get_sell, xsnprintf, paddress): New functions.
1881
        * win32-arm-low.c (the_low_target): Add entries for insert_point,
1882
        remove_point, stopped_by_watchpoint, stopped_data_address.
1883
        * win32-i386-low.c: Include i386-low.h.
1884
        (debug_reg_state): Replaces dr.
1885
        (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
1886
        (i386_dr_low_get_status): New function.
1887
        (i386_insert_point, i386_remove_point): New functions.
1888
        (i386_stopped_by_watchpoint): New function.
1889
        (i386_stopped_data_address): New function.
1890
        (i386_initial_stuff): Update.
1891
        (get_thread_context,set_thread_context,i386_thread_added): Update.
1892
        (the_low_target): Add entries for insert_point,
1893
        remove_point, stopped_by_watchpoint, stopped_data_address.
1894
        * win32-low.c (win32_insert_watchpoint): New function.
1895
        (win32_remove_watchpoint): New function.
1896
        (win32_stopped_by_watchpoint): New function.
1897
        (win32_stopped_data_address): New function.
1898
        (win32_target_ops): Add entries for insert_watchpoint,
1899
        remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
1900
        * win32-low.h (win32_target_ops): New members insert_point,
1901
        remove_point, stopped_by_watchpoint, stopped_data_address.
1902
 
1903
2009-06-25  Pedro Alves  
1904
 
1905
        * server.c (process_serial_event): Re-return unsupported, not
1906
        error, if the type isn't recognized.  Re-allow supporting only
1907
        insert or remove packets.  Also call require_running for
1908
        breakpoints.  Add missing break statement to default case.  Tidy.
1909
        * target.h (struct target_ops): Rename insert_watchpoint to
1910
        insert_point, and remove_watchpoint to remove_point.
1911
 
1912
        * linux-low.h (struct linux_target_ops): Likewise.
1913
        * linux-low.c (linux_insert_watchpoint): Rename to ...
1914
        (linux_insert_point): ... this.  Adjust.
1915
        (linux_remove_watchpoint): Rename to ...
1916
        (linux_remove_point): ... this.  Adjust.
1917
        (linux_target_ops): Adjust.
1918
        * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
1919
        (cris_insert_point): ... this.
1920
        (cris_remove_watchpoint): Rename to ...
1921
        (cris_remove_point): ... this.
1922
        (the_low_target): Adjust.
1923
 
1924
2009-06-24  Pierre Muller  
1925
 
1926
        * server.c (handle_v_kill): Pass signal_pid to
1927
        kill_inferior if multi_process is zero.
1928
 
1929
2009-06-23  Aleksandar Ristovski  
1930
 
1931
        * server.c (process_serial_event): Add support for Z0 and Z1 packet.
1932
        * target.h (target_ops): Comment for *_watchpoint to make it clear
1933
        the functions can get types '0' and '1'.
1934
 
1935
2009-06-22  Aleksandar Ristovski  
1936
 
1937
        * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
1938
        * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
1939
        * regcache.c (get_regcache): Likewise.
1940
        * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
1941
        * win32-low.c (child_fetch_inferior_registers): Remove check for
1942
        regno 0.
1943
 
1944
2009-06-19  Aleksandar Ristovski  
1945
            Pedro Alves 
1946
 
1947
        * target.h (struct target_ops) : New
1948
        callback.
1949
        (target_supports_multi_process): New.
1950
        * server.c (handle_query): Even if GDB reports support, only
1951
        enable multi-process if the target also supports it.  Report
1952
        multi-process support only if the target backend supports it.
1953
        * linux-low.c (linux_supports_multi_process): New function.
1954
        (linux_target_ops): Install it as target_supports_multi_process
1955
        callback.
1956
 
1957
2009-05-24  Doug Evans  
1958
 
1959
        Global renaming of find_thread_pid to find_thread_ptid.
1960
        * server.h (find_thread_ptid): Renamed from find_thread_pid.
1961
        * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
1962
        All callers updated.
1963
 
1964
        * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
1965
        to resume the newly created thread, don't call ptrace (PTRACE_CONT)
1966
        directly.
1967
 
1968
        * linux-low.c (get_stop_pc): Print pc if debug_threads.
1969
        (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
1970
        (linux_resume_one_lwp): Ditto.
1971
 
1972
2009-05-23  Doug Evans  
1973
 
1974
        * linux-low.c (linux_resume_one_lwp): Change type of first arg
1975
        from struct inferior_list_entry * to struct lwp_info *.
1976
        All callers updated.
1977
 
1978
2009-05-13  Doug Evans  
1979
 
1980
        * linux-x86-low.c: Don't include assert.h.
1981
        (x86_siginfo_fixup): Use fatal, not assert.
1982
        (x86_arch_setup): Fix comment.
1983
 
1984
2009-05-12  Doug Evans  
1985
 
1986
        Biarch support for i386/amd64 gdbserver.
1987
        * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
1988
        Add linux-x86-low.c.
1989
        (linux-i386-low.o, linux-x86-64-low.o): Delete.
1990
        (linux-x86-low.o): Add.
1991
        * linux-x86-64-low.c: Delete.
1992
        * linux-i386-low.c: Delete.
1993
        * linux-x86-low.c: New file.
1994
        * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
1995
        linux-x86-low.o.
1996
        (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
1997
        linux-x86-low.o.
1998
        (x86_64-linux srv_regobj): Add reg-i386-linux.o.
1999
        * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
2000
        (linux_child_pid_to_exec_file): New function.
2001
        (elf_64_header_p, elf_64_file_p): New functions.
2002
        (siginfo_fixup): New function.
2003
        (linux_xfer_siginfo): New local inf_siginfo.  Call siginfo_fixup to
2004
        give target a chance to convert layout.
2005
        * linux-low.h (linux_target_ops): New member siginfo_fixup.
2006
        (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
2007
 
2008
2009-05-07  Doug Evans  
2009
 
2010
        * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
2011
        (regsets_store_inferior_registers): Ditto.
2012
 
2013
2009-05-06  Pedro Alves  
2014
 
2015
        PR server/10048
2016
 
2017
        * linux-low.c (must_set_ptrace_flags): Delete.
2018
        (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
2019
        of the global.
2020
        (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here.  Set
2021
        `lwp->must_set_ptrace_flags' instead.
2022
        (linux_wait_for_event_1): Set ptrace options here.
2023
        (linux_wait_1): ... not here.
2024
 
2025
2009-04-30  Doug Evans  
2026
 
2027
        * inferiors.c (started_inferior_callback): New function.
2028
        (attached_inferior_callback): New function.
2029
        (have_started_inferiors_p, have_attached_inferiors_p): New functions.
2030
        * server.c (print_started_pid, print_attached_pid): New functions.
2031
        (detach_or_kill_for_exit): New function.
2032
        (main): Call it instead of for_each_inferior (kill_inferior_callback).
2033
        * server.h (have_started_inferiors_p): Declare.
2034
        (have_attached_inferiors_p): Declare.
2035
 
2036
        * inferiors.c (remove_process): Fix memory leak, free process.
2037
        * linux-low.c (linux_remove_process): New function.
2038
        (linux_kill): Call it instead of remove_process.
2039
        (linux_detach, linux_wait_1): Ditto.
2040
 
2041
2009-04-19  Danny Backx  
2042
 
2043
        * configure.srv: Add x86 Windows CE target.
2044
 
2045
2009-04-03  Ulrich Weigand  
2046
 
2047
        * inferiors.c (get_thread_process): Make global.
2048
        * server.h (get_thread_process): Add prototype.
2049
        * thread-db.c (find_one_thread): Use get_thread_process
2050
        instead of current_process.
2051
        (thread_db_get_tls_address): Do not crash if called when
2052
        thread layer is not yet initialized.
2053
 
2054
2009-04-03  Ulrich Weigand  
2055
 
2056
        * remote-utils.c (prepare_resume_reply): Null-terminate packet.
2057
        * spu-low.c (current_tid): Rename to ...
2058
        (current_ptid): ... this.
2059
        (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
2060
        spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
2061
        ptid_get_lwp (current_ptid) instead of current_tid.
2062
        (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
2063
        instead of current_tid.  Use find_process_pid to verify pid
2064
        argument is valid.  Pass proper argument to remove_process.
2065
        (spu_thread_alive): Compare current_ptid instead of current_tid.
2066
        (spu_resume): Likewise.
2067
 
2068
2009-04-02  Pedro Alves  
2069
 
2070
        * linux-low.c (usr_store_inferior_registers): Declare local `pid'
2071
        variable.
2072
 
2073
2009-04-01  Pedro Alves  
2074
 
2075
        Implement the multiprocess extensions, and add linux multiprocess
2076
        support.
2077
 
2078
        * server.h (ULONGEST): Declare.
2079
        (struct ptid, ptid_t): New.
2080
        (minus_one_ptid, null_ptid): Declare.
2081
        (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
2082
        (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
2083
        (struct inferior_list_entry): Change `id' type from unsigned from
2084
        to ptid_t.
2085
        (struct sym_cache, struct breakpoint, struct
2086
        process_info_private): Forward declare.
2087
        (struct process_info): Declare.
2088
        (current_process): Declare.
2089
        (all_processes): Declare.
2090
        (initialize_inferiors): Declare.
2091
        (add_thread): Adjust to use ptid_t.
2092
        (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
2093
        (add_process, remove_process, find_thread_pid): Declare.
2094
        (find_inferior_id): Adjust to use ptid_t.
2095
        (cont_thread, general_thread, step_thread): Change type to ptid_t.
2096
        (multi_process): Declare.
2097
        (push_event): Adjust to use ptid_t.
2098
        (read_ptid, write_ptid): Declare.
2099
        (prepare_resume_reply): Adjust to use ptid_t.
2100
        (clear_symbol_cache): Declare.
2101
        * inferiors.c (all_processes): New.
2102
        (null_ptid, minus_one_ptid): New.
2103
        (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
2104
        (ptid_get_tid, ptid_equal, ptid_is_pid): New.
2105
        (add_thread): Change unsigned long to ptid.  Remove gdb_id
2106
        parameter.  Adjust.
2107
        (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
2108
        (gdb_id_to_thread): Rename to ...
2109
        (find_thread_pid): ... this.  Change unsigned long to ptid.
2110
        (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
2111
        (loaded_dll, pull_pid_from_list): Adjust.
2112
        (add_process, remove_process, find_process_pid)
2113
        (get_thread_process, current_process, initialize_inferiors): New.
2114
        * target.h (struct thread_resume) : Change type to ptid_t.
2115
        (struct target_waitstatus) : Ditto.
2116
        (struct target_ops) : Add `pid' argument.  Change
2117
        return type to int.
2118
        (struct target_ops) : Add `pid' argument.
2119
        (struct target_ops) : Change pid's type to ptid_t.
2120
        (struct target_ops) : Add `ptid' field.  Change return type
2121
        to ptid.
2122
        (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
2123
        (mywait): Add `ptid' argument.  Change return type to ptid_t.
2124
        (target_pid_to_str): Declare.
2125
        * target.c (set_desired_inferior): Adjust to use ptids.
2126
        (mywait): Add new `ptid' argument.  Adjust.
2127
        (target_pid_to_str): New.
2128
        * mem-break.h (free_all_breakpoints): Declare.
2129
        * mem-break.c (breakpoints): Delelete.
2130
        (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
2131
        (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
2132
        to use per-process breakpoint list.
2133
        (free_all_breakpoints): New.
2134
        * remote-utils.c (struct sym_cache) : Drop `const'.
2135
        (symbol_cache, all_symbols_looked_up): Delete.
2136
        (hexchars): New.
2137
        (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
2138
        read_ptid): New.
2139
        (prepare_resume_reply): Change ptid argument's type from unsigned
2140
        long to ptid_t.  Adjust.  Implement W;process and X;process.
2141
        (free_sym_cache, clear_symbol_cache): New.
2142
        (look_up_one_symbol): Adjust to per-process symbol cache.  *
2143
        * server.c (cont_thread, general_thread, step_thread): Change type
2144
        to ptid_t.
2145
        (attached): Delete.
2146
        (multi_process): New.
2147
        (last_ptid): Change type to ptid_t.
2148
        (struct vstop_notif) : Change type to ptid_t.
2149
        (queue_stop_reply, push_event): Change `ptid' argument's type to
2150
        ptid_t.
2151
        (discard_queued_stop_replies): Add `pid' argument.
2152
        (start_inferior): Adjust to use ptids.  Adjust to mywait interface
2153
        changes.  Don't reference the `attached' global.
2154
        (attach_inferior): Adjust to mywait interface changes.
2155
        (handle_query): Adjust to use ptids.  Parse GDB's qSupported
2156
        features.  Handle and report "multiprocess+".  Handle
2157
        "qAttached:PID".
2158
        (handle_v_cont): Adjust to use ptids.  Adjust to mywait interface
2159
        changes.
2160
        (handle_v_kill): New.
2161
        (handle_v_stopped): Adjust to use target_pid_to_str.
2162
        (handle_v_requests): Allow multiple attaches and runs when
2163
        multiprocess extensions are in effect.  Handle "vKill".
2164
        (myresume): Adjust to use ptids.
2165
        (queue_stop_reply_callback): Add `arg' parameter.  Handle it.
2166
        (handle_status): Adjust to discard_queued_stop_replies interface
2167
        change.
2168
        (first_thread_of, kill_inferior_callback)
2169
        (detach_or_kill_inferior_callback, join_inferiors_callback): New.
2170
        (main): Call initialize_inferiors.  Adjust to use ptids, killing
2171
        and detaching from all inferiors.  Handle multiprocess packet
2172
        variants.
2173
        * linux-low.h: Include gdb_proc_service.h.
2174
        (struct process_info_private): New.
2175
        (struct linux_target_ops) : Use ptid_get_pid.
2176
        : Use ptid_get_lwp.
2177
        (get_lwp_thread): Adjust.
2178
        (struct lwp_info): Add `dead' member.
2179
        (find_lwp_pid): Declare.
2180
        * linux-low.c (thread_db_active): Delete.
2181
        (new_inferior): Adjust comment.
2182
        (inferior_pid): Delete.
2183
        (linux_add_process): New.
2184
        (handle_extended_wait): Adjust.
2185
        (add_lwp): Change unsigned long to ptid.
2186
        (linux_create_inferior): Add process to processes table.  Adjust
2187
        to use ptids.  Don't set new_inferior here.
2188
        (linux_attach_lwp): Rename to ...
2189
        (linux_attach_lwp_1): ... this.  Add `initial' argument.  Handle
2190
        it.  Adjust to use ptids.
2191
        (linux_attach_lwp): New.
2192
        (linux_attach): Add process to processes table.  Don't set
2193
        new_inferior here.
2194
        (struct counter): New.
2195
        (second_thread_of_pid_p, last_thread_of_process_p): New.
2196
        (linux_kill_one_lwp): Add `args' parameter.  Handle it.  Adjust to
2197
        multiple processes.
2198
        (linux_kill): Add `pid' argument.  Handle it.  Adjust to multiple
2199
        processes.  Remove process from process table.
2200
        (linux_detach_one_lwp): Add `args' parameter.  Handle it.  Adjust
2201
        to multiple processes.
2202
        (any_thread_of): New.
2203
        (linux_detach): Add `pid' argument, and handle it.  Remove process
2204
        from processes table.
2205
        (linux_join): Add `pid' argument.  Handle it.
2206
        (linux_thread_alive): Change unsighed long argument to ptid_t.
2207
        Consider dead lwps as not being alive.
2208
        (status_pending_p): Rename `dummy' argument to `arg'.  Filter out
2209
        threads we're not interested in.
2210
        (same_lwp, find_lwp_pid): New.
2211
        (linux_wait_for_lwp): Change `pid' argument's type from int to
2212
        ptid_t.  Adjust.
2213
        (linux_wait_for_event): Rename to ...
2214
        (linux_wait_for_event_1): ... this.  Change `pid' argument's type
2215
        from int to ptid_t.  Adjust.
2216
        (linux_wait_for_event): New.
2217
        (linux_wait_1): Add `ptid' argument.  Change return type to
2218
        ptid_t.  Adjust.  Use last_thread_of_process_p.  Remove processes
2219
        that exit from the process table.
2220
        (linux_wait): Add `ptid' argument.  Change return type to ptid_t.
2221
        Adjust.
2222
        (mark_lwp_dead): New.
2223
        (wait_for_sigstop): Adjust to use ptids.  If a process exits while
2224
        stopping all threads, mark its main lwp as dead.
2225
        (linux_set_resume_request, linux_resume_one_thread): Adjust to use
2226
        ptids.
2227
        (fetch_register, usr_store_inferior_registers)
2228
        (regsets_fetch_inferior_registers)
2229
        (regsets_store_inferior_registers, linux_read_memory)
2230
        (linux_write_memory): Inline `inferior_pid'.
2231
        (linux_look_up_symbols): Adjust to use per-process
2232
        `thread_db_active'.
2233
        (linux_request_interrupt): Adjust to use ptids.
2234
        (linux_read_auxv): Inline `inferior_pid'.
2235
        (initialize_low): Don't reference thread_db_active.
2236
        * gdb_proc_service.h (struct ps_prochandle) : Remove.
2237
        * proc-service.c (ps_lgetregs): Use find_lwp_pid.
2238
        (ps_getpid): Return the pid of the current inferior.
2239
        * thread-db.c (proc_handle, thread_agent): Delete.
2240
        (thread_db_create_event, thread_db_enable_reporting): Adjust to
2241
        per-process data.
2242
        (find_one_thread): Change argument type to ptid_t.  Adjust to
2243
        per-process data.
2244
        (maybe_attach_thread): Adjust to per-process data and ptids.
2245
        (thread_db_find_new_threads): Ditto.
2246
        (thread_db_init): Ditto.
2247
        * spu-low.c (spu_create_inferior, spu_attach): Add process to
2248
        processes table.  Adjust to use ptids.
2249
        (spu_kill, spu_detach): Adjust interface.  Remove process from
2250
        processes table.
2251
        (spu_join, spu_thread_alive): Adjust interface.
2252
        (spu_wait): Adjust interface.  Remove process from processes
2253
        table.  Adjust to use ptids.
2254
        * win32-low.c (current_inferior_tid): Delete.
2255
        (current_inferior_ptid): New.
2256
        (debug_event_ptid): New.
2257
        (thread_rec): Take a ptid.  Adjust.
2258
        (child_add_thread): Add `pid' argument.  Adjust to use ptids.
2259
        (child_delete_thread): Ditto.
2260
        (do_initial_child_stuff): Add `attached' argument.  Add process to
2261
        processes table.
2262
        (child_fetch_inferior_registers, child_store_inferior_registers):
2263
        Adjust.
2264
        (win32_create_inferior): Pass 0 to do_initial_child_stuff.
2265
        (win32_attach): Pass 1 to do_initial_child_stuff.
2266
        (win32_kill): Adjust interface.  Remove process from processes
2267
        table.
2268
        (win32_detach): Ditto.
2269
        (win32_join): Adjust interface.
2270
        (win32_thread_alive): Take a ptid.
2271
        (win32_resume): Adjust to use ptids.
2272
        (get_child_debug_event): Ditto.
2273
        (win32_wait): Adjust interface.  Remove exiting process from
2274
        processes table.
2275
 
2276
2009-04-01  Pedro Alves  
2277
 
2278
        Non-stop mode support.
2279
 
2280
        * server.h (non_stop): Declare.
2281
        (gdb_client_data, handler_func): Declare.
2282
        (delete_file_handler, add_file_handler, start_event_loop):
2283
        Declare.
2284
        (handle_serial_event, handle_target_event, push_event)
2285
        (putpkt_notif): Declare.
2286
        * target.h (enum resume_kind): New.
2287
        (struct thread_resume): Replace `step' field by `kind' field.
2288
        (TARGET_WNOHANG): Define.
2289
        (struct target_ops) : Add `options' argument.
2290
        : New fields.
2291
        (target_supports_non_stop, target_async): New.
2292
        (start_non_stop): Declare.
2293
        (mywait): Add `options' argument.
2294
        * target.c (mywait): Add `options' argument.  Print child exit
2295
        notifications here.
2296
        (start_non_stop): New.
2297
        * server.c (non_stop, own_buf, mem_buf): New globals.
2298
        (struct vstop_notif): New.
2299
        (notif_queue): New global.
2300
        (queue_stop_reply, push_event, discard_queued_stop_replies)
2301
        (send_next_stop_reply): New.
2302
        (start_inferior): Adjust to use resume_kind.  Adjust to mywait
2303
        interface changes.
2304
        (attach_inferior): In non-stop mode, don't wait for the target
2305
        here.
2306
        (handle_general_set): Handle QNonStop.
2307
        (handle_query): When handling qC, return the current general
2308
        thread, instead of the first thread of the list.
2309
        (handle_query): If the backend supports non-stop mode, include
2310
        QNonStop+ in the qSupported query response.
2311
        (handle_v_cont): Adjust to use resume_kind.  Handle resume_stop
2312
        and non-stop mode.
2313
        (handle_v_attach, handle_v_run): Handle non-stop mode.
2314
        (handle_v_stopped): New.
2315
        (handle_v_requests): Report support for vCont;t.  Handle vStopped.
2316
        (myresume): Adjust to use resume_kind.  Handle non-stop.
2317
        (queue_stop_reply_callback): New.
2318
        (handle_status): Handle non-stop mode.
2319
        (main): Clear non_stop flag on reconnection.  Use the event-loop.
2320
        Refactor serial protocol handling from here ...
2321
        (process_serial_event): ... to this new function.  When GDB
2322
        selects any thread, select one here.  In non-stop mode, wait until
2323
        GDB acks all pending events before exiting.
2324
        (handle_serial_event, handle_target_event): New.
2325
        * remote-utils.c (remote_open): Install remote_desc in the event
2326
        loop.
2327
        (remote_close): Remove remote_desc from the event loop.
2328
        (putpkt_binary): Rename to...
2329
        (putpkt_binary_1): ... this.  Add `is_notic' argument.  Handle it.
2330
        (putpkt_binary): New as wrapper around putpkt_binary_1.
2331
        (putpkt_notif): New.
2332
        (prepare_resume_reply): In non-stop mode, don't change the
2333
        general_thread.
2334
        * event-loop.c: New.
2335
        * Makefile.in (OBJ): Add event-loop.o.
2336
        (event-loop.o): New rule.
2337
 
2338
        * linux-low.h (pid_of): Moved here.
2339
        (lwpid_of): New.
2340
        (get_lwp_thread): Use lwpid_of.
2341
        (struct lwp_info): Delete `lwpid' field.  Add `suspended' field.
2342
        * linux-low.c (pid_of): Delete.
2343
        (inferior_pid): Use lwpid_of.
2344
        (linux_event_pipe): New.
2345
        (target_is_async_p): New.
2346
        (delete_lwp): New.
2347
        (handle_extended_wait): Use lwpid_of.
2348
        (add_lwp): Don't set lwpid field.
2349
        (linux_attach_lwp): Adjust debug output.  Use lwpid_of.
2350
        (linux_kill_one_lwp): If killing a running lwp, stop it first.
2351
        Use lwpid_of.  Adjust to linux_wait_for_event interface changes.
2352
        (linux_detach_one_lwp): If detaching from a running lwp, stop it
2353
        first.  Adjust to linux_wait_for_event interface changes.  Use
2354
        lwpid_of.
2355
        (linux_detach): Don't delete the main lwp here.
2356
        (linux_join): Use my_waitpid.  Avoid signal_pid.  Use lwpid_of.
2357
        (status_pending_p): Don't consider explicitly suspended lwps.
2358
        (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
2359
        pointer.  Add OPTIONS argument.  Change return type to int.  Use
2360
        my_waitpid instead of sleeping.  Handle WNOHANG.  Use lwpid_of.
2361
        (linux_wait_for_event): Take an integer pid instead of a lwp_info
2362
        pointer.  Add status pointer argument.  Return a pid instead of a
2363
        status.  Use lwpid_of.  Adjust to linux_wait_for_lwp interface
2364
        changes.  In non-stop mode, don't switch to a random thread.
2365
        (linux_wait): Rename to...
2366
        (linux_wait_1): ... this.  Add target_options argument, and handle
2367
        it.  Adjust to use resume_kind.  Use lwpid_of.  In non-stop mode,
2368
        don't handle the continue thread.  Handle TARGET_WNOHANG.  Merge
2369
        clean exit and signal exit code.  Don't stop all threads in
2370
        non-stop mode.  In all-stop mode, only stop all threads when
2371
        reporting a stop to GDB.  Handle explicit thread stop requests.
2372
        (async_file_flush, async_file_mark): New.
2373
        (linux_wait): New.
2374
        (send_sigstop): Use lwpid_of.
2375
        (wait_for_sigstop): Use lwpid_of.  Adjust to linux_wait_for_event
2376
        interface changes.  In non-stop mode, don't switch to a random
2377
        thread.
2378
        (linux_resume_one_lwp): Use lwpid_of.
2379
        (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
2380
        (linux_resume_one_thread): ... this.  Handle resume_stop.  In
2381
        non-stop mode, don't look for pending flag in all threads.
2382
        (resume_status_pending_p): Don't consider explicitly suspended
2383
        threads.
2384
        (my_waitpid): Reimplement.  Emulate __WALL.
2385
        (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
2386
        Use lwpid_of.
2387
        (sigchld_handler, linux_supports_non_stop, linux_async)
2388
        (linux_start_non_stop): New.
2389
        (linux_target_ops): Register linux_supports_non_stop, linux_async
2390
        and linux_start_non_stop.
2391
        (initialize_low): Install SIGCHLD handler.
2392
        * thread-db.c (thread_db_create_event, find_one_thread)
2393
        (thread_db_get_tls_address): Use lwpid_of.
2394
        * win32-low.c (win32_detach): Adjust to use resume_kind.
2395
        (win32_wait): Add `options' argument.
2396
        * spu-low.c (spu_resume): Adjust to use resume_kind.
2397
        (spu_wait): Add `options' argument.
2398
 
2399
2009-04-01  Pedro Alves  
2400
 
2401
        Decouple target code from remote protocol.
2402
 
2403
        * target.h (enum target_waitkind): New.
2404
        (struct target_waitstatus): New.
2405
        (struct target_ops) : Return an unsigned long.  Take a
2406
        target_waitstatus pointer instead of a char pointer.
2407
        (mywait): Likewise.
2408
        * target.c (mywait): Change prototype to return an unsigned long.
2409
        Take a target_waitstatus pointer instead of a char pointer.  Adjust.
2410
        * server.h (thread_from_wait, old_thread_from_wait): Delete
2411
        declarations.
2412
        (prepare_resume_reply): Change prototype to take a
2413
        target_waitstatus.
2414
        * server.c (thread_from_wait, old_thread_from_wait): Delete.
2415
        (last_status, last_ptid): New.
2416
        (start_inferior): Remove "statusptr" argument.  Adjust.  Return a
2417
        pid instead of a signal.
2418
        (attach_inferior): Remove "status" and "signal" parameters.
2419
        Adjust.
2420
        (handle_query): For qGetTLSAddr, parse the thread id with strtol,
2421
        not as an address.
2422
        (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
2423
        (handle_v_requests, myresume): Remove "status" and "signal"
2424
        parameters.  Adjust.
2425
        (handle_status): New.
2426
        (main): Delete local `status'.  Adjust.
2427
        * remote-utils.c: Include target.h.
2428
        (prepare_resume_reply): Change prototype to take a
2429
        target_waitstatus.  Adjust.
2430
 
2431
        * linux-low.c (linux_wait): Adjust to new target_ops->wait
2432
        interface.
2433
        * spu-low.c (spu_wait): Adjust.
2434
        * win32-low.c (enum target_waitkind, struct target_waitstatus):
2435
        Delete.
2436
        (win32_wait): Adjust.
2437
 
2438
2009-04-01  Pedro Alves  
2439
 
2440
        * target.h (struct thread_resume): Delete leave_stopped member.
2441
        (struct target_ops): Add a `n' argument to the `resume' callback.
2442
        * server.c (start_inferior): Adjust.
2443
        (handle_v_cont, myresume): Adjust.
2444
        * linux-low.c (check_removed_breakpoint): Adjust to resume
2445
        interface change, and to removed leave_stopped field.
2446
        (resume_ptr): Delete.
2447
        (struct thread_resume_array): New.
2448
        (linux_set_resume_request): Add new `arg' parameter.  Adjust to
2449
        resume interface change.
2450
        (linux_continue_one_thread, linux_queue_one_thread)
2451
        (resume_status_pending_p): Check if the resume field is NULL
2452
        instead of checking the leave_stopped member.
2453
        (linux_resume): Adjust to the target resume interface change.
2454
        * spu-low.c (spu_resume): Adjust to the target resume interface
2455
        change.
2456
        * win32-low.c (win32_detach, win32_resume): Ditto.
2457
 
2458
2009-04-01  Pedro Alves  
2459
 
2460
        * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
2461
        flag.
2462
        (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
2463
        pending.
2464
        (linux_continue_one_thread): Only preserve the stepping flag if
2465
        there's a pending breakpoint.
2466
 
2467
2009-03-31  Pedro Alves  
2468
 
2469
        * server.c (main): After the inferior having exited, call
2470
        remote_close before exiting gdbserver.
2471
 
2472
2009-03-25  Thiago Jung Bauermann  
2473
 
2474
        Fix size of FPSCR in Power 7 processors.
2475
        * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
2476
        (PPC_FEATURE_HAS_DFP): New #define.
2477
        (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
2478
        size of the FPSCR.
2479
 
2480
2009-03-23  Pedro Alves  
2481
 
2482
        * server.c (handle_query) Whitespace and formatting.
2483
 
2484
2009-03-22  Pedro Alves  
2485
 
2486
        * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
2487
        linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
2488
        linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
2489
        linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
2490
        regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
2491
        thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
2492
        Makefile.in, configure.ac: Fix whitespace throughout.
2493
        * configure: Regenerate.
2494
 
2495
2009-03-22  Pedro Alves  
2496
 
2497
        * inferiors.c (find_inferior): Make it safe for the callback
2498
        function to delete the currently iterated inferior.
2499
 
2500
2009-03-22  Pedro Alves  
2501
 
2502
        * Makefile.in (linuw_low_h): Move higher.
2503
        (thread-db.o): Depend on $(linux_low_h).
2504
 
2505
2009-03-17  Pedro Alves  
2506
 
2507
        Rename "process" to "lwp" throughout.
2508
 
2509
        * linux-low.c (all_processes): Rename to...
2510
        (all_lwps): ... this.
2511
        (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
2512
        (add_process): Rename to ...
2513
        (add_lwp): ... this.  Adjust.
2514
        (linux_create_inferior): Adjust.
2515
        (linux_attach_lwp): Adjust.
2516
        (linux_attach): Adjust.
2517
        (linux_kill_one_process): Rename to ...
2518
        (linux_kill_one_lwp): ... this.  Adjust.
2519
        (linux_kill): Adjust.
2520
        (linux_detach_one_process): Rename to ...
2521
        (linux_detach_one_lwp): ... this.  Adjust.
2522
        (linux_detach): Adjust.
2523
        (check_removed_breakpoint): Adjust.
2524
        (status_pending_p): Adjust.
2525
        (linux_wait_for_process): Rename to ...
2526
        (linux_wait_for_lwp): ... this.  Adjust.
2527
        (linux_wait_for_event): Adjust.
2528
        (send_sigstop): Adjust.
2529
        (wait_for_sigstop): Adjust.
2530
        (stop_all_processes): Rename to ...
2531
        (stop_all_lwps): ... this.
2532
        (linux_resume_one_process): Rename to ...
2533
        (linux_resume_one_lwp): ... this.  Adjust.
2534
        (linux_set_resume_request, linux_continue_one_thread)
2535
        (linux_queue_one_thread, resume_status_pending_p)
2536
        (usr_store_inferior_registers, regsets_store_inferior_registers)
2537
        (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
2538
        Adjust.
2539
        * linux-low.h (get_process): Rename to ...
2540
        (get_lwp): ... this.  Adjust.
2541
        (get_thread_process): Rename to ...
2542
        (get_thread_lwp): ... this.  Adjust.
2543
        (get_process_thread): Rename to ...
2544
        (get_lwp_thread): ... this.  Adjust.
2545
        (struct process_info): Rename to ...
2546
        (struct lwp_info): ... this.
2547
        (all_processes): Rename to ...
2548
        (all_lwps): ... this.
2549
        * proc-service.c (ps_lgetregs): Adjust.
2550
        * thread-db.c (thread_db_create_event, find_one_thread)
2551
        (maybe_attach_thread, thread_db_get_tls_address): Adjust.
2552
 
2553
2009-03-14  Pedro Alves  
2554
 
2555
        * server.c (handle_query): Handle "qAttached".
2556
 
2557
2009-03-13  Nathan Sidwell  
2558
 
2559
        * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
2560
        GPLv3, update license URL.
2561
 
2562
2009-03-01  Doug Evans  
2563
 
2564
        * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
2565
        (server_h): Add gdb_signals.h.
2566
        (signals.o): Update.
2567
        * server.h (target_signal_from_host,target_signal_to_host_p)
2568
        (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
2569
 
2570
2009-02-14  Pierre Muller  
2571
 
2572
        * remote-utils.c (getpkt): Also generate remote-debug
2573
        information if noack_mode is set.
2574
 
2575
2009-02-06  Pedro Alves  
2576
 
2577
        * server.c (handle_query): Report qXfer:siginfo:read and
2578
        qXfer:siginfo:write as supported and handle them.
2579
        * target.h (struct target_ops) : New field.
2580
        * linux-low.c (linux_xfer_siginfo): New.
2581
        (linux_target_ops): Set it.
2582
 
2583
2009-01-26  Pedro Alves  
2584
 
2585
        * server.c (gdbserver_usage): Mention --remote-debug.
2586
        (main): Accept '--remote-debug' switch.
2587
 
2588
2009-01-18  Doug Evans  
2589
 
2590
        * regcache.c (new_register_cache): No need to check result of xcalloc.
2591
        * server.c (handle_search_memory): Back out calls to xmalloc,
2592
        result is checked and error is returned to user upon failure.
2593
        (handle_query): Ditto.  Add more checks for result of malloc.
2594
        (handle_v_cont): Check result of malloc, report error back to
2595
        user upon failure.
2596
        (handle_v_run): Ditto.  Call freeargv.
2597
        * server.h (freeargv): Declare.
2598
        * utils.c (freeargv): New fn.
2599
 
2600
2009-01-15  Doug Evans  
2601
 
2602
        * gdbreplay.c (perror_with_name): Make arg const char *.
2603
        * server.h (target_signal_to_name): Make return type const char *.
2604
        * thread-db.c (thread_db_err_str): Make return type const char *.
2605
        * utils.c (perror_with_name): Make arg const char *.
2606
 
2607
2009-01-14  Pedro Alves  
2608
 
2609
        * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
2610
        when handling a EXIT_PROCESS_DEBUG_EVENT.
2611
 
2612
2009-01-06  Joel Brobecker  
2613
 
2614
        * gdbreplay.c (gdbreplay_version): Update copyright year.
2615
        * server.c (gdbserver_version): Likewise.
2616
 
2617
2009-01-05  Doug Evans  
2618
 
2619
        * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
2620
        (handle_extended_wait): Improve comment.
2621
 
2622
2008-12-13  Doug Evans  
2623
 
2624
        * utils.c (xmalloc,xcalloc,xstrdup): New fns.
2625
        * server.h (ATTR_MALLOC): New macro.
2626
        (xmalloc,xcalloc,xstrdup): Declare.
2627
        * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
2628
        * inferiors.c: Ditto.
2629
        * linux-low.c: Ditto.
2630
        * mem-break.c: Ditto.
2631
        * regcache.c: Ditto.
2632
        * remote-utils.c: Ditto.
2633
        * server.c: Ditto.
2634
        * target.c: Ditto.
2635
        * win32-low.c: Ditto.
2636
 
2637
2008-12-12  Doug Evans  
2638
 
2639
        * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
2640
        in debugging printf.
2641
 
2642
        * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
2643
 
2644
2008-12-09  Doug Evans  
2645
 
2646
        * linux-low.h (struct process_info): Delete member tid, unused.
2647
        * thread-db.c (find_one_thread): Update.
2648
        (maybe_attach_thread): Update.
2649
 
2650
2008-12-02  Pedro Alves  
2651
 
2652
        * target.h (struct target_ops): Add qxfer_osdata member.
2653
        * linux-low.c: Include ctype.h and pwd.h and sys/types.h
2654
        and dirent.h.
2655
        (linux_qxfer_osdata): New functions.
2656
        (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
2657
        callback.
2658
        * server.c (handle_query): Handle "qXfer:osdata:read:".
2659
        * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
2660
        (buffer_xml_printf): New functions.
2661
        * server.h (struct buffer): New.
2662
        (buffer_grow_str, buffer_grow_str0): New macros.
2663
        (buffer_grow, buffer_free, buffer_init, buffer_finish)
2664
        (buffer_xml_printf): Declare.
2665
 
2666
2008-11-24  Doug Evans  
2667
 
2668
        * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
2669
 
2670
2008-11-24  Daniel Jacobowitz  
2671
 
2672
        * server.c (handle_v_run): Always use the supplied argument list.
2673
 
2674
2008-11-19  Bob Wilson  
2675
 
2676
        * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
2677
        (xtensa_regmap_table): Add entry for scompare1.
2678
 
2679
2008-11-18  Thiago Jung Bauermann  
2680
 
2681
        * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
2682
        powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
2683
        powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
2684
        powerpc-isa205-64l.o, powerpc-isa205-64l.c,
2685
        powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
2686
        powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
2687
        * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
2688
        XML target descriptions.
2689
        * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
2690
        when inferior is running on an ISA 2.05 or later processor.  Add
2691
        special case to return offset for full 64-bit slot of FPSCR when
2692
        in 32-bits.
2693
 
2694
2008-11-14  Daniel Gutson  
2695
 
2696
        * Makefile.in (SFILES, clean): Added sparc64 files.
2697
        (reg-sparc64.o, reg-sparc64.c): New.
2698
        * configure.srv (sparc*-*-linux*): New configuration.
2699
        * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
2700
        syscall arguments for SPARC.
2701
        (regsets_store_inferior_registers): Likewise.
2702
        * linux-sparc-low.c: New file.
2703
 
2704
2008-10-21  Doug Evans  
2705
 
2706
        * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
2707
        (READLINE_DIR,READLINE_DEP): Delete.
2708
        (INTERNAL_CFLAGS): Update.
2709
        (LINTFLAGS): Update.
2710
 
2711
2008-10-10  Pedro Alves  
2712
 
2713
        * server.c (handle_v_run): If GDB didn't specify an argv, use the
2714
        whole argv from the last run, not just argv[0].
2715
 
2716
2008-09-08  Pedro Alves  
2717
 
2718
        * regcache.c (new_register_cache): Return NULL if the register
2719
        cache size isn't known yet.
2720
        (free_register_cache): Avoid dereferencing a NULL regcache.
2721
 
2722
2008-09-04  Daniel Jacobowitz  
2723
 
2724
        * configure.srv: Merge MIPS and MIPS64.
2725
 
2726
2008-08-24  Maciej W. Rozycki  
2727
 
2728
        * Makefile.in (uninstall): Apply $(EXEEXT) too.
2729
 
2730
2008-08-18  Luis Machado  
2731
 
2732
        * Makefile.in: Add required vsx dependencies.
2733
 
2734
        * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
2735
        Declare init_registers_powerpc_vsx32l.
2736
        Declare init_registers_powerpc_vsx64l.
2737
        Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
2738
        (ppc_arch_setup): Check for VSX in hwcap.
2739
        (ppc_fill_vsxregset): New function.
2740
        (ppc_store_vsxregset): New function.
2741
        Add new VSX entry in regset_info target_regsets.
2742
 
2743
        * configure.srv: Add new VSX dependencies.
2744
 
2745
2008-08-12  Pedro Alves  
2746
 
2747
        * remote-utils.c (noack_mode, transport_is_reliable): New globals.
2748
        (remote_open): Set or clear transport_is_reliable.
2749
        (putpkt_binary): Don't expect acks in noack mode.
2750
        (getpkt): Don't send ack/nac in noack mode.
2751
        * server.c (handle_general_set): Handle QStartNoAckMode.
2752
        (handle_query): If connected by tcp pass QStartNoAckMode+ in
2753
        qSupported.
2754
        (main): Reset noack_mode on every connection.
2755
        * server.h (noack_mode): Declare.
2756
 
2757
2008-08-07  Ralf Wildenhues  
2758
 
2759
        * Makefile.in (GDBREPLAY_OBS): New variable.
2760
        (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
2761
 
2762
2008-08-05  Ulrich Weigand  
2763
            Daniel Jacobowitz  
2764
 
2765
        * linux-low.c (linux_resume_one_process): Ignore ESRCH.
2766
        (usr_store_inferior_registers): Likewise.
2767
        (regsets_store_inferior_registers): Likewise.
2768
 
2769
2008-07-31  Rolf Jansen  
2770
            Pedro Alves  
2771
 
2772
        * configure.ac: Check for memmem declaration.
2773
        * server.c [HAVE_MALLOC_H]: Include malloc.h.
2774
        (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
2775
        (disable_packet_qfThreadInfo): Unconditionally compile.
2776
        * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
2777
        * configure, config.in: Regenerate.
2778
 
2779
2008-07-28  Doug Kwan  
2780
 
2781
        * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
2782
        (linux_write_memory): Remove declaration of errno.
2783
 
2784
2008-07-12  Ulrich Weigand  
2785
 
2786
        * linux-low.c (handle_extended_wait): Do not use "status"
2787
        variable uninitialized.
2788
 
2789
2008-07-07  Pedro Alves  
2790
 
2791
        * server.c (handle_v_attach): Inhibit reporting dll changes.
2792
 
2793
2008-06-27  Pedro Alves  
2794
 
2795
        * remote-utils.c (prepare_resume_reply): If requested, don't
2796
        output "thread:TID" in the T stop reply.
2797
 
2798
        * server.c (disable_packet_vCont, disable_packet_Tthread)
2799
        (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
2800
        (handle_query): If requested, disable support for qC, qfThreadInfo
2801
        and qsThreadInfo.
2802
        (handle_v_requests): If requested, disable support for vCont.
2803
        (gdbserver_show_disableable): New.
2804
        (main): Handle --disable-packet and --disable-packet=LIST.
2805
 
2806
        * server.h (disable_packet_vCont, disable_packet_Tthread)
2807
        (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
2808
 
2809
2008-06-20  Carlos O'Donell  
2810
 
2811
        * server.c (gdbserver_usage): Mention --version.
2812
 
2813
2008-06-06  Daniel Jacobowitz  
2814
 
2815
        * Makefile.in (gdbreplay.o): New rule.
2816
 
2817
2008-06-06  Joseph Myers  
2818
 
2819
        * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
2820
        message, not gdbserver.
2821
 
2822
2008-06-05  Vladimir Prus  
2823
            Nathan Sidwell  
2824
            Joseph Myers  
2825
 
2826
        * acinclude.m4: Include ../../config/acx.m4.
2827
        * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
2828
        * configure, config.in: Regenerate.
2829
        * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
2830
        * server.c (gdbserver_version): Print PKGVERSION.
2831
        (gdbsrever_usage): Add stream parameter.  Print REPORT_BUGS_TO.
2832
        (main): Adjust gdbserver_usage calls.
2833
        * gdbreplay.c (version, host_name): Add declarations.
2834
        (gdbreplay_version, gdbreplay_usage): New.
2835
        (main): Accept --version and --help options.
2836
 
2837
2008-06-04  Daniel Jacobowitz  
2838
 
2839
        * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
2840
        (arm_breakpoint_at): Handle Thumb.
2841
        (the_low_target): Add comment.
2842
 
2843
2008-05-29  Ulrich Weigand  
2844
 
2845
        * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
2846
 
2847
2008-05-09  Doug Evans  
2848
 
2849
        * server.h (decode_search_memory_packet): Declare.
2850
        * remote-utils.c (decode_search_memory_packet): New fn.
2851
        * server.c (handle_search_memory_1): New fn.
2852
        (handle_search_memory): New fn.
2853
        (handle_query): Process qSearch:memory packets.
2854
 
2855
2008-05-08  Ulrich Weigand  
2856
 
2857
        * regcache.c (registers_length): Remove.
2858
        (set_register_cache): Verify that PBUFSIZ is large enough to hold a
2859
        full register packet.
2860
        * regcache.h (registers_length): Remove prototype.
2861
        * server.h (PBUFSIZ): Define to 16384.
2862
 
2863
2008-05-03  Ulrich Weigand  
2864
 
2865
        * configure.srv (powerpc*-*-linux*): Set srv_regobj to
2866
        powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
2867
        powerpc-64l.o, and powerpc-altivec64l.o.
2868
        Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
2869
        rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
2870
        rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
2871
        rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
2872
        rs6000/power-linux.xml, and rs6000/power64-linux.xml
2873
        to srv_xmlfiles.
2874
 
2875
        * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
2876
        (powerpc-32l.o, powerpc-32l.c): ... these new rules.
2877
        (powerpc-32.o, powerpc-32.c): Remove, replace by ...
2878
        (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
2879
        (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
2880
        (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
2881
        (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
2882
        (powerpc-64l.o, powerpc-64l.c): ... these new rules.
2883
        (powerpc-64.o, powerpc-64.c): Remove, replace by ...
2884
        (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
2885
        (clean): Update.
2886
 
2887
        * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
2888
        (init_registers_powerpc_32l): ... this new prototype.
2889
        (init_registers_powerpc_32): Remove, replace by ...
2890
        (init_registers_powerpc_altivec32l): ... this new prototype.
2891
        (init_registers_powerpc_e500): Remove, replace by ...
2892
        (init_registers_powerpc_e500l): ... this new prototype.
2893
        (init_registers_ppc64): Remove, replace by ...
2894
        (init_registers_powerpc_64l): ... this new prototype.
2895
        (init_registers_powerpc_64): Remove, replace by ...
2896
        (init_registers_powerpc_altivec64l): ... this new prototype.
2897
        (ppc_num_regs): Set to 73.
2898
        (PT_ORIG_R3, PT_TRAP): Define if necessary.
2899
        (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
2900
        (ppc_cannot_store_register): Handle orig_r3 and trap.
2901
        (ppc_arch_setup): Update init_registers_... calls.
2902
        (ppc_fill_gregset): Handle orig_r3 and trap.
2903
 
2904
        * inferiors.c (clear_inferiors): Reset current_inferior.
2905
 
2906
2008-04-23  Paolo Bonzini  
2907
 
2908
        * acinclude.m4: Add override.m4.
2909
        * configure: Regenerate.
2910
 
2911
2008-04-21  Ulrich Weigand  
2912
 
2913
        * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
2914
        initial call to init_register_ppc64.
2915
 
2916
2008-04-21  Ulrich Weigand  
2917
 
2918
        * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into single
2919
        powerpc*-*-linux* case.
2920
        (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
2921
 
2922
2008-04-17  Ulrich Weigand  
2923
 
2924
        * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
2925
        srv_regobj.  Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
2926
        from reg_xmlfiles.
2927
        * linux-ppc-low.c: Include .
2928
        (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
2929
        (ppc_hwcap): New global variable.
2930
        (ppc_regmap): Remove __SPE__ #ifdef sections.
2931
        (ppc_regmap_e500): New global variable.
2932
        (ppc_cannot_store_register): Update __SPE__ special case.
2933
        (ppc_get_hwcap): New function.
2934
        (ppc_arch_setup): Use it to determine whether inferior supports
2935
        AltiVec or SPE registers.  Set the_low_target.regmap if appropriate.
2936
        (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
2937
        Do not access registers if target does not support AltiVec.
2938
        (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
2939
        Do not access registers if target does not support SPE.
2940
        (target_regsets): Unconditionally include AltiVec and SPE regsets.
2941
 
2942
2008-04-17  Daniel Jacobowitz  
2943
 
2944
        * linux-low.c (disabled_regsets, num_regsets): New.
2945
        (use_regsets_p): Delete.
2946
        (linux_wait_for_process): Clear disabled_regsets.
2947
        (regsets_fetch_inferior_registers): Check and set it.
2948
        (regsets_store_inferior_registers): Likewise.
2949
        (linux_fetch_registers, linux_store_registers): Do not use
2950
        use_regsets_p.
2951
        (initialize_low): Allocate disabled_regsets.
2952
 
2953
2008-04-14  Daniel Jacobowitz  
2954
 
2955
        * Makefile.in (LIBOBJS): New.
2956
        (OBS): Use LIBOBJS.
2957
        (memmem.o): New rule.
2958
        * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
2959
        * configure: Regenerated.
2960
 
2961
2008-04-04  Ulrich Weigand  
2962
 
2963
        * server.c (handle_query): Never return "unsupported" for
2964
        qXfer:features:read queries.
2965
 
2966
2008-03-27  Ulrich Weigand  
2967
 
2968
        * server.c (get_features_xml): Fix inverted condition.
2969
        (handle_query): Always support qXfer:feature:read.
2970
 
2971
2008-03-10  Daniel Jacobowitz  
2972
 
2973
        * server.c (wrapper_argv): New.
2974
        (start_inferior): Handle wrapper_argv.  If set, expect an extra
2975
        trap.
2976
        (gdbserver_usage): Document --wrapper.
2977
        (main): Parse --wrapper.
2978
 
2979
2008-02-28  Ulrich Weigand  
2980
 
2981
        * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
2982
        powerpc-*-linux* to srv_regobj and reg_xmlfiles.
2983
        * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
2984
        (ppc_set_pc): Likewise.
2985
        (ppc_arch_setup): New function.
2986
        (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
2987
        of collect_register.
2988
        (the_low_target): Use ppc_arch_setup as arch_setup initializer.
2989
 
2990
2008-02-28  Ulrich Weigand  
2991
 
2992
        * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
2993
        instead of linux-ppc64-low.o.
2994
        * linux-ppc64-low.c: Remove file.
2995
        * Makefile.in (SFILES): Remove linux-ppc64-low.c.
2996
        (linux-ppc64-low.o): Remove rule.
2997
 
2998
        * linux-ppc-low.c (init_registers_ppc64): Add prototype.
2999
        (init_registers_powerpc_64): Likewise.
3000
        (ppc_regmap): Conditionally define depending on __powerpc64__.
3001
        (ppc_cannot_store_register): Do not special-case "fpscr" when
3002
        compiled on __powerpc64__.
3003
        (ppc_collect_ptrace_register): New function.
3004
        (ppc_supply_ptrace_register): New function.
3005
        (ppc_breakpoint): Change type to "unsigned int".
3006
        (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
3007
        (the_low_target): Conditionally provide initializers for the
3008
        arch_setup member depending on __powerpc64__.  Install
3009
        collect_ptrace_register and supply_ptrace_register members.
3010
 
3011
2008-02-28  Ulrich Weigand  
3012
 
3013
        * regcache.h (gdbserver_xmltarget): Add extern declaration.
3014
        * server.c (gdbserver_xmltarget): Define.
3015
        (get_features_xml): Use it to replace "target.xml" and arch_string.
3016
 
3017
        * configure.srv: Remove srv_xmltarget.  Add XML files that were
3018
        mentioned there to srv_xmlfiles instead.  Remove conditional tests
3019
        on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
3020
        srv_xmlfiles and srv_regobj to include all possible choices.
3021
        * configure.ac (srv_xmltarget): Remove.
3022
        (srv_xmlfiles): Do not add "target.xml".
3023
        (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
3024
        checks for supplementary target information.
3025
        * configure: Regenerate.
3026
        * Makefile.in (XML_TARGET): Remove.
3027
        (target.xml): Remove rule.
3028
        (clean): Do not clean up target.xml.
3029
        (.PRECIOUS): Do not mention target.xml.
3030
 
3031
        * target.h (struct target_ops): Remove arch_string member.
3032
        * linux-low.c (linux_arch_string): Remove.
3033
        (linux_target_ops): Remove arch_string initializer.
3034
        * linux-low.h (struct linux_target_ops): Remove arch_string member.
3035
        * linux-i386-low.c (the_low_target): Remove arch_string initializer.
3036
        * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
3037
        * spu-low.c (spu_arch_string): Remove.
3038
        (spu_target_ops): Remove arch_string initializer.
3039
        * win32-low.c (win32_arch_string): Remove.
3040
        (win32_target_ops): Remove arch_string initializer.
3041
        * win32-low.h (struct win32_target_ops): Remove arch_string member.
3042
        * win32-arm-low.c (the_low_target): Remove arch_string initializer.
3043
        * win32-i368-low.c (the_low_target): Remove arch_string initializer.
3044
 
3045
2008-02-27  Ulrich Weigand  
3046
 
3047
        * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
3048
        by collect_ptrace_register and supply_ptrace_register hooks.
3049
        * linux-low.c (fetch_register): Use supply_ptrace_register callback
3050
        instead of checking for the_low_target.left_pad_xfer.
3051
        (usr_store_inferior_registers): Use collect_ptrace_register callback
3052
        instead of checking for the_low_target.left_pad_xfer.
3053
 
3054
        * linux-s390-low.c (s390_collect_ptrace_register): New function.
3055
        (s390_supply_ptrace_register): Likewise.
3056
        (s390_fill_gregset): Call s390_collect_ptrace_register.
3057
        (the_low_target): Update.
3058
 
3059
        * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
3060
        (ppc_supply_ptrace_register): Likewise.
3061
        (the_low_target): Update.
3062
 
3063
        * linux-i386-low.c (the_low_target): Update.
3064
        * linux-x86-64-low.c (the_low_target): Update.
3065
 
3066
2008-02-27  Ulrich Weigand  
3067
 
3068
        * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
3069
        reg-s390.o and reg-s390x.o.
3070
 
3071
        * linux-low.c (new_inferior): New global variable.
3072
        (linux_create_inferior, linux_attach): Set it.
3073
        (linux_wait_for_process): Call the_low_target.arch_setup after the
3074
        target has stopped for the first time.
3075
        (initialize_low): Do not call the_low_target.arch_setup.
3076
 
3077
        * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
3078
        (s390_set_pc): Likewise.
3079
        (s390_arch_setup): New function.
3080
        (the_low_target): Use s390_arch_setup as arch_setup routine.
3081
 
3082
        * regcache.c (realloc_register_cache): New function.
3083
        (set_register_cache): Call it for each existing regcache.
3084
 
3085
2008-02-27  Ulrich Weigand  
3086
 
3087
        * server.h (init_registers): Remove prototype.
3088
 
3089
        * linux-low.h (struct linux_target_ops): Add arch_setup field.
3090
        * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
3091
        instead of init_registers ().
3092
        * linux-arm-low.c (init_registers_arm): Add prototype.
3093
        (init_registers_arm_with_iwmmxt): Likewise.
3094
        (the_low_target): Add initializer for arch_setup field.
3095
        * linux-cris-low.c (init_registers_cris): Add prototype.
3096
        (the_low_target): Add initializer for arch_setup field.
3097
        * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
3098
        (the_low_target): Add initializer for arch_setup field.
3099
        * linux-i386-low.c (init_registers_i386_linux): Add prototype.
3100
        (the_low_target): Add initializer for arch_setup field.
3101
        * linux-ia64-low.c (init_registers_ia64): Add prototype.
3102
        (the_low_target): Add initializer for arch_setup field.
3103
        * linux-m32r-low.c (init_registers_m32r): Add prototype.
3104
        (the_low_target): Add initializer for arch_setup field.
3105
        * linux-m68k-low.c (init_registers_m68k): Add prototype.
3106
        (the_low_target): Add initializer for arch_setup field.
3107
        * linux-mips-low.c (init_registers_mips_linux): Add prototype.
3108
        (init_registers_mips64_linux): Likewise.
3109
        (the_low_target): Add initializer for arch_setup field.
3110
        * linux-ppc-low.c (init_registers_ppc): Add prototype.
3111
        (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
3112
        (the_low_target): Add initializer for arch_setup field.
3113
        * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
3114
        (init_registers_powerpc_64): Likewise.
3115
        (the_low_target): Add initializer for arch_setup field.
3116
        * linux-s390-low.c (init_registers_s390): Add prototype.
3117
        (init_registers_s390x): Likewise.
3118
        (the_low_target): Add initializer for arch_setup field.
3119
        * linux-sh-low.c (init_registers_sh): Add prototype.
3120
        (the_low_target): Add initializer for arch_setup field.
3121
        * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
3122
        (the_low_target): Add initializer for arch_setup field.
3123
        * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
3124
        (the_low_target): Add initializer for arch_setup field.
3125
 
3126
        * win32-low.h (struct win32_target_ops): Add arch_setup field.
3127
        * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
3128
        instead of init_registers ().
3129
        * win32-arm-low.c (init_registers_arm): Add prototype.
3130
        (the_low_target): Add initializer for arch_setup field.
3131
        * win32-i386-low.c (init_registers_i386): Add prototype.
3132
        (the_low_target): Add initializer for arch_setup field.
3133
 
3134
        * spu-low.c (init_registers_spu): Add prototype.
3135
        (initialize_low): Call initialie_registers_spu () instead of
3136
        initialize_registers ().
3137
 
3138
2008-02-19  Pedro Alves  
3139
 
3140
        * server.c (handle_v_requests): When handling the vRun and vAttach
3141
        packets, if already debugging a process, don't kill it.  Return an
3142
        error instead.
3143
 
3144
2008-02-17  Daniel Jacobowitz  
3145
 
3146
        * server.c (handle_query): Correct length check.
3147
 
3148
2008-02-14  Pedro Alves  
3149
 
3150
        * win32-low.c (do_initial_child_stuff): Add process handle
3151
        parameter.  Set current_process_handle and current_process_id from the
3152
        parameters. Clear globals.
3153
        (win32_create_inferior): Don't set current_process_handle and
3154
        current_process_id here.  Instead pass them on the call to
3155
        do_initial_child_stuff.
3156
        (win32_attach): Likewise.
3157
        (win32_clear_inferiors): New.
3158
        (win32_kill): Don't close the current process handle or the
3159
        current thread handle here.  Instead call win32_clear_inferiors.
3160
        (win32_detach): Don't open a new handle to the process.  Call
3161
        win32_clear_inferiors.
3162
        (win32_join): Don't rely on current_process_handle; open a new
3163
        handle using the process id.
3164
        (win32_wait): Call win32_clear_inferiors when the inferior process
3165
        has exited.
3166
 
3167
2008-02-14  Daniel Jacobowitz  
3168
 
3169
        * server.c (monitor_show_help): Add "exit".
3170
 
3171
2008-02-11  Maxim Grigoriev  
3172
 
3173
        * Makefile.in (SFILES): Add linux-xtensa-low.c.
3174
        (clean): Add reg-xtensa.c.
3175
        (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
3176
        * configure.srv (xtensa*-*-linux*) New target.
3177
        * linux-xtensa-low.c: New.
3178
        * xtensa-xtregs.c: New.
3179
 
3180
2008-02-01  Pedro Alves  
3181
 
3182
        * hostio.c: Don't include errno.h.
3183
        (errno_to_fileio_errno): Move to hostio-errno.
3184
        * hostio.c: (hostio_error): Remove the error parameter.  Defer the
3185
        error number outputting to the target->hostio_last_error callback.
3186
        (hostio_packet_error): Use FILEIO_EINVAL directly.
3187
        (handle_open, handle_pread, hostio_error, handle_unlink): Update
3188
        calls to hostio_error.
3189
        * hostio-errno.c: New.
3190
        * server.h (hostio_last_error_from_errno): Declare.
3191
        * target.h (target_ops): Add hostio_last_error member.
3192
        * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
3193
        as hostio_last_error handler.
3194
        * spu-low.c (spu_target_ops): Likewise.
3195
        * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
3196
        (wince_hostio_last_error): New functions.
3197
        (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
3198
        as hostio_last_error handler.
3199
        (win32_target_ops) [!_WIN32_WCE]: Register
3200
        hostio_last_error_from_errno as hostio_last_error handler.
3201
        * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
3202
        (hostio-errno.o): New rule.
3203
        * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
3204
        * configure.srv (srv_hostio_err_objs): New variable.  Default to
3205
        hostio-errno.o.
3206
        (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
3207
        * configure: Regenerate.
3208
 
3209
2008-01-29  Daniel Jacobowitz  
3210
 
3211
        * linux-low.c (linux_attach_lwp): Do not _exit after errors.
3212
        (linux_kill, linux_detach): Clean up the process list.
3213
        * remote-utils.c (remote_open): Improve port number parsing.
3214
        (putpkt_binary, input_interrupt): Only send interrupts if the target
3215
        is running.
3216
        * server.c (extended_protocol): Make static.
3217
        (attached): Define earlier.
3218
        (exit_requested, response_needed, program_argv): New variables.
3219
        (target_running): New.
3220
        (start_inferior): Clear attached here.
3221
        (attach_inferior): Set attached here.
3222
        (require_running): Define.
3223
        (handle_query): Use require_running and target_running.  Implement
3224
        "monitor exit".
3225
        (handle_v_attach, handle_v_run): New.
3226
        (handle_v_requests): Use require_running.  Handle vAttach and vRun.
3227
        (gdbserver_usage): Update.
3228
        (main): Redo argument parsing.  Handle --debug and --multi.  Handle
3229
        --attach along with other options or after the port.  Save
3230
        program_argv.  Support no initial program.  Resynchronize
3231
        communication with GDB after an error.  Handle "monitor exit".
3232
        Use require_running and target_running.  Always allow the extended
3233
        protocol.  Do not error out for Hc0 or Hc-1.  Do not automatically
3234
        restart in extended mode.
3235
        * README: Refer to the GDB manual.  Update --attach usage.
3236
 
3237
2007-12-20  Andreas Schwab  
3238
 
3239
        * linux-low.c (STACK_SIZE): Define.
3240
        (linux_tracefork_child): Use it.  Use __clone2 on ia64.
3241
        (linux_test_for_tracefork): Likewise.
3242
 
3243
2007-12-18  Daniel Jacobowitz  
3244
 
3245
        * linux-low.c (linux_wait_for_event): Update messages.  Do not
3246
        reinsert auto-delete breakpoints.
3247
        * mem-break.c (struct breakpoint): Change return type of handler to
3248
        int.
3249
        (set_breakpoint_at): Update handler type.
3250
        (reinsert_breakpoint_handler): Return 1 instead of calling
3251
        delete_breakpoint.
3252
        (reinsert_breakpoint_by_bp): Check for the original breakpoint before
3253
        setting a new one.
3254
        (check_breakpoints): Delete auto-delete breakpoints and return 2.
3255
        * mem-break.h (set_breakpoint_at): Update handler type.
3256
        * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
3257
        * win32-low.c (auto_delete_breakpoint): New.
3258
        (get_child_debug_event): Use it.
3259
 
3260
2007-12-16  Daniel Jacobowitz  
3261
 
3262
        * configure.ac: Check for pread and pwrite.
3263
        * hostio.c (handle_pread): Fall back to lseek and read.
3264
        (handle_pwrite): Fall back to lseek and write.
3265
        * config.in, configure: Regenerated.
3266
 
3267
2007-12-07  Daniel Jacobowitz  
3268
 
3269
        * server.c (myresume): Add own_buf argument.
3270
        (main): Update calls.
3271
 
3272
2007-12-06  Daniel Jacobowitz  
3273
 
3274
        * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
3275
        * remote-utils.c (remote_open): Do not call disable_async_io.
3276
        (block_async_io): Delete.
3277
        (unblock_async_io): Make static.
3278
        (initialize_async_io): New.
3279
        * server.c (handle_v_cont): Handle async I/O here.
3280
        (myresume): Likewise.  Move other common resume tasks here...
3281
        (main): ... from here.  Call initialize_async_io.  Disable async
3282
        I/O before the main loop.
3283
        * server.h (initialize_async_io): Declare.
3284
        (block_async_io, unblock_async_io): Delete prototypes.
3285
        * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
3286
 
3287
2007-12-06  Mick Davis  
3288
 
3289
        * remote-utils.c (readchar): Allow binary data in received messages.
3290
 
3291
2007-12-03  Pedro Alves  
3292
 
3293
        * win32-low.c (attaching): New global.
3294
        (win32_create_inferior): Clear the `attaching' global.
3295
        (win32_attach): Set the `attaching' global.
3296
        (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
3297
        attaching.  Only set a breakpoint at the entry point if not
3298
        attaching.
3299
 
3300
2007-12-03  Pedro Alves  
3301
 
3302
        * server.c (main): Don't report dll events on the initial
3303
        connection on attaches.
3304
 
3305
2007-12-03  Pedro Alves  
3306
 
3307
        * server.c (main): Relax numerical bases supported for the pid of
3308
        the --attach command line argument.
3309
 
3310
2007-12-03  Pedro Alves  
3311
 
3312
        * win32-low.c (win32_attach): Call OpenProcess before
3313
        DebugActiveProcess, not after.  Add last error output to error
3314
        call.
3315
 
3316
2007-12-03  Pedro Alves  
3317
 
3318
        * win32-low.c (win32_get_thread_context)
3319
        (win32_set_thread_context): New functions.
3320
        (thread_rec): Use win32_get_thread_context.
3321
        (continue_one_thread, win32_resume): Use win32_set_thread_context.
3322
        * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
3323
        field.
3324
 
3325
2007-12-03  Leo Zayas
3326
            Pedro Alves  
3327
 
3328
        * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
3329
        global variables.
3330
        (child_add_thread): Minor cleanup.
3331
        (child_continue): Resume artificially suspended threads before
3332
        calling ContinueDebugEvent.
3333
        (suspend_one_thread): New.
3334
        (fake_breakpoint_event): New.
3335
        (get_child_debug_event): Change return type to int.  Check here if
3336
        gdb sent an interrupt request.  If a soft interrupt was requested,
3337
        fake a breakpoint event.  Return 0 if there is no event to handle,
3338
        and 1 otherwise.
3339
        (win32_wait): Don't check here if gdb sent an interrupt request.
3340
        Ensure there is a valid event to handle.
3341
        (win32_request_interrupt): Add soft interruption method as last
3342
        resort.
3343
 
3344
2007-12-03  Leo Zayas
3345
            Pedro Alves  
3346
 
3347
        * win32-low.h (win32_thread_info): Add descriptions to the
3348
        structure members.  Replace `suspend_count' counter by a
3349
        `suspended' flag.
3350
        * win32-low.c (thread_rec): Update condition of when to get the
3351
        context from the inferior.  Rely on ContextFlags being set if it
3352
        has already been retrieved.  Only suspend the inferior thread if
3353
        we haven't already.  Warn if that fails.
3354
        (continue_one_thread): s/suspend_count/suspended/.  Only call
3355
        ResumeThread once.  Warn if that fails.
3356
 
3357
2007-12-02  Pedro Alves  
3358
 
3359
        * win32-low.c (win32_wait): Don't read from the inferior when it
3360
        has already exited.
3361
 
3362
2007-12-02  Pedro Alves  
3363
 
3364
        * Makefile.in (win32_low_h): New variable.
3365
        (win32-low.o): Add dependency on $(win32_low_h).
3366
        (win32-arm-low.o, win32-i386-low.o): New rules.
3367
 
3368
2007-11-30  Daniel Jacobowitz  
3369
 
3370
        * hostio.c: Correct copyright year.
3371
 
3372
2007-11-30  Daniel Jacobowitz  
3373
 
3374
        * Makefile.in (OBS): Add hostio.o.
3375
        (hostio.o): New rule.
3376
        * server.h (handle_vFile): Declare.
3377
        * hostio.c: New file.
3378
        * server.c (handle_v_requests): Take packet_len and new_packet_len
3379
        for binary packets.  Call handle_vFile.
3380
        (main): Update call to handle_v_requests.
3381
 
3382
2007-11-05  Daniel Jacobowitz  
3383
 
3384
        * linux-low.c: Include .
3385
 
3386
2007-11-01  Daniel Jacobowitz  
3387
 
3388
        * linux-low.c (linux_tracefork_grandchild): New.
3389
        (linux_tracefork_child): Use clone.
3390
        (linux_test_for_tracefork): Use clone; allocate and free a stack.
3391
 
3392
2007-10-31  Joel Brobecker  
3393
 
3394
        * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
3395
 
3396
2007-10-24  Daniel Jacobowitz  
3397
 
3398
        * linux-low.c (handle_extended_wait): Handle unexpected signals.
3399
 
3400
2007-10-23  Daniel Jacobowitz  
3401
 
3402
        * inferiors.c (change_inferior_id): Delete.
3403
        (add_pid_to_list, pull_pid_from_list): New.
3404
        * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
3405
        (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
3406
        (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
3407
        (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
3408
        (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
3409
        (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
3410
        (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
3411
        (using_threads): Always set to 1.
3412
        (handle_extended_wait): New.
3413
        (add_process): Do not set TID.
3414
        (linux_create_inferior): Set must_set_ptrace_flags.
3415
        (linux_attach_lwp): Remove TID argument.  Do not check using_threads.
3416
        Use PTRACE_SETOPTIONS.  Call new_thread_notify.  Update all callers.
3417
        (linux_thread_alive): Rename TID argument to LWPID.
3418
        (linux_wait_for_process): Handle unknown processes.  Do not use TID.
3419
        (linux_wait_for_event): Do not use TID or check using_threads.  Update
3420
        call to dead_thread_notify.  Call handle_extended_wait.
3421
        (linux_create_inferior): Use PTRACE_SETOPTIONS.
3422
        (send_sigstop): Delete sigstop_sent.
3423
        (wait_for_sigstop): Avoid TID.
3424
        (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
3425
        (linux_test_for_tracefork): New.
3426
        (linux_lookup_signals): Use thread_db_active and
3427
        linux_supports_tracefork_flag.
3428
        (initialize_low): Use thread_db_active and linux_test_for_tracefork.
3429
        * linux-low.h (get_process_thread): Avoid TID.
3430
        (struct process_ifo): Move thread_known and tid to the end.  Remove
3431
        sigstop_sent.
3432
        (linux_attach_lwp, thread_db_init): Update prototypes.
3433
        * server.h (change_inferior_id): Delete prototype.
3434
        (add_pid_to_list, pull_pid_from_list): New prototypes.
3435
        * thread-db.c (thread_db_use_events): New.
3436
        (find_first_thread): Rename to...
3437
        (find_one_thread): ...this.  Update callers and messages.  Do not
3438
        call fatal.  Check thread_db_use_events.  Do not call
3439
        change_inferior_id or new_thread_notify.
3440
        (maybe_attach_thread): Update.  Do not call new_thread_notify.
3441
        (thread_db_init): Set thread_db_use_events.  Check use_events.
3442
        * utils.c (fatal, warning): Correct message prefix.
3443
 
3444
2007-10-15  Daniel Jacobowitz  
3445
 
3446
        * Makefile.in (clean): Remove new files.
3447
        (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
3448
        (powerpc-64.o, powerpc-64.c): New rules.
3449
        * configure.srv: Use alternate register sets for powerpc64-*-linux*
3450
        with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
3451
        with SPE.
3452
        * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
3453
        SPE targets.
3454
        (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
3455
        (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
3456
        (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
3457
        (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
3458
        (target_regsets): Add AltiVec and SPE register sets.
3459
        * configure.ac: Check for AltiVec and SPE.
3460
        * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
3461
        (ppc_fill_vrregset, ppc_store_vrregset): New.
3462
        (target_regsets): Add AltiVec register set.
3463
        * configure: Regenerated.
3464
 
3465
2007-09-19  Daniel Jacobowitz  
3466
 
3467
        * linux-low.c (O_LARGEFILE): Define.
3468
        (linux_read_memory): Use /proc/PID/mem.
3469
        * configure.ac: Use AC_GNU_SOURCE.  Check for pread64.
3470
        * configure, config.in: Regenerated.
3471
 
3472
2007-09-04  Daniel Jacobowitz  
3473
 
3474
        * linux-low.c (linux_wait_for_event): Do not pass signals while
3475
        single-stepping.
3476
 
3477
2007-09-03  Pedro Alves  
3478
 
3479
        * win32-low.c (create_process): New.
3480
        (win32_create_inferior): Use create_process instead of
3481
        CreateProcess.  If create_process failed retry appending an ".exe"
3482
        suffix.  Store the GetLastError result immediatelly after
3483
        create_process calls and use it on the call to error.
3484
 
3485
2007-09-03  Pedro Alves  
3486
 
3487
        * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
3488
 
3489
2007-08-23  Joel Brobecker  
3490
 
3491
        * configure.ac: Switch license to GPLv3.
3492
 
3493
2007-08-01  Michael Snyder  
3494
 
3495
        * remote-utils.c (putpkt_binary): Memory leak, free buf2.
3496
 
3497
2007-07-31  Pedro Alves  
3498
 
3499
        * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
3500
        typedef.
3501
        (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
3502
        (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL.  Get
3503
        CloseToolhelp32Snapshot.
3504
        (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
3505
        CloseToolhelp32Snapshot.
3506
 
3507
2007-07-27  Michael Snyder  
3508
 
3509
        * server.c (main): Check for inferior exit before main loop.
3510
 
3511
2007-07-18  Pedro Alves  
3512
 
3513
        * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
3514
        instead of on tmp_desc.
3515
 
3516
2007-07-17  Pedro Alves  
3517
            Daniel Jacobowitz  
3518
 
3519
        * inferiors.c (all_dlls, dlls_changed, get_dll): New.
3520
        (add_thread): Minor cleanups.
3521
        (clear_inferiors): Move lower in the file.  Clear the DLL
3522
        list.
3523
        (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
3524
        * remote-utils.c (prepare_resume_reply): Check dlls_changed.
3525
        (xml_escape_text): New.
3526
        * server.c (handle_query): Handle qXfer:libraries:read.  Report it
3527
        for qSupported.
3528
        (handle_v_cont): Report errors.
3529
        (gdbserver_version): Update.
3530
        (main): Correct size of own_buf.  Do not report initial DLL events.
3531
        * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
3532
        (unloaded_dll, xml_escape_text): New.
3533
        * win32-low.c (enum target_waitkind): Update comments.
3534
        (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
3535
        (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
3536
        (win32_EnumProcessModules, win32_GetModuleInformation)
3537
        (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
3538
        (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
3539
        (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
3540
        (win32_Module32First, win32_Module32Next, load_toolhelp)
3541
        (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
3542
        (get_child_debug_event): Handle DLL events.
3543
        (win32_wait): Likewise.
3544
 
3545
2007-07-12  Daniel Jacobowitz  
3546
 
3547
        * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
3548
        * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
3549
 
3550
2007-07-08  Pedro Alves  
3551
 
3552
        * win32-low.c (handle_output_debug_string): Ignore event if not
3553
        waiting.
3554
 
3555
2007-07-08  Pedro Alves  
3556
 
3557
        * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
3558
 
3559
2007-07-03  Daniel Jacobowitz  
3560
 
3561
        * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
3562
 
3563
2007-07-02  Daniel Jacobowitz  
3564
 
3565
        * inferiors.c (change_inferior_id): Add comment.
3566
        * linux-low.c (check_removed_breakpoint): Add an early
3567
        prototype.  Improve debug output.
3568
        (linux_attach): Doc update.
3569
        (linux_detach_one_process, linux_detach): Clean up before releasing
3570
        each process.
3571
        (send_sigstop, wait_for_sigstop): Improve comments and debug output.
3572
        * linux-low.h (struct process_info): Doc improvement.
3573
        * mem-break.c (delete_all_breakpoints): New.
3574
        * mem-break.h (delete_all_breakpoints): New prototype.
3575
        * thread-db.c (find_first_thread): New.
3576
        (thread_db_create_event): Call it instead of
3577
        thread_db_find_new_threads.  Clean up unused variables.
3578
        (maybe_attach_thread): Remove first thread handling.
3579
        (thread_db_find_new_threads): Use find_first_thread.
3580
        (thread_db_get_tls_address): Likewise.
3581
 
3582
2007-06-27  Daniel Jacobowitz  
3583
 
3584
        * thread-db.c (thread_db_find_new_threads): Add prototype.
3585
        (thread_db_create_event): Check for the main thread before adding
3586
        a new thread.
3587
        (maybe_attach_thread): Only enable event reporting if TID == 0.
3588
        (thread_db_get_tls_address): Check for new threads.
3589
 
3590
2007-06-20  Daniel Jacobowitz  
3591
 
3592
        * linux-low.c (linux_create_inferior): Try execv before execvp.
3593
        * spu-low.c (spu_create_inferior): Likewise.
3594
 
3595
2007-06-13  Mike Frysinger  
3596
 
3597
        * linux-low.c (linux_create_inferior): Change execv to execvp.
3598
        * spu-low.c (spu_create_inferior): Likewies.
3599
 
3600
2007-06-13  Daniel Jacobowitz  
3601
 
3602
        * Makefile.in (clean): Clean new files instead of deleted ones.
3603
        (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
3604
        (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
3605
        rules.
3606
        * configure.srv: Specify XML files and new regformats for MIPS and
3607
        MIPS64 GNU/Linux.
3608
        * linux-mips-low.c (mips_num_regs): Set to only used registers.
3609
        (mips_regmap): Do not fetch $0.  Remove unused registers.  Add
3610
        an entry for the restart register.
3611
        (mips_cannot_fetch_register, mips_cannot_store_register)
3612
        (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
3613
        register names to match the XML descriptions.
3614
        (mips_fill_gregset, mips_store_gregset): Likewise.  Handle the
3615
        restart register instead of $0.
3616
 
3617
2007-06-12  Ulrich Weigand  
3618
            Markus Deuling  
3619
 
3620
        * remote-utils.c (decode_xfer_write): New function.
3621
        * server.h (decode_xfer_write): Add prototype.
3622
        * server.c (handle_query): Add PACKET_LEN argument.  Support
3623
        qXfer:spu:read and qXfer:spu:write packets.
3624
        (main): Pass packet_len to handle_query.
3625
        * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
3626
        * target.h (target_ops): Add qxfer_spu.
3627
 
3628
2007-06-12  Ulrich Weigand  
3629
 
3630
        * spu-low.c (spu_proc_xfer_spu): Do not return failure when
3631
        accessing non-seekable spufs files.
3632
 
3633
2007-05-16  Markus Deuling  
3634
 
3635
        * server.c (handle_query): Add reply for qC packet.
3636
 
3637
2007-05-10  Pedro Alves  
3638
            Leo Zayas  
3639
 
3640
        * server.h (check_remote_input_interrupt_request): New function.
3641
        * remote_utils.c (INVALID_DESCRIPTOR): New define.
3642
        (remote_desc): Initialize with INVALID_DESCRIPTOR.
3643
        (input_interrupt): Expose on USE_WIN32API too.  Fix whitespace.
3644
        (check_remote_input_interrupt_request): New function.
3645
        * server.h (check_remote_input_interrupt_request): Declare.
3646
        * win32-low.c (winapi_DebugBreakProcess,
3647
        winapi_GenerateConsoleCtrlEvent): New typedefs.
3648
        (get_child_debug_event): Lower Win32 debug event polling from 1 sec
3649
        to 250 ms.
3650
        (win32_wait): Check for remote interrupt request
3651
        with check_remote_input_interrupt_request.
3652
        (win32_request_interrupt): New function.
3653
        (win32_target_op): Set request_interrupt to win32_request_interrupt.
3654
 
3655
2007-05-10  Pedro Alves  
3656
 
3657
        * win32-low.c (debug_registers_changed,
3658
        debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
3659
        CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
3660
        CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
3661
        (thread_rec): Get context using the low target.
3662
        (child_add_thread): Call thread_added on the low target,
3663
        which does the same thing.
3664
        (regptr): Delete.
3665
        (do_initial_child_stuff): Remove debug registers references.
3666
        Set context using the low target.  Resume threads after
3667
        setting the contexts.
3668
        (child_continue): Remove dead variable.  Remove debug
3669
        registers references.
3670
        (child_fetch_inferior_registers): Go through the low target.
3671
        (do_child_store_inferior_registers): Remove.
3672
        (child_store_inferior_registers): Go through the low target.
3673
        (win32_resume): Remove debug registers references.
3674
        Set context using the low target.
3675
        (handle_exception): Change return type to void.  Don't record
3676
        context here.  Set status to TARGET_WAITKIND_SPURIOUS on a
3677
        first chance exception.
3678
        (get_child_debug_event): Change return type to void.  Remove
3679
        goto loop.  Always return after waiting for debug event.
3680
        (win32_wait): Convert to switch statement.  Handle spurious
3681
        events.
3682
 
3683
        * win32-i386-low.c (debug_registers_changed,
3684
        debug_registers_used): New.
3685
        (initial_stuff): Rename to ...
3686
        (i386_initial_stuff): ... this.  Clear debug registers
3687
        state variables.
3688
        (store_debug_registers): Delete.
3689
        (i386_get_thread_context): New.
3690
        (load_debug_registers): Delete.
3691
        (i386_set_thread_context): New.
3692
        (i386_thread_added): New.
3693
        (single_step): Rename to ...
3694
        (i386_single_step): ... this.
3695
        (do_fetch_inferior_registers): Rename to ...
3696
        (i386_fetch_inferior_register): ... this.
3697
        (i386_store_inferior_register): New.
3698
        (the_low_target): Adapt to new interface.
3699
 
3700
        * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
3701
        (arm_get_thread_context): New.
3702
        (arm_set_thread_context): New.
3703
        (regptr): New.
3704
        (do_fetch_inferior_registers): Rename to ...
3705
        (arm_fetch_inferior_register): ... this.
3706
        (arm_store_inferior_register): New.
3707
        (arm_wince_breakpoint): Reimplement as unsigned long.
3708
        (arm_wince_breakpoint_len): Define.
3709
        (the_low_target): Adapt to new interface.
3710
 
3711
        * win32-low.h (target_ops): Remove regmap, store_debug_registers and
3712
        load_debug_registers.  Add get_thread_context, set_thread_context,
3713
        thread_added and store_inferior_register.  Rename
3714
        fetch_inferior_registers to fetch_inferior_register.
3715
        (regptr): Remove declaration.
3716
 
3717
2007-05-10  Pedro Alves  
3718
 
3719
        * linux-low.c (linux_detach): Change return type to int.  Return 0.
3720
        * spu-low.c (spu_detach): Likewise.
3721
 
3722
2007-05-10  Pedro Alves  
3723
 
3724
        * target.h (target_ops): Change return type of detach to int.
3725
        Add join.
3726
        (join_inferior): New.
3727
        * server.c (main): Don't skip detach support on mingw32.
3728
        If the inferior doesn't support detaching return error.
3729
        Call join_inferior instead of using waitpid.
3730
        * linux-low.c (linux_join): New.
3731
        (linux_target_op): Add linux_join.
3732
        * spu-low.c (spu_join): New.
3733
        (spu_target_ops): Add spu_join.
3734
        * win32-low.c (win32_detach): Adapt to new interface.
3735
        Reopen current_process_handle before detaching.  Issue a child
3736
        resume before detaching.
3737
        (win32_join): New.
3738
        (win32_target_op): Add win32_join.
3739
 
3740
2007-05-10  Pedro Alves  
3741
 
3742
        * win32-low.c (win32-attach): Fix return value.
3743
        * target.h (target_ops): Describe ATTACH return values.
3744
 
3745
2007-05-10  Pedro Alves  
3746
 
3747
        * win32-low.c (GETPROCADDRESS): Define.
3748
        (winapi_DebugActiveProcessStop): Add WINAPI.  typedef as pointer.
3749
        (winapi_DebugSetProcessKillOnExit): Likewise.
3750
        (win32_create_inferior): Force usage of ansi CreateProcessA.
3751
        (win32_attach): Use GETPROCADDRESS.
3752
        (win32_detach): Likewise.
3753
 
3754
2007-05-10  Pedro Alves  
3755
 
3756
        * win32-low.c (win32_wait): Don't use WSTOPSIG.
3757
 
3758
2007-03-30  Pedro Alves  
3759
 
3760
        * win32-low.c: Commit leftover changes from 2007-03-29.
3761
 
3762
2007-03-30  Daniel Jacobowitz  
3763
 
3764
        * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
3765
        fields short instead of int.  Add explicit padding.
3766
        (i387_cache_to_fsave): Remove unnecessary casts.
3767
        (i387_fsave_to_cache): Doc fix.
3768
        (i387_cache_to_fxsave): Remove unnecessary casts and masking.
3769
 
3770
2007-03-30  Daniel Jacobowitz  
3771
 
3772
        * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
3773
        (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
3774
 
3775
2007-03-29  Pedro Alves  
3776
 
3777
        * configure.srv (arm*-*-mingw32ce*): Move near the other
3778
        arm targets.
3779
 
3780
2007-03-29  Pedro Alves  
3781
 
3782
        * configure.ac: Add errno checking.
3783
        (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
3784
        sys/file.h and malloc.h.
3785
        (AC_CHECK_DECLS): Add perror.
3786
        (srv_mingwce): Handle.
3787
        * configure.srv (i[34567]86-*-cygwin*): Add
3788
        win32-i386-low.o to srv_tgtobj.
3789
        (i[34567]86-*-mingw*): Likewise.
3790
        (arm*-*-mingw32ce*): Add case.
3791
        * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
3792
        HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
3793
        [__MINGW32CE__] (strerror): New function.
3794
        [__MINGW32CE__] (errno): Define to GetLastError.
3795
        [__MINGW32CE__] (COUNTOF): New macro.
3796
        (remote_open): Remove extra close call.
3797
        * mem-break.c (delete_breakpoint_at): New function.
3798
        * mem-break.h (delete_breakpoint_at): Declare.
3799
        * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
3800
        HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
3801
        [USE_WIN32API] (read, write): Add char* casts.
3802
        * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
3803
        * server.h: Include wincecompat.h on Windows CE.
3804
        [HAVE_ERRNO_H]: Check.
3805
        (perror): Declare if not declared.
3806
        * utils.c: Add stdlib.h, errno.h and malloc.h includes.
3807
        (perror_with_name): Remove errno declaration.
3808
        * wincecompat.h: New.
3809
        * wincecompat.c: New.
3810
        * win32-low.h: New.
3811
        * win32-arm-low.c: New.
3812
        * win32-i386-low.c: New.
3813
        (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
3814
        (OUTMSG2): Make it safe.
3815
        (_T): New macro.
3816
        (COUNTOF): New macro.
3817
        (NUM_REGS): Get it from the low target.
3818
        (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
3819
        CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
3820
        (thread_rec): Let low target handle debug registers.
3821
        (child_add_thread): Likewise.
3822
        (child_init_thread_list): Likewise.
3823
        (continue_one_thread): Likewise.
3824
        (regptr): New.
3825
        (do_child_fetch_inferior_registers): Move to ...
3826
        * win32-i386-low.c: ... here, and rename to ...
3827
        (do_fetch_inferior_registers): ... this.
3828
        * win32-low.c (child_fetch_inferior_registers):
3829
        Go through the low target.
3830
        (do_child_store_inferior_registers): Use regptr.
3831
        (strwinerror): New function.
3832
        (win32_create_inferior): Handle Windows CE.
3833
        Use strwinerror instead of strerror on Windows error
3834
        codes.  Add program to the error output.
3835
        Don't close the main thread handle on Windows CE.
3836
        (win32_attach): Use coredll.dll on Windows CE.
3837
        (win32_kill): Close current process and current
3838
        thread handles.
3839
        (win32_detach): Use coredll.dll on Windows CE.
3840
        (win32_resume): Let low target handle debug registers, and
3841
        step request.
3842
        (handle_exception): Add/Remove initial breakpoint.  Avoid
3843
        non-existant WSTOPSIG on Windows CE.
3844
        (win32_read_inferior_memory): Cast to remove warning.
3845
        (win32_arch_string): Go through the low target.
3846
        (initialize_low): Call set_breakpoint_data with the low
3847
        target's breakpoint.
3848
        * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
3849
        FOP_REGNUM, mappings): Move to ...
3850
        * win32-i386-low.c: ... here.
3851
        * win32-low.c (win32_thread_info): Move to ...
3852
        * win32-low.h: ... here.
3853
        * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
3854
        win32-arm-low.c and wincecompat.c.
3855
        (all:): Add $EXEEXT.
3856
        (install-only:): Likewise.
3857
        (gdbserver:): Likewise.
3858
        (gdbreplay:): Likewise.
3859
        * config.in: Regenerate.
3860
        * configure: Regenerate.
3861
 
3862
2007-03-28  Pedro Alves  
3863
 
3864
        * win32-low.c: Rename typedef thread_info to
3865
        win32_thread_info throughout.
3866
 
3867
2007-03-28  Pedro Alves  
3868
 
3869
        * win32-i386-low.c: Rename to ...
3870
        * win32-low.c: ... this.
3871
        * configure.srv: Replace win32-i386-low.o with win32-low.o.
3872
        * Makefile.in: Likewise.
3873
 
3874
2007-03-27  Pedro Alves  
3875
 
3876
        * remote-utils.c (monitor_output): Constify msg parameter.
3877
        * server.h (monitor_output): Likewise.
3878
        * win32-i386-low.c (handle_output_debug_string): New.
3879
        (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
3880
        handle_output_debug_string.
3881
        (get_child_debug_event): Likewise.
3882
 
3883
2007-03-27  Mat Hostetter  
3884
 
3885
        * server.c (main): Correct strtoul check.
3886
 
3887
2007-03-27  Jon Ringle  
3888
 
3889
        * linux-low.c: Check __ARCH_HAS_MMU__ also.
3890
 
3891
2007-03-27  Brooks Moses  
3892
 
3893
        * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
3894
 
3895
2007-02-27  Daniel Jacobowitz  
3896
 
3897
        * terminal.h: Check HAVE_SGTTY_H.
3898
 
3899
2007-02-27  Mat Hostetter  
3900
 
3901
        * remote-utils.c (remote_open): Print out the assigned port number.
3902
 
3903
2007-02-26  Daniel Jacobowitz  
3904
 
3905
        * remote-utils.c (monitor_output): New function.
3906
        * server.c (debug_threads): Define here.
3907
        (monitor_show_help): New function.
3908
        (handle_query): Handle qRcmd.
3909
        (main): Do not handle 'd' packet.
3910
        * server.h (debug_threads, remote_debug, monitor_output): Declare.
3911
        * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
3912
        of debug_threads.
3913
 
3914
2007-02-25  Pedro Alves  
3915
 
3916
        * Makefile.in (EXEEXT): New.
3917
        (clean): Use $(EXEEXT).
3918
 
3919
2007-02-25  Pedro Alves  
3920
 
3921
        * target.h (target_ops): Rename send_signal to request_interrupt,
3922
        and remove enum target_signal parameter.
3923
        * linux-low.c (linux_request_interrupt): Rename from
3924
        linux_send_signal, and always send SIGINT.
3925
        * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
3926
        and always send SIGINT.
3927
        * remote-utils.c (putpkt_binary): Call request_interrupt, instead
3928
        of send_signal.
3929
        (input_interrupt): Likewise.
3930
 
3931
2007-02-25  Pedro Alves  
3932
 
3933
        * server.c (get_features_xml): Check if target implemented
3934
        arch_string.
3935
        * win32-i386-low.c (win32_arch_string): New.
3936
        (win32_target_ops): Add win32_arch_string as arch_string member.
3937
 
3938
2007-02-22  Markus Deuling  
3939
 
3940
        * spu-low.c (spu_arch_string): New.
3941
        (spu_target_ops): Add spu_arch_string.
3942
 
3943
2007-02-16  Daniel Jacobowitz  
3944
 
3945
        * remote-utils.c: Remove HAVE_TERMINAL_H check.
3946
        * configure.ac: Do not check for terminal.h.
3947
        * configure, config.in: Regenerated.
3948
 
3949
2007-02-08  Daniel Jacobowitz  
3950
 
3951
        * Makefile.in (OBS): Add $(XML_BUILTIN).
3952
        (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
3953
        (clean): Update.
3954
        (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
3955
        (arm-with-iwmmxt.c): New.
3956
        * config.in, configure: Regenerate.
3957
        * configure.ac: Check for iWMMXt.  Handle srv_xmltarget,
3958
        srv_xmlbuiltin, and srv_xmlfiles.  Define USE_XML.
3959
        * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
3960
        (arm*-*-linux*): Add iWMMXt and regset support.
3961
        * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
3962
        (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
3963
        (arm_store_wmmxregset, target_regsets): New.
3964
        * server.c (get_features_xml): Take annex argument.  Check builtin
3965
        XML documents.
3966
        (handle_query): Handle multiple annexes.
3967
 
3968
2007-01-29  Daniel Jacobowitz  
3969
 
3970
        * remote-utils.c [USE_WIN32API] (read, write): Define.
3971
        (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
3972
        write.
3973
 
3974
2007-01-09  Daniel Jacobowitz  
3975
 
3976
        * linux-i386-low.c (the_low_target): Set arch_string.
3977
        * linux-x86-64-low.c (the_low_target): Likewise.
3978
        * linux-low.c (linux_arch_string): New.
3979
        (linux_target_ops): Add it.
3980
        * linux-low.h (struct linux_target_ops): Add arch_string.
3981
        * server.c (write_qxfer_response): Use const void * for DATA.
3982
        (get_features_xml): New.
3983
        (handle_query): Handle qXfer:features:read.  Report it for qSupported.
3984
        * target.h (struct target_ops): Add arch_string method.
3985
 
3986
2007-01-03  Denis Pilat  
3987
            Daniel Jacobowitz  
3988
 
3989
        * linux-low.c (linux_kill): Handle being called with no threads.
3990
        * win32-i386-low.c (win32_kill): Likewise.
3991
        (get_child_debug_event): Clear current_process_handle.
3992
 
3993
2006-12-30  Denis PILAT  
3994
            Daniel Jacobowitz  
3995
 
3996
        * remote-utils.c (remote_open): Check the type of specified
3997
        serial port devices before opening them.
3998
        * server.c (main): Kill the inferior if an error occurs during
3999
        the first remote_open.
4000
 
4001
2006-12-05  Markus Deuling  
4002
 
4003
        * README: Update supported targets.
4004
 
4005
2006-11-28  Daniel Jacobowitz  
4006
 
4007
        * Makefile.in (clean): Remove reg-mips64.c.
4008
        (reg-mips64.c, reg-mips64.o): New rules.
4009
        * configure.srv: Handle mips64.  Include regset support for mips.
4010
        * linux-mips-low.c (union mips_register): New.
4011
        (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
4012
        (mips_breakpoint, mips_breakpoint_at): Use int.
4013
        (mips_collect_register, mips_supply_register)
4014
        (mips_collect_register_32bit, mips_supply_register_32bit)
4015
        (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
4016
        (mips_store_fpregset, target_regsets): New.
4017
        * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
4018
 
4019
2006-11-22  Ulrich Weigand  
4020
 
4021
        * configure.srv: Add target "spu*-*-*".
4022
        * Makefile.in (clean): Remove reg-spu.c.
4023
        (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
4024
        * spu-low.c: New file.
4025
 
4026
2006-11-16  Daniel Jacobowitz  
4027
 
4028
        * configure.ac: Correct td_thr_tls_get_addr test.
4029
        * configure: Regenerated.
4030
 
4031
2006-11-16  Daniel Jacobowitz  
4032
 
4033
        * linux-low.c (linux_wait_for_event): Reformat.  Use the
4034
        pass_signals array.
4035
        * remote-utils.c (decode_address_to_semicolon): New.
4036
        * server.c (pass_signals, handle_general_set): New.
4037
        (handle_query): Mention QPassSignals for qSupported.
4038
        (main): Call handle_general_set.
4039
        * server.h (pass_signals, decode_address_to_semicolon): New.
4040
 
4041
2006-11-06  Daniel Jacobowitz  
4042
 
4043
        * server.c (handle_query): Correct error handling for read_auxv.
4044
 
4045
2005-10-19  Ulrich Weigand  
4046
 
4047
        * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
4048
        and srv_linux_thread_db to yes.
4049
        * linux-s390-low.c (s390_fill_gregset): New function.
4050
        (target_regsets): Define data structure.
4051
 
4052
2006-10-17  Daniel Jacobowitz  
4053
 
4054
        * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
4055
        * configure.ac: Use it.  Define HAVE_TD_THR_TLS_GET_ADDR.
4056
        * config.in, configure: Regenerated.
4057
        * inferiors.c (gdb_id_to_thread): New function.
4058
        (gdb_id_to_thread_id): Use it.
4059
        * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
4060
        * linux-low.h (struct process_info): Add th member.
4061
        (thread_db_get_tls_address): New prototype.
4062
        * remote-utils.c (decode_address): Make non-static.
4063
        * server.c (handle_query): Handle qGetTLSAddr.
4064
        * server.h (gdb_id_to_thread, decode_address): New prototypes.
4065
        * target.h (struct target_ops): Add get_tls_address.
4066
        * thread-db.c (maybe_attach_thread): Save the thread handle.
4067
        (thread_db_get_tls_address): New.
4068
 
4069
2006-09-28  Daniel Jacobowitz  
4070
 
4071
        * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
4072
        (linux_resume_one_process): Take a siginfo_t *.  Update all
4073
        callers.  Queue it if necessary.  Use PTRACE_SETSIGINFO.
4074
        (struct pending_signals): Add a siginfo_t.
4075
        (linux_wait_for_process): Always set last_status.
4076
        (linux_wait_for_event): Use PTRACE_GETSIGINFO.
4077
        (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
4078
        * linux-low.h (struct process_info): Add last_status.
4079
 
4080
2006-09-21  Daniel Jacobowitz  
4081
 
4082
        * remote-utils.c (try_rle): New function.
4083
        (putpkt_binary): Use it.
4084
 
4085
2006-08-19  Daniel Jacobowitz  
4086
 
4087
        * Makefile.in (clean): Clean reg-x86-64-linux.c.
4088
        (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
4089
        * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
4090
        * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
4091
        (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
4092
        point registers.
4093
 
4094
2006-08-08  Richard Sandiford  
4095
 
4096
        * server.c (terminal_fd): New variable.
4097
        (old_foreground_pgrp): Likewise.
4098
        (restore_old_foreground_pgrp): New function.
4099
        (start_inferior): Record the terminal file descriptor in terminal_fd
4100
        and its original foreground group in old_foreground_pgrp.  Register
4101
        restore_old_foreground_pgrp with atexit().
4102
 
4103
2006-07-26  Daniel Jacobowitz  
4104
 
4105
        * server.c (handle_query): Correct qPart to qXfer.
4106
 
4107
2006-07-22  Daniel Jacobowitz  
4108
 
4109
        * configure.ac: Check for more headers which are missing on
4110
        Windows.  Automatically supply -lwsock32 and USE_WIN32API.
4111
        * configure.srv: Add Cygwin and mingw32.
4112
        * remote-utils.c: Don't include headers unconditionally which
4113
        are missing on mingw32.  Include  for mingw32.
4114
        (remote_open): Adjust for mingw32 support.  Flush
4115
        standard error after writing to it.
4116
        (remote_close, putpkt_binary, input_interrupt, block_async_io)
4117
        (unblock_async_io, enable_async_io, disable_async_io)
4118
        (readchar, getpkt): Update for Winsock support.
4119
        (prepare_resume_reply): Expect a protocol signal number.
4120
        * server.c: Disable  on mingw32.
4121
        (start_inferior): Adjust for mingw32 support.  Flush
4122
        standard error after writing to it.
4123
        (attach_inferior): Likewise.  Use protocol signal
4124
        numbers.
4125
        (main): Skip 'D' packet on mingw32.  Use protocol signal numbers
4126
        and names.
4127
        * win32-i386-low.c: New file.
4128
        * Makefile.in (XM_CLIBS): Set.
4129
        (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
4130
        (win32-i386-low.o): New dependency rule.
4131
        * linux-low.c (linux_wait): Use target signal numbers.
4132
        * target.h (struct target_ops): Doc fix.
4133
        * server.h (target_signal_to_name): New prototype.
4134
        * gdbreplay.c: Don't include headers unconditionally which
4135
        are missing on mingw32.  Include  for mingw32.
4136
        (remote_close, remote_open): Adjust for Winsock support.
4137
        * configure, config.in: Regenerated.
4138
 
4139
2006-07-12  Daniel Jacobowitz  
4140
 
4141
        * server.c (decode_xfer_read, write_qxfer_response): New.
4142
        (handle_query): Take a packet length argument.  Handle
4143
        qXfer:auxv:read instead of qPart:auxv:read.  Mention it in
4144
        the qSupported response.
4145
        (main): Update call to handle_query.
4146
 
4147
2006-06-22  Daniel Jacobowitz  
4148
 
4149
        * remote-utils.c (remote_escape_output, remote_unescape_input): New.
4150
        (putpkt_binary): Renamed from putpkt and adjusted for binary
4151
        data.
4152
        (putpkt): New wrapper for putpkt_binary.
4153
        (readchar): Don't mask off the high bit.
4154
        (decode_X_packet): New function.
4155
        * server.c (main): Call putpkt_binary if a handler sets the packet
4156
        length.  Save the length of the incoming packet.  Handle 'X'.
4157
        * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
4158
 
4159
2006-06-21  Daniel Jacobowitz  
4160
 
4161
        * server.c (handle_query): Handle qSupported.
4162
 
4163
2006-05-30  Daniel Jacobowitz  
4164
 
4165
        * remote-utils.c (all_symbols_looked_up): New variable.
4166
        (look_up_one_symbol): Check it.
4167
        * server.h (look_up_one_symbol): New declaration.
4168
        * thread-db.c (thread_db_init): Set all_symbols_looked_up.
4169
 
4170
2006-05-30  Daniel Jacobowitz  
4171
 
4172
        * Makefile.in (linux-arm-low.o): Update dependencies.
4173
        * linux-arm-low.c: Include "gdb_proc_service.h".
4174
        (PTRACE_GET_THREAD_AREA): Define.
4175
        (ps_get_thread_area): New function.
4176
 
4177
2006-05-09  Nathan Sidwell  
4178
 
4179
        * configure.srv (m68k*-*-uclinux*): New target.
4180
        * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
4181
        (linux_resume_one_process): Remove extraneous cast.
4182
        (linux_read_offsets): New.
4183
        (linux_target_op): Add linux_read_offsets on mmuless systems.
4184
        * server.c (handle_query): Add qOffsets logic.
4185
        * target.h (struct target_ops): Add read_offsets.
4186
 
4187
2006-03-15  Daniel Jacobowitz  
4188
 
4189
        * linux-mips-low.c: Include  and "gdb_proc_service.h".
4190
        (PTRACE_GET_THREAD_AREA): Define.
4191
        (ps_get_thread_area): New function.
4192
        * Makefile.in (linux-i386-low.o, linux-mips-low.o)
4193
        (linux-x86-64-low.o): Update.
4194
 
4195
2006-03-15  Daniel Jacobowitz  
4196
 
4197
        * configure.ac: Remove checks for prfpregset_t.
4198
        * gdb_proc_service.h: New file.
4199
        * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
4200
        new "gdb_proc_service.h".
4201
        * proc-service.c: Likewise.
4202
        (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
4203
        (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
4204
        * Makefile.in (gdb_proc_service_h): Updated.
4205
        * configure, config.in: Regenerated.
4206
 
4207
2006-03-03  Daniel Jacobowitz  
4208
 
4209
        * remote-utils.c (prepare_resume_reply): Move declaration
4210
        of gdb_id_from_wait to the top of the block.
4211
 
4212
2006-02-15  Daniel Jacobowitz  
4213
 
4214
        * linux-low.c (regsets_store_inferior_registers): Read the regset
4215
        from the target before filling it.
4216
 
4217
2006-02-08  Daniel Jacobowitz  
4218
 
4219
        * server.c (attach_inferior): Return SIGTRAP for a successful
4220
        attach.
4221
 
4222
2006-02-01  Daniel Jacobowitz  
4223
 
4224
        * Makefile.in (OBS): Add version.o.
4225
        (STAGESTUFF): Delete.
4226
        (version.o): Add dependencies.
4227
        (version.c): Replace rule.
4228
        (clean): Remove version.c.
4229
        * server.c (gdbserver_version): New.
4230
        (gdbserver_usage): Use printf.
4231
        (main): Handle --version and --help.
4232
        * server.h (version, host_name): Add declarations.
4233
 
4234
2005-12-23  Eli Zaretskii  
4235
 
4236
        * linux-arm-low.c:
4237
        * linux-arm-low.c:
4238
        * inferiors.c:
4239
        * i387-fp.h:
4240
        * i387-fp.c:
4241
        * gdbreplay.c:
4242
        * regcache.c:
4243
        * proc-service.c:
4244
        * mem-break.h:
4245
        * mem-break.c:
4246
        * linux-x86-64-low.c:
4247
        * linux-sh-low.c:
4248
        * linux-s390-low.c:
4249
        * linux-ppc64-low.c:
4250
        * linux-ppc-low.c:
4251
        * linux-mips-low.c:
4252
        * linux-m68k-low.c:
4253
        * linux-m32r-low.c:
4254
        * linux-low.h:
4255
        * linux-low.c:
4256
        * linux-ia64-low.c:
4257
        * linux-i386-low.c:
4258
        * linux-crisv32-low.c:
4259
        * thread-db.c:
4260
        * terminal.h:
4261
        * target.h:
4262
        * target.c:
4263
        * server.h:
4264
        * server.c:
4265
        * remote-utils.c:
4266
        * regcache.h:
4267
        * utils.c:
4268
        * Makefile.in:
4269
        * configure.ac:
4270
        * gdbserver.1: Add (C) after Copyright.  Update the FSF
4271
        address.
4272
 
4273
2005-11-13  Daniel Jacobowitz  
4274
 
4275
        * linux-arm-low.c (arm_eabi_breakpoint): New variable.
4276
        (arm_breakpoint_at): Recognize both breakpoints.
4277
        (the_low_target): Use the correct breakpoint instruction.
4278
 
4279
2005-11-02  Daniel Jacobowitz  
4280
 
4281
        * configure.srv (x86_64-*-linux*): Turn on thread_db support.
4282
        * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
4283
        (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
4284
        (the_low_target): Update.
4285
 
4286
2005-10-25  Andreas Schwab  
4287
 
4288
        * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
4289
 
4290
        * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
4291
        (ia64_num_regs): Reduce to 462.
4292
 
4293
2005-09-17  Daniel Jacobowitz  
4294
 
4295
        * acinclude.m4: Correct quoting.
4296
        * aclocal.m4: Regenerated.
4297
 
4298
        Suggested by SZOKOVACS Robert :
4299
        * thread-db.c (thread_db_err_str): Handle TD_VERSION.
4300
        (thread_db_init): Call thread_db_err_str.
4301
        * configure.ac: Check for TD_VERSION.
4302
        * config.in, configure: Regenerated.
4303
 
4304
2005-07-31  Kaveh R. Ghazi  
4305
 
4306
        * server.h (error, fatal, warning): Add ATTR_FORMAT.
4307
 
4308
2005-07-13  Daniel Jacobowitz  
4309
 
4310
        * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
4311
        is not available.  Define HAVE_PTRACE_GETREGS if it is.
4312
        * config.in, configure: Regenerated.
4313
        * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
4314
        * linux-i386-low.c, linux-m68k-low.c: Update to use
4315
        HAVE_PTRACE_GETREGS.
4316
        * linux-low.c (regsets_fetch_inferior_registers)
4317
        (regsets_store_inferior_registers): Only return 0 if we processed
4318
        GENERAL_REGS.
4319
        * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
4320
        * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
4321
 
4322
2005-07-13  Daniel Jacobowitz  
4323
 
4324
        * inferiors.c (struct thread_info): Add gdb_id.
4325
        (add_thread): Add gdb_id argument.
4326
        (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
4327
        * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
4328
        calls to add_thread.
4329
        * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
4330
        * server.c (handle_query): Use thread_to_gdb_id.
4331
        (handle_v_cont, main): Use gdb_id_to_thread_id.
4332
        * server.h (add_thread): Update prototype.
4333
        (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
4334
        prototypes.
4335
 
4336
2005-07-13  Daniel Jacobowitz  
4337
 
4338
        * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
4339
        left-padded registers.
4340
        * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
4341
        * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
4342
 
4343
2005-07-01  Steve Ellcey  
4344
 
4345
        * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
4346
        * configure: Regenerate.
4347
        * config.in: Regenerate.
4348
        * server.h (NEED_DECLARATION_STRERROR):
4349
        Replace with !HAVE_DECL_STRERROR.
4350
 
4351
2005-06-16  Daniel Jacobowitz  
4352
 
4353
        * linux-low.c (linux_wait, linux_send_signal): Don't test
4354
        an unsigned long variable for > 0 if it could be MAX_ULONG.
4355
        * server.c (myresume): Likewise.
4356
        * target.c (set_desired_inferior): Likewise.
4357
 
4358
2005-06-13  Mark Kettenis  
4359
 
4360
        * configure.ac: Simplify and improve check for socklen_t.
4361
        * configure, config.in: Regenerate.
4362
 
4363
2005-06-12  Daniel Jacobowitz  
4364
 
4365
        * acconfig.h: Remove.
4366
        * configure.ac: Add a test for socklen_t.  Use three-argument
4367
        AC_DEFINE throughout.
4368
        * config.in: Regenerated using autoheader 2.59.
4369
        * configure: Regenerated.
4370
 
4371
        * gdbreplay.c (socklen_t): Provide a default.
4372
        (remote_open): Use socklen_t.
4373
        * remote-utils.c (socklen_t): Provide a default.
4374
        (remote_open): Use socklen_t.
4375
        (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
4376
        unsigned char.
4377
 
4378
        * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
4379
        char for buffers.
4380
        * linux-low.c (linux_read_memory, linux_write_memory)
4381
        (linux_read_auxv): Likewise.
4382
        * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
4383
        (check_mem_write): Likewise.
4384
        * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
4385
        Likewise.
4386
        * regcache.c (struct inferior_rgcache_data, registers_to_string)
4387
        (registers_from_string, register_data): Likewise.
4388
        * server.c (handle_query, main): Likewise.
4389
        * server.h (convert_ascii_to_int, convert_int_to_ascii)
4390
        (decode_M_packet): Likewise.
4391
        * target.c (read_inferior_memory, write_inferior_memory): Likewise.
4392
        * target.h (struct target_ops): Update read_memory, write_memory,
4393
        and read_auxv.
4394
        (read_inferior_memory, write_inferior_memory): Update.
4395
        * linux-low.h (struct linux_target_ops): Change type of breakpoint
4396
        to unsigned char *.
4397
        * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
4398
        linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
4399
        linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
4400
        linux-s390-low.c, linux-sh-low.c: Update for changes in
4401
        read_inferior_memory and the_low_target->breakpoint.
4402
 
4403
2005-05-28  Daniel Jacobowitz  
4404
 
4405
        * Makefile.in (SFILES): Add linux-ppc64-low.c.
4406
        (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
4407
        * configure.srv: Add powerpc64-*-linux*.
4408
        * linux-ppc64-low.c: New file.
4409
 
4410
2005-05-23  Orjan Friberg  
4411
 
4412
        * linux-cris-low.c: New file with support for CRIS.
4413
        * linux-crisv32-low.c: Ditto for CRISv32.
4414
        * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
4415
        (clean): Add reg-cris.c and reg-crisv32.c.
4416
        Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
4417
        reg-crisv32.o, and reg-crisv32.c to make rules.
4418
        * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
4419
        recognized targets.
4420
 
4421
2005-05-16  Ulrich Weigand  
4422
 
4423
        * linux-low.c (fetch_register): Ensure buffer size is a multiple
4424
        of sizeof (PTRACE_XFER_TYPE).
4425
        (usr_store_inferior_registers): Likewise.  Zero out excess bytes.
4426
 
4427
2005-05-12  Orjan Friberg  
4428
 
4429
        * target.h (struct target_ops): Add insert_watchpoint,
4430
        remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
4431
        pointers for hardware watchpoint support.
4432
        * linux-low.h (struct linux_target_ops): Ditto.
4433
        * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
4434
        (linux_stopped_by_watchpoint, linux_stopped_data_address): New.  Add
4435
        to linux_target_ops.
4436
        * remote-utils.c (prepare_resume_reply): Add watchpoint information to
4437
        reply packet.
4438
        * server.c (main): Recognize 'Z' and 'z' packets.
4439
 
4440
2005-05-10  Ulrich Weigand  
4441
 
4442
        * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
4443
        (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
4444
        (the_low_target): Add new members.
4445
 
4446
2005-05-04  Daniel Jacobowitz  
4447
 
4448
        * proc-service.c (ps_lgetregs): Search all_processes instead of
4449
        all_threads.
4450
 
4451
2005-05-04  Daniel Jacobowitz  
4452
 
4453
        * server.c (start_inferior): Change return type to int.
4454
        (attach_inferior): Change sigptr to int *.
4455
        (handle_v_cont, handle_v_requests): Change signal to int *.
4456
        (main): Change signal to int.
4457
 
4458
2005-04-15  Kei Sakamoto  
4459
 
4460
        * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
4461
        * configure.srv: Add m32r*-*-linux*.
4462
        * linux-m32r-low.c: New file.
4463
 
4464
2005-03-04  Daniel Jacobowitz  
4465
 
4466
        * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
4467
 
4468
2005-03-03  Daniel Jacobowitz  
4469
 
4470
        * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
4471
        Take unsigned long arguments for PIDs.
4472
        * linux-low.c (add_process, linux_attach_lwp, linux_attach)
4473
        (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
4474
        (wait_for_sigstop, linux_resume_one_process)
4475
        (regsets_fetch_inferior_registers, linux_send_signal)
4476
        (linux_read_auxv): Likewise.  Update the types of variables holding
4477
        PIDs.  Update format string specifiers.
4478
        * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
4479
        * remote-utils.c (prepare_resume_reply): Likewise.
4480
        * server.c (cont_thread, general_thread, step_thread)
4481
        (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
4482
        unsigned long.
4483
        (handle_query): Update format specifiers.
4484
        (handle_v_cont, main): Use strtoul for thread IDs.
4485
        * server.h (struct inferior_list_entry): Use unsigned long for ID.
4486
        (add_thread, find_inferior_id, change_inferior_id, cont_thread)
4487
        (general_thread, step_thread, thread_from_wait)
4488
        (old_thread_from_wait): Update.
4489
        * target.h (struct thread_resume): Use unsigned long for THREAD.
4490
        (struct target_ops): Use unsigned long for arguments to attach and
4491
        thread_alive.
4492
 
4493
2005-02-24  Daniel Jacobowitz  
4494
 
4495
        * acinclude.m4: Include bfd/bfd.m4 directly.
4496
        * configure.ac: Use AC_ARG_PROGRAM.  Suggested by Aron Griffis
4497
        .
4498
        * aclocal.m4, configure: Regenerated.
4499
 
4500
2005-01-07  Andrew Cagney  
4501
 
4502
        * configure.ac: Rename configure.in, require autoconf 2.59.
4503
        * configure: Re-generate.
4504
 
4505
2004-12-08  Daniel Jacobowitz  
4506
 
4507
        * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area.  Reset
4508
        LIBS when finished.
4509
        * aclocal.m4: Regenerated.
4510
        * configure: Regenerated.
4511
 
4512
2004-11-21  Andreas Schwab  
4513
 
4514
        * linux-m68k-low.c (m68k_num_gregs): Define.
4515
        (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
4516
        (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
4517
        (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
4518
        (m68k_breakpoint_at): New.  Add to the_low_target.
4519
 
4520
        * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
4521
        srv_linux_thread_db to yes.
4522
 
4523
2004-10-20  Joel Brobecker  
4524
 
4525
        * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
4526
        (ARCH_SET_FS): Likewise.
4527
        (ARCH_GET_FS): Likewise.
4528
        (ARCH_GET_GS): Likewise.
4529
 
4530
2004-10-16  Daniel Jacobowitz  
4531
 
4532
        * linux-i386-low.c (ps_get_thread_area): New.
4533
        * linux-x86-64-low.c (ps_get_thread_area): New.
4534
        * linux-low.c: Include .
4535
        (linux_kill_one_process): Don't kill the first thread here.
4536
        (linux_kill): Kill the first thread here.
4537
        (kill_lwp): New function.
4538
        (send_sigstop, linux_send_signal): Use it.
4539
        * proc-service.c: Clean up #ifdefs.
4540
        (fpregset_info): Delete.
4541
        (ps_lgetregs): Update and enable implementation.
4542
        (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
4543
        implementations.
4544
        * remote-utils.c (struct sym_cache, symbol_cache): New.
4545
        (input_interrupt): Print a clearer message.
4546
        (async_io_enabled): New variable.
4547
        (enable_async_io, disable_async_io): Use it.  Update comments.
4548
        (look_up_one_symbol): Use the symbol cache.
4549
        * thread-db.c (thread_db_look_up_symbols): New function.
4550
        (thread_db_init): Update comments.  Call thread_db_look_up_symbols.
4551
 
4552
2004-10-16  Daniel Jacobowitz  
4553
 
4554
        * configure.in: Test for -rdynamic.
4555
        * configure: Regenerated.
4556
        * Makefile (INTERNAL_LDFLAGS): New.
4557
        (gdbserver, gdbreplay): Use it.
4558
 
4559
2004-09-02  Andrew Cagney  
4560
 
4561
        * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
4562
 
4563
2004-03-23  Daniel Jacobowitz  
4564
 
4565
        * linux-low.c (linux_wait): Clear all_processes list also.
4566
 
4567
2004-03-12  Daniel Jacobowitz  
4568
 
4569
        * linux-low.c: Include .  Remove extern declaration of
4570
        errno.
4571
 
4572
2004-03-12  Daniel Jacobowitz  
4573
 
4574
        * gdbreplay.c, server.h, utils.c: Update copyright years.
4575
 
4576
2004-03-04  Nathan J. Williams  
4577
 
4578
        * server.c (main): Print child status or termination signal from
4579
        variable 'signal', not 'sig'.
4580
 
4581
2004-03-04  Nathan J. Williams  
4582
 
4583
        * linux-low.c (linux_read_memory): Change return type to
4584
        int.  Check for and return error from ptrace().
4585
        * target.c (read_inferior_memory): Change return type to int.  Pass
4586
        back return status from the_target->read_memory().
4587
        * target.h (struct target_ops): Adapt *read_memory() prototype.
4588
        Update comment.
4589
        (read_inferior_memory): Adapt prototype.
4590
        * server.c (main): Return an error packet if
4591
        read_inferior_memory() returns an error.
4592
 
4593
2004-03-04  Daniel Jacobowitz  
4594
 
4595
        * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
4596
        Unify with other clean targets.
4597
 
4598
2004-02-29  Daniel Jacobowitz  
4599
 
4600
        * server.c (handle_v_cont): Call set_desired_inferior.
4601
 
4602
2004-02-29  Daniel Jacobowitz  
4603
 
4604
        * remote-utils.c (prepare_resume_reply): Always supply "thread:".
4605
 
4606
2004-02-29  Daniel Jacobowitz  
4607
 
4608
        * linux-low.c (linux_wait): Unblock async I/O.
4609
        (linux_resume): Block and enable async I/O.
4610
        * remote-utils.c (block_async_io, unblock_async_io): New functions.
4611
        * server.h (block_async_io, unblock_async_io): Add prototypes.
4612
 
4613
2004-02-29  Daniel Jacobowitz  
4614
 
4615
        * remote-utils.c (remote_open): Print a status notice after
4616
        opening a TCP port.
4617
        * server.c (attach_inferior): Print a status notice after
4618
        attaching.
4619
 
4620
2004-02-29  Daniel Jacobowitz  
4621
 
4622
        * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
4623
 
4624
2004-02-26  Daniel Jacobowitz  
4625
 
4626
        * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
4627
        error packet.
4628
        * server.c, target.h: Update copyright years.
4629
 
4630
2004-02-25  Roland McGrath  
4631
 
4632
        * target.h (struct target_ops): New member `read_auxv'.
4633
        * server.c (handle_query): Handle qPart:auxv:read: query using that.
4634
        * linux-low.c (linux_read_auxv): New function.
4635
        (linux_target_ops): Initialize `read_auxv' member to that.
4636
 
4637
2004-02-17  Ulrich Weigand 
4638
 
4639
        Committed by Jim Blandy  .
4640
 
4641
        * linux-s390-low.c (s390_num_regs): Update.
4642
        (s390_regmap): Remove control registers.  Use __s390x__ predefine
4643
        instead of GPR_SIZE to distiguish s390 and s390x targets.
4644
 
4645
2004-01-31  Daniel Jacobowitz  
4646
 
4647
        * linux-low.c: Update copyright year.
4648
        (check_removed_breakpoint): Clear pending_is_breakpoint.
4649
        (linux_set_resume_request, linux_queue_one_thread)
4650
        (resume_status_pending_p): New functions.
4651
        (linux_continue_one_thread): Use process->resume.
4652
        (linux_resume): Only resume threads if there are no pending events.
4653
        * linux-low.h (struct process_info): Add resume request
4654
        pointer.
4655
 
4656
2004-01-30  Daniel Jacobowitz  
4657
 
4658
        * regcache.c (new_register_cache): Clear the allocated register
4659
        buffer.  Suggested by Atsushi Nemoto .
4660
 
4661
2003-10-13  Daniel Jacobowitz  
4662
 
4663
        * linux-low.c (linux_resume): Take a struct thread_resume *
4664
        argument.
4665
        (linux_wait): Update call.
4666
        (resume_ptr): New static variable.
4667
        (linux_continue_one_thread): Renamed from
4668
        linux_continue_one_process.  Use resume_ptr.
4669
        (linux_resume): Use linux_continue_one_thread.
4670
        * server.c (handle_v_cont, handle_v_requests): New functions.
4671
        (myresume): New function.
4672
        (main): Handle 'v' case.
4673
        * target.h (struct thread_resume): New type.
4674
        (struct target_ops): Change argument of "resume" to struct
4675
        thread_resume *.
4676
        (myresume): Delete macro.
4677
 
4678
2003-08-08  H.J. Lu  
4679
 
4680
        * Makefile.in (install-only): Create dest dir. Support DESTDIR.
4681
        (uninstall): Support DESTDIR.
4682
 
4683
Mon Jul 21 20:09:34 UTC 2003  Brendan Conoboy  
4684
 
4685
        * configure.srv: Add xscale*linux copy of arm*linux entry.
4686
 
4687
2003-07-24  Daniel Jacobowitz  
4688
 
4689
        * linux-arm-low.c (arm_reinsert_addr): New function.
4690
        (the_low_target): Add arm_reinsert_addr.
4691
 
4692
2003-07-08  Mark Kettenis  
4693
 
4694
        * mem-break.c: Remove whitespace at end of file.
4695
 
4696
2003-06-28  Daniel Jacobowitz  
4697
 
4698
        * configure.in: Check whether we need to prototype strerror.
4699
        * server.h: Optionally prototype strerror.
4700
        * gdbreplay.c (perror_with_name): Use strerror.
4701
        * linux-low.c (linux_attach_lwp): Use strerror.
4702
        * utils.c (perror_with_name): Use strerror.
4703
        * config.in, configure: Regenerated.
4704
 
4705
2003-06-28  Daniel Jacobowitz  
4706
 
4707
        * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
4708
        SUGIOKA Toshinobu .
4709
 
4710
2003-06-20  Daniel Jacobowitz  
4711
 
4712
        * Makefile.in (SFILES): Update.
4713
        * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
4714
        low-sun3.c: Remove files.
4715
 
4716
2003-06-17  Daniel Jacobowitz  
4717
 
4718
        * linux-low.c: Move comment to linux_thread_alive where it belonged.
4719
        (linux_detach_one_process, linux_detach): New functions.
4720
        (linux_target_ops): Add linux_detach.
4721
        * server.c (main): Handle 'D' packet.
4722
        * target.h (struct target_ops): Add "detach" member.
4723
        (detach_inferior): Define.
4724
 
4725
2003-06-13  Mark Kettenis  
4726
 
4727
        From Kelley Cook  :
4728
        * configure.srv: Accept i[34567]86 variants.
4729
 
4730
2003-06-05  Daniel Jacobowitz  
4731
 
4732
        * linux-low.c (linux_wait_for_event): Correct comment typos.
4733
        (linux_resume_one_process): Call check_removed_breakpoint.
4734
        (linux_send_signal): New function.
4735
        (linux_target_ops): Add linux_send_signal.
4736
        * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
4737
        of kill.
4738
        * target.h (struct target_ops): Add send_signal.
4739
 
4740
2003-05-29  Jim Blandy  
4741
 
4742
        * linux-low.c (usr_store_inferior_registers): Transfer buf in
4743
        PTRACE_XFER_TYPE-sized chunks, not int-sized chunks.  Otherwise,
4744
        if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
4745
        away part of the register's value.
4746
 
4747
2003-03-26  Daniel Jacobowitz  
4748
 
4749
        * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
4750
        (linux_wait_for_event, linux_init_signals): Likewise.
4751
 
4752
2003-03-17  Daniel Jacobowitz  
4753
 
4754
        * configure.in: Check for stdlib.h.
4755
        * configure: Regenerated.
4756
        * config.in: Regenerated.
4757
 
4758
2003-01-04  Andreas Schwab  
4759
 
4760
        * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
4761
 
4762
2003-01-02  Andrew Cagney  
4763
 
4764
        * Makefile.in: Remove obsolete code.
4765
 
4766
2002-11-20  Daniel Jacobowitz  
4767
 
4768
        * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
4769
        defined(PT_FPR0_HI).
4770
 
4771
2002-11-17  Stuart Hughes  
4772
 
4773
        * linux-arm-low.c (arm_num_regs): Increase.
4774
        (arm_regmap): Include status register.
4775
 
4776
2002-11-17  Daniel Jacobowitz  
4777
 
4778
        * linux-low.c (register_addr): Remove incorrect -1 check.
4779
 
4780
2002-08-29  Daniel Jacobowitz  
4781
 
4782
        * linux-low.c (linux_create_inferior): Call setpgid.  Return
4783
        the new PID.
4784
        (unstopped_p, linux_signal_pid): Remove.
4785
        (linux_target_ops): Remove linux_signal_pid.
4786
        * remote-utils.c (putpkt, input_interrupt): Use signal_pid
4787
        global instead of target method.
4788
        * target.h (struct target_ops): Remove signal_pid.  Update comment
4789
        for create_inferior.
4790
        * server.c (signal_pid): New variable.
4791
        (create_inferior): Set signal_pid.  Block SIGTTOU and SIGTTIN in
4792
        gdbserver.  Set the child to be the foreground process group.
4793
        (attach_inferior): Set signal_pid.
4794
 
4795
2002-08-23  Daniel Jacobowitz  
4796
 
4797
        * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
4798
 
4799
2002-08-20  Jim Blandy  
4800
 
4801
        * Makefile.in (LDFLAGS): Allow the configure script to establish a
4802
        default for this.
4803
 
4804
2002-08-01  Andrew Cagney  
4805
 
4806
        * Makefile.in: Make chill references obsolete.
4807
 
4808
2002-07-24  Kevin Buettner  
4809
 
4810
        * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
4811
        * configure: Regenerate.
4812
        * config.in: Regenerate.
4813
 
4814
2002-07-09  David O'Brien  
4815
 
4816
        * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
4817
        (perror_with_name, remote_close, remote_open, expect, play): Static.
4818
 
4819
2002-07-04  Michal Ludvig  
4820
 
4821
        * linux-x86-64-low.c (x86_64_regmap): Make it an array of
4822
        byte offsets instead of an array of indexes.
4823
        (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
4824
 
4825
2002-06-13  Daniel Jacobowitz  
4826
 
4827
        * regcache.c: Add comment.
4828
 
4829
2002-06-11  Daniel Jacobowitz  
4830
 
4831
        * thread-db.c: New file.
4832
        * proc-service.c: New file.
4833
        * acinclude.m4: New file.
4834
        * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
4835
        proc-service.o, and thread-db.o.
4836
        (linux-low.o): Add USE_THREAD_DB.
4837
        * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
4838
        HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
4839
        * aclocal.m4: Regenerated.
4840
        * config.in: Regenerated.
4841
        * configure: Regenerated.
4842
        * configure.in: Check for proc_service.h, sys/procfs.h,
4843
        thread_db.h, and linux/elf.h headrs.
4844
        Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
4845
        PRFPREGSET_T_BROKEN.  Introduce srv_thread_depfiles and USE_THREAD_DB.
4846
        Check for -lthread_db and thread support.
4847
        * configure.srv: Enable thread_db support for ARM, i386, MIPS,
4848
        PowerPC, and SuperH.
4849
        * i387-fp.c: Constify arguments.
4850
        * i387-fp.h: Likewise.
4851
        * inferiors.c: (struct thread_info): Renamed from
4852
        `struct inferior_info'.  Remove PID member.  Use generic inferior
4853
        list header.  All uses updated.
4854
        (inferiors, signal_pid): Removed.
4855
        (all_threads): New variable.
4856
        (get_thread): Define.
4857
        (add_inferior_to_list): New function.
4858
        (for_each_inferior): New function.
4859
        (change_inferior_id): New function.
4860
        (add_inferior): Removed.
4861
        (remove_inferior): New function.
4862
        (add_thread): New function.
4863
        (free_one_thread): New function.
4864
        (remove_thread): New function.
4865
        (clear_inferiors): Use for_each_inferior and free_one_thread.
4866
        (find_inferior): New function.
4867
        (find_inferior_id): New function.
4868
        (inferior_target_data): Update argument type.
4869
        (set_inferior_target_data): Likewise.
4870
        (inferior_regcache_data): Likewise.
4871
        (set_inferior_regcache_data): Likewise.
4872
        * linux-low.c (linux_bp_reinsert): Remove.
4873
        (all_processes, stopping_threads, using_thrads)
4874
        (struct pending_signals, debug_threads, pid_of): New.
4875
        (inferior_pid): Replace with macro.
4876
        (struct inferior_linux_data): Remove.
4877
        (get_stop_pc, add_process): New functions.
4878
        (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
4879
        Use add_process and add_thread.
4880
        (linux_attach_lwp): New function, based on old linux_attach.  Use
4881
        add_process and add_thread.  Set stop_expected for new threads.
4882
        (linux_attach): New function.
4883
        (linux_kill_one_process): New function.
4884
        (linux_kill): Kill all LWPs.
4885
        (linux_thread_alive): Use find_inferior_id.
4886
        (check_removed_breakpoints, status_pending_p): New functions.
4887
        (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
4888
        Update.  Use WNOHANG.  Wait for cloned processes also.  Update process
4889
        struct for the found process.
4890
        (linux_wait_for_event): New function.
4891
        (linux_wait): Use it.  Support LWPs.
4892
        (send_sigstop, wait_for_sigstop, stop_all_processes)
4893
        (linux_resume_one_process, linux_continue_one_process): New functions.
4894
        (linux_resume): Support LWPs.
4895
        (REGISTER_RAW_SIZE): Remove.
4896
        (fetch_register): Use register_size instead.  Call supply_register.
4897
        (usr_store_inferior_registers): Likewise.  Call collect_register.
4898
        Fix recursive case.
4899
        (regsets_fetch_inferior_registers): Improve error message.
4900
        (regsets_store_inferior_registers): Add debugging.
4901
        (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
4902
        (unstopped_p, linux_signal_pid): New functions.
4903
        (linux_target_ops): Add linux_signal_pid.
4904
        (linux_init_signals): New function.
4905
        (initialize_low): Call it.  Initialize using_threads.
4906
        * regcache.c (inferior_regcache_data): Add valid
4907
        flag.
4908
        (get_regcache): Fetch registers lazily.  Add fetch argument
4909
        and update all callers.
4910
        (regcache_invalidate_one, regcache_invalidate): New
4911
        functions.
4912
        (new_register_cache): Renamed from create_register_cache.
4913
        Return the new regcache.
4914
        (free_register_cache): Change argument to a void *.
4915
        (registers_to_string, registers_from_string): Call get_regcache
4916
        with fetch flag set.
4917
        (register_data): Make static.  Pass fetch flag to get_regcache.
4918
        (supply_register): Call get_regcache with fetch flag clear.
4919
        (collect_register): Call get_regcache with fetch flag set.
4920
        (collect_register_as_string): New function.
4921
        * regcache.h: Update.
4922
        * remote-utils.c (putpkt): Flush after debug output and use
4923
        stderr.
4924
        Handle input interrupts while waiting for an ACK.
4925
        (input_interrupt): Use signal_pid method.
4926
        (getpkt): Flush after debug output and use stderr.
4927
        (outreg): Use collect_register_as_string.
4928
        (new_thread_notify, dead_thread_notify): New functions.
4929
        (prepare_resume_reply): Check using_threads.  Set thread_from_wait
4930
        and general_thread.
4931
        (look_up_one_symbol): Flush after debug output.
4932
        * server.c (step_thread, server_waiting): New variables.
4933
        (start_inferior): Don't use signal_pid.  Update call to mywait.
4934
        (attach_inferior): Update call to mywait.
4935
        (handle_query): Handle qfThreadInfo and qsThreadInfo.
4936
        (main): Don't fetch/store registers explicitly.  Use
4937
        set_desired_inferior.  Support proposed ``Hs'' packet.  Update
4938
        calls to mywait.
4939
        * server.h: Update.
4940
        (struct inferior_list, struct_inferior_list_entry): New.
4941
        * target.c (set_desired_inferior): New.
4942
        (write_inferior_memory): Constify.
4943
        (mywait): New function.
4944
        * target.h: Update.
4945
        (struct target_ops): New signal_pid method.
4946
        (mywait): Removed macro, added prototype.
4947
 
4948
        * linux-low.h (regset_func): Removed.
4949
        (regset_fill_func, regset_store_func): New.
4950
        (enum regset_type): New.
4951
        (struct regset_info): Add type field.  Use new operation types.
4952
        (struct linux_target_ops): stop_pc renamed to get_pc.
4953
        Add decr_pc_after_break and breakpoint_at.
4954
        (get_process, get_thread_proess, get_process_thread)
4955
        (strut process_info, all_processes, linux_attach_lwp)
4956
        (thread_db_init): New.
4957
 
4958
        * linux-arm-low.c (arm_get_pc, arm_set_pc,
4959
        arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
4960
        (the_low_target): Add new members.
4961
        * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
4962
        (i386_store_fpxregset): Constify.
4963
        (target_regsets): Add new kind identifier.
4964
        (i386_get_pc): Renamed from i386_stop_pc.  Simplify.
4965
        (i386_set_pc): Add debugging.
4966
        (i386_breakpoint_at): New function.
4967
        (the_low_target): Add new members.
4968
        * linux-mips-low.c (mips_get_pc, mips_set_pc)
4969
        (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
4970
        (mips_breakpoint_at): New.
4971
        (the_low_target): Add new members.
4972
        * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
4973
        (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
4974
        (the_low_target): Add new members.
4975
        * linux-sh-low.c (sh_get_pc, sh_set_pc)
4976
        (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
4977
        (the_low_target): Add new members.
4978
        * linux-x86-64-low.c (target_regsets): Add new kind
4979
        identifier.
4980
 
4981
2002-05-15  Daniel Jacobowitz  
4982
 
4983
        From Martin Pool :
4984
        * server.c (gdbserver_usage): New function.
4985
        (main): Call it.
4986
 
4987
2002-05-14  Daniel Jacobowitz  
4988
 
4989
        * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
4990
        stop_at -> stop_pc.
4991
 
4992
2002-05-04  Andrew Cagney  
4993
 
4994
        * Makefile.in: Remove obsolete code.
4995
 
4996
2002-04-24  Michal Ludvig  
4997
 
4998
        * linux-low.c (regsets_fetch_inferior_registers),
4999
        (regsets_store_inferior_registers): Removed cast to int from
5000
        ptrace() calls.
5001
        * regcache.h: Added declaration of struct inferior_info.
5002
 
5003
2002-04-20  Daniel Jacobowitz  
5004
 
5005
        * inferiors.c (struct inferior_info): Add regcache_data.
5006
        (add_inferior): Call create_register_cache.
5007
        (clear_inferiors): Call free_register_cache.
5008
        (inferior_regcache_data, set_inferior_regcache_data): New functions.
5009
        * regcache.c (struct inferior_regcache_data): New.
5010
        (registers): Remove.
5011
        (get_regcache): New function.
5012
        (create_register_cache, free_register_cache): New functions.
5013
        (set_register_cache): Don't initialize the register cache here.
5014
        (registers_to_string, registers_from_string, register_data): Call
5015
        get_regcache.
5016
        * regcache.h: Add prototypes.
5017
        * server.h: Likewise.
5018
 
5019
2002-04-20  Daniel Jacobowitz  
5020
 
5021
        * mem-break.c: New file.
5022
        * mem-break.h: New file.
5023
        * Makefile.in: Add mem-break.o rule; update server.h
5024
        dependencies.
5025
        * inferiors.c (struct inferior_info): Add target_data
5026
        member.
5027
        (clear_inferiors): Free target_data member if set.
5028
        (inferior_target_data, set_inferior_target_data): New functions.
5029
        * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
5030
        (i386_stop_pc, i386_set_pc): New.  Add to the_low_target.
5031
        * linux-low.c (linux_bp_reinsert): New variable.
5032
        (struct inferior_linux_data): New.
5033
        (linux_create_inferior): Use set_inferior_target_data.
5034
        (linux_attach): Likewise.  Call add_inferior.
5035
        (linux_wait_for_one_inferior): New function.
5036
        (linux_wait): Call it.
5037
        (linux_write_memory): Add const.
5038
        (initialize_low): Call set_breakpoint_data.
5039
        * linux-low.h (struct linux_target_ops): Add breakpoint
5040
        handling members.
5041
        * server.c (attach_inferior): Remove extra add_inferior
5042
        call.
5043
        * server.h: Include mem-break.h.  Update inferior.c
5044
        prototypes.
5045
        * target.c (read_inferior_memory)
5046
        (write_inferior_memory): New functions.
5047
        * target.h (read_inferior_memory)
5048
        (write_inferior_memory): Change macros to prototypes.
5049
        (struct target_ops): Update comments.  Add const to write_memory
5050
        definition.
5051
 
5052
2002-04-11  Daniel Jacobowitz  
5053
 
5054
        * linux-low.c (usr_store_inferior_registers): Support
5055
        registers which are allowed to fail to store.
5056
        * linux-low.h (linux_target_ops): Likewise.
5057
        * linux-ppc-low.c (ppc_regmap): Support FPSCR.
5058
        (ppc_cannot_store_register): FPSCR may not be storable.
5059
 
5060
2002-04-09  Daniel Jacobowitz  
5061
 
5062
        * server.h: Include  if HAVE_STRING_H.
5063
        * ChangeLog: Correct paths in last ChangeLog entry.
5064
 
5065
2002-04-09  Daniel Jacobowitz  
5066
 
5067
        * linux-low.h: Remove obsolete prototypes.
5068
        (struct linux_target_ops): New.
5069
        (extern the_low_target): New.
5070
        * linux-low.c (num_regs, regmap): Remove declarations.
5071
        (register_addr): Use the_low_target explicitly.
5072
        (fetch_register): Likewise.
5073
        (usr_fetch_inferior_registers): Likewise.
5074
        (usr_store_inferior_registers): Likewise.
5075
        * linux-arm-low.c (num_regs): Remove.
5076
        (arm_num_regs): Define.
5077
        (arm_regmap): Renamed from regmap, made static.
5078
        (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
5079
        made static.
5080
        (arm_cannot_store_register): Renamed from cannot_store_register,
5081
        made static.
5082
        (the_low_target): New.
5083
        * linux-i386-low.c (num_regs): Remove.
5084
        (i386_num_regs): Define.
5085
        (i386_regmap): Renamed from regmap, made static.
5086
        (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
5087
        made static.
5088
        (i386_cannot_store_register): Renamed from cannot_store_register,
5089
        made static.
5090
        (the_low_target): New.
5091
        * linux-ia64-low.c (num_regs): Remove.
5092
        (ia64_num_regs): Define.
5093
        (ia64_regmap): Renamed from regmap, made static.
5094
        (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
5095
        made static.
5096
        (ia64_cannot_store_register): Renamed from cannot_store_register,
5097
        made static.
5098
        (the_low_target): New.
5099
        * linux-m68k-low.c (num_regs): Remove.
5100
        (m68k_num_regs): Define.
5101
        (m68k_regmap): Renamed from regmap, made static.
5102
        (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
5103
        made static.
5104
        (m68k_cannot_store_register): Renamed from cannot_store_register,
5105
        made static.
5106
        (the_low_target): New.
5107
        * linux-mips-low.c (num_regs): Remove.
5108
        (mips_num_regs): Define.
5109
        (mips_regmap): Renamed from regmap, made static.
5110
        (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
5111
        made static.
5112
        (mips_cannot_store_register): Renamed from cannot_store_register,
5113
        made static.
5114
        (the_low_target): New.
5115
        * linux-ppc-low.c (num_regs): Remove.
5116
        (ppc_num_regs): Define.
5117
        (ppc_regmap): Renamed from regmap, made static.
5118
        (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
5119
        made static.
5120
        (ppc_cannot_store_register): Renamed from cannot_store_register,
5121
        made static.
5122
        (the_low_target): New.
5123
        * linux-s390-low.c (num_regs): Remove.
5124
        (s390_num_regs): Define.
5125
        (s390_regmap): Renamed from regmap, made static.
5126
        (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
5127
        made static.
5128
        (s390_cannot_store_register): Renamed from cannot_store_register,
5129
        made static.
5130
        (the_low_target): New.
5131
        * linux-sh-low.c (num_regs): Remove.
5132
        (sh_num_regs): Define.
5133
        (sh_regmap): Renamed from regmap, made static.
5134
        (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
5135
        made static.
5136
        (sh_cannot_store_register): Renamed from cannot_store_register,
5137
        made static.
5138
        (the_low_target): New.
5139
        * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
5140
        (the_low_target): New.
5141
 
5142
2002-04-09  Daniel Jacobowitz  
5143
 
5144
        * Makefile.in: Add stamp-h target.
5145
        * configure.in: Create stamp-h.
5146
        * configure: Regenerated.
5147
 
5148
2002-04-09  Daniel Jacobowitz  
5149
 
5150
        * inferiors.c: New file.
5151
        * target.c: New file.
5152
        * target.h: New file.
5153
        * Makefile.in:  Add target.o and inferiors.o.  Update
5154
        dependencies.
5155
        * linux-low.c (inferior_pid): New static variable,
5156
        moved from server.c.
5157
        (linux_create_inferior): Renamed from create_inferior.
5158
        Call add_inferior.  Return 0 on success instead of a PID.
5159
        (linux_attach): Renamed from myattach.
5160
        (linux_kill): Renamed from kill_inferior.  Call clear_inferiors ().
5161
        (linux_thread_alive): Renamed from mythread_alive.
5162
        (linux_wait): Renamed from mywait.  Call clear_inferiors () if the
5163
        child dies.
5164
        (linux_resume): Renamed from myresume.  Add missing ``return 0''.
5165
        (regsets_store_inferior_registers): Correct error message.
5166
        Add missing ``return 0''.
5167
        (linux_fetch_registers): Renamed from fetch_inferior_registers.
5168
        (linux_store_registers): Renamed from store_inferior_registers.
5169
        (linux_read_memory): Renamed from read_inferior_memory.
5170
        (linux_write_memory): Renamed from write_inferior_memory.
5171
        (linux_target_ops): New structure.
5172
        (initialize_low): Call set_target_ops ().
5173
        * remote-utils.c (unhexify): New function.
5174
        (hexify): New function.
5175
        (input_interrupt): Send signals to ``signal_pid''.
5176
        * server.c (inferior_pid): Remove.
5177
        (start_inferior): Update create_inferior call.
5178
        (attach_inferior): Call add_inferior.
5179
        (handle_query): New function.
5180
        (main): Call handle_query for `q' packets.
5181
        * server.h: Include "target.h".  Remove obsolete prototypes.
5182
        Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
5183
 
5184
2002-04-09  Daniel Jacobowitz  
5185
 
5186
        * Makefile.in: Add WARN_CFLAGS.  Update configury
5187
        dependencies.
5188
        * configure.in: Check for 
5189
        * configure: Regenerate.
5190
        * config.in: Regenerate.
5191
        * gdbreplay.c: Include needed system headers.
5192
        (remote_open): Remove strchr prototype.
5193
        * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
5194
        * regcache.c (supply_register): Change buf argument to const void *.
5195
        (supply_register_by_name): Likewise.
5196
        (collect_register): Change buf argument to void *.
5197
        (collect_register_by_name): Likewise.
5198
        * regcache.h: Add missing prototypes.
5199
        * remote-utils.c: Include  for inet_ntoa.
5200
        * server.c (handle_query): New function.
5201
        (attached): New static variable, moved out of main.
5202
        (main): Quiet longjmp clobber warnings.
5203
        * server.h: Add ATTR_NORETURN and ATTR_FORMAT.  Update prototypes.
5204
        * utils.c (error): Remove NORETURN.
5205
        (fatal): Likewise.

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.