| OLD | NEW |
| 1 /* Native-dependent code for FreeBSD. | 1 /* Native-dependent code for FreeBSD. |
| 2 | 2 |
| 3 Copyright (C) 2002-2004, 2007-2012 Free Software Foundation, Inc. | 3 Copyright (C) 2002-2004, 2007-2012 Free Software Foundation, Inc. |
| 4 | 4 |
| 5 This file is part of GDB. | 5 This file is part of GDB. |
| 6 | 6 |
| 7 This program is free software; you can redistribute it and/or modify | 7 This program is free software; you can redistribute it and/or modify |
| 8 it under the terms of the GNU General Public License as published by | 8 it under the terms of the GNU General Public License as published by |
| 9 the Free Software Foundation; either version 3 of the License, or | 9 the Free Software Foundation; either version 3 of the License, or |
| 10 (at your option) any later version. | 10 (at your option) any later version. |
| (...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 135 func (start, size, read, write, exec, obfd); | 135 func (start, size, read, write, exec, obfd); |
| 136 } | 136 } |
| 137 | 137 |
| 138 do_cleanups (cleanup); | 138 do_cleanups (cleanup); |
| 139 return 0; | 139 return 0; |
| 140 } | 140 } |
| 141 | 141 |
| 142 static int | 142 static int |
| 143 find_signalled_thread (struct thread_info *info, void *data) | 143 find_signalled_thread (struct thread_info *info, void *data) |
| 144 { | 144 { |
| 145 if (info->suspend.stop_signal != TARGET_SIGNAL_0 | 145 if (info->suspend.stop_signal != GDB_SIGNAL_0 |
| 146 && ptid_get_pid (info->ptid) == ptid_get_pid (inferior_ptid)) | 146 && ptid_get_pid (info->ptid) == ptid_get_pid (inferior_ptid)) |
| 147 return 1; | 147 return 1; |
| 148 | 148 |
| 149 return 0; | 149 return 0; |
| 150 } | 150 } |
| 151 | 151 |
| 152 static enum target_signal | 152 static enum gdb_signal |
| 153 find_stop_signal (void) | 153 find_stop_signal (void) |
| 154 { | 154 { |
| 155 struct thread_info *info = | 155 struct thread_info *info = |
| 156 iterate_over_threads (find_signalled_thread, NULL); | 156 iterate_over_threads (find_signalled_thread, NULL); |
| 157 | 157 |
| 158 if (info) | 158 if (info) |
| 159 return info->suspend.stop_signal; | 159 return info->suspend.stop_signal; |
| 160 else | 160 else |
| 161 return TARGET_SIGNAL_0; | 161 return GDB_SIGNAL_0; |
| 162 } | 162 } |
| 163 | 163 |
| 164 /* Create appropriate note sections for a corefile, returning them in | 164 /* Create appropriate note sections for a corefile, returning them in |
| 165 allocated memory. */ | 165 allocated memory. */ |
| 166 | 166 |
| 167 char * | 167 char * |
| 168 fbsd_make_corefile_notes (bfd *obfd, int *note_size) | 168 fbsd_make_corefile_notes (bfd *obfd, int *note_size) |
| 169 { | 169 { |
| 170 const struct regcache *regcache = get_current_regcache (); | 170 const struct regcache *regcache = get_current_regcache (); |
| 171 struct gdbarch *gdbarch = get_regcache_arch (regcache); | 171 struct gdbarch *gdbarch = get_regcache_arch (regcache); |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 208 psargs = reconcat (psargs, psargs, " ", get_inferior_args (), | 208 psargs = reconcat (psargs, psargs, " ", get_inferior_args (), |
| 209 (char *) NULL); | 209 (char *) NULL); |
| 210 | 210 |
| 211 note_data = elfcore_write_prpsinfo (obfd, note_data, note_size, | 211 note_data = elfcore_write_prpsinfo (obfd, note_data, note_size, |
| 212 fname, psargs); | 212 fname, psargs); |
| 213 } | 213 } |
| 214 | 214 |
| 215 make_cleanup (xfree, note_data); | 215 make_cleanup (xfree, note_data); |
| 216 return note_data; | 216 return note_data; |
| 217 } | 217 } |
| OLD | NEW |