X-Git-Url: http://drtracing.org/?a=blobdiff_plain;f=gas%2Flisting.c;h=bc6af712a0e798baa350fdf0988da36d6f1c6fa4;hb=69b8ea4abd8a894f62dade3c5bb50291c82f3e0d;hp=25178b363900086748f87779a54d7af52577244c;hpb=c2069bb2e371ac854fc2ac484406b28c998c4175;p=deliverable%2Fbinutils-gdb.git diff --git a/gas/listing.c b/gas/listing.c index 25178b3639..bc6af712a0 100644 --- a/gas/listing.c +++ b/gas/listing.c @@ -1,6 +1,6 @@ /* listing.c - maintain assembly listings Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, - 2001, 2002, 2003, 2005, 2006, 2007, 2008, 2009 + 2001, 2002, 2003, 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. This file is part of GAS, the GNU Assembler. @@ -347,10 +347,12 @@ listing_newline (char *ps) || is_end_of_line [(unsigned char) *copy] != 1); copy++) { - if (*copy == '\\') - seen_slash = ! seen_slash; - else if (*copy == '"' && seen_slash) - seen_quote = ! seen_quote; + if (seen_slash) + seen_slash = 0; + else if (*copy == '\\') + seen_slash = 1; + else if (*copy == '"') + seen_quote = !seen_quote; } len = copy - input_line_pointer + 1; @@ -1043,11 +1045,11 @@ print_source (file_info_type * current_file, while (current_file->linenum < list->hll_line && !current_file->at_end) { - cached_line * cache = cached_lines + next_free_line; char *p; + cache = cached_lines + next_free_line; cache->file = current_file; - cache->line = current_file->linenum; + cache->line = current_file->linenum + 1; cache->buffer[0] = 0; p = buffer_line (current_file, cache->buffer, width); @@ -1073,17 +1075,22 @@ print_source (file_info_type * current_file, static int debugging_pseudo (list_info_type *list, const char *line) { +#ifdef OBJ_ELF static int in_debug; int was_debug; +#endif if (list->debugging) { +#ifdef OBJ_ELF in_debug = 1; +#endif return 1; } - +#ifdef OBJ_ELF was_debug = in_debug; in_debug = 0; +#endif while (ISSPACE (*line)) line++; @@ -1144,7 +1151,6 @@ listing_listing (char *name ATTRIBUTE_UNUSED) { list_info_type *list = head; file_info_type *current_hll_file = (file_info_type *) NULL; - char *message; char *buffer; char *p; int show_listing = 1; @@ -1209,8 +1215,6 @@ listing_listing (char *name ATTRIBUTE_UNUSED) { /* Scan down the list and print all the stuff which can be done with this line (or lines). */ - message = 0; - if (list->hll_file) current_hll_file = list->hll_file;