OLD | NEW |
1 /* Hardware ports. | 1 /* Hardware ports. |
2 Copyright (C) 1998, 2007-2012 Free Software Foundation, Inc. | 2 Copyright (C) 1998, 2007-2012 Free Software Foundation, Inc. |
3 Contributed by Andrew Cagney and Cygnus Solutions. | 3 Contributed by Andrew Cagney and Cygnus Solutions. |
4 | 4 |
5 This file is part of GDB, the GNU debugger. | 5 This file is part of GDB, the GNU debugger. |
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 268 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
279 } | 279 } |
280 } | 280 } |
281 } | 281 } |
282 else if (strcmp (port_name, ports->name) == 0) | 282 else if (strcmp (port_name, ports->name) == 0) |
283 return ports->number; | 283 return ports->number; |
284 } | 284 } |
285 ports++; | 285 ports++; |
286 } | 286 } |
287 } | 287 } |
288 } | 288 } |
289 hw_abort (me, "Unreconized port %s", port_name); | 289 hw_abort (me, "Unrecognized port %s", port_name); |
290 return 0; | 290 return 0; |
291 } | 291 } |
292 | 292 |
293 | 293 |
294 int | 294 int |
295 hw_port_encode (struct hw *me, | 295 hw_port_encode (struct hw *me, |
296 int port_number, | 296 int port_number, |
297 char *buf, | 297 char *buf, |
298 int sizeof_buf, | 298 int sizeof_buf, |
299 port_direction direction) | 299 port_direction direction) |
(...skipping 30 matching lines...) Expand all Loading... |
330 } | 330 } |
331 } | 331 } |
332 ports++; | 332 ports++; |
333 } | 333 } |
334 } | 334 } |
335 sprintf (buf, "%d", port_number); | 335 sprintf (buf, "%d", port_number); |
336 if (strlen (buf) >= sizeof_buf) | 336 if (strlen (buf) >= sizeof_buf) |
337 hw_abort (me, "hw_port_encode: buffer overflow"); | 337 hw_abort (me, "hw_port_encode: buffer overflow"); |
338 return strlen (buf); | 338 return strlen (buf); |
339 } | 339 } |
OLD | NEW |