Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(137)

Side by Side Diff: gdb/exec.c

Issue 11969036: Merge GDB 7.5.1 (Closed) Base URL: http://git.chromium.org/native_client/nacl-gdb.git@master
Patch Set: Created 7 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « gdb/exceptions.c ('k') | gdb/expprint.c » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
None
OLDNEW
1 /* Work with executable files, for GDB. 1 /* Work with executable files, for GDB.
2 2
3 Copyright (C) 1988-2003, 2007-2012 Free Software Foundation, Inc. 3 Copyright (C) 1988-2003, 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 220 matching lines...) Expand 10 before | Expand all | Expand 10 after
231 } 231 }
232 #endif 232 #endif
233 if (scratch_chan < 0) 233 if (scratch_chan < 0)
234 perror_with_name (filename); 234 perror_with_name (filename);
235 exec_bfd = bfd_fopen (scratch_pathname, gnutarget, 235 exec_bfd = bfd_fopen (scratch_pathname, gnutarget,
236 write_files ? FOPEN_RUB : FOPEN_RB, 236 write_files ? FOPEN_RUB : FOPEN_RB,
237 scratch_chan); 237 scratch_chan);
238 238
239 if (!exec_bfd) 239 if (!exec_bfd)
240 { 240 {
241 close (scratch_chan);
242 error (_("\"%s\": could not open as an executable file: %s"), 241 error (_("\"%s\": could not open as an executable file: %s"),
243 scratch_pathname, bfd_errmsg (bfd_get_error ())); 242 scratch_pathname, bfd_errmsg (bfd_get_error ()));
244 } 243 }
245 244
246 /* At this point, scratch_pathname and exec_bfd->name both point to the 245 /* At this point, scratch_pathname and exec_bfd->name both point to the
247 same malloc'd string. However exec_close() will attempt to free it 246 same malloc'd string. However exec_close() will attempt to free it
248 via the exec_bfd->name pointer, so we need to make another copy and 247 via the exec_bfd->name pointer, so we need to make another copy and
249 leave exec_bfd as the new owner of the original copy. */ 248 leave exec_bfd as the new owner of the original copy. */
250 scratch_pathname = xstrdup (scratch_pathname); 249 scratch_pathname = xstrdup (scratch_pathname);
251 cleanups = make_cleanup (xfree, scratch_pathname); 250 cleanups = make_cleanup (xfree, scratch_pathname);
(...skipping 405 matching lines...) Expand 10 before | Expand all | Expand 10 after
657 if (writebuf) 656 if (writebuf)
658 res = bfd_set_section_contents (p->bfd, p->the_bfd_section, 657 res = bfd_set_section_contents (p->bfd, p->the_bfd_section,
659 writebuf, memaddr - p->addr, 658 writebuf, memaddr - p->addr,
660 len); 659 len);
661 else 660 else
662 res = bfd_get_section_contents (p->bfd, p->the_bfd_section, 661 res = bfd_get_section_contents (p->bfd, p->the_bfd_section,
663 readbuf, memaddr - p->addr, 662 readbuf, memaddr - p->addr,
664 len); 663 len);
665 return (res != 0) ? len : 0; 664 return (res != 0) ? len : 0;
666 } 665 }

error: old chunk mismatch

OLDNEW
« no previous file with comments | « gdb/exceptions.c ('k') | gdb/expprint.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698