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

Unified Diff: gdb/macrocmd.c

Issue 124383005: GDB 7.6.50 (Closed) Base URL: http://git.chromium.org/native_client/nacl-gdb.git@upstream
Patch Set: Created 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « gdb/machoread.c ('k') | gdb/macroexp.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gdb/macrocmd.c
diff --git a/gdb/macrocmd.c b/gdb/macrocmd.c
index a327cade4c9e4d1c7e01d306a1be952d58f8deca..2a9c06e21d6e6f1a5db4bfb575e50712bf86e760 100644
--- a/gdb/macrocmd.c
+++ b/gdb/macrocmd.c
@@ -1,5 +1,5 @@
/* C preprocessor macro expansion commands for GDB.
- Copyright (C) 2002, 2007-2012 Free Software Foundation, Inc.
+ Copyright (C) 2002-2013 Free Software Foundation, Inc.
Contributed by Red Hat, Inc.
This file is part of GDB.
@@ -25,7 +25,7 @@
#include "cli/cli-utils.h"
#include "command.h"
#include "gdbcmd.h"
-#include "gdb_string.h"
+#include <string.h>
#include "linespec.h"
@@ -47,11 +47,10 @@ macro_command (char *arg, int from_tty)
/* Prints an informational message regarding the lack of macro information. */
-static void macro_inform_no_debuginfo()
+static void
+macro_inform_no_debuginfo (void)
{
- fputs_filtered ("GDB has no preprocessor macro information for "
- "that code.",
- gdb_stdout);
+ puts_filtered ("GDB has no preprocessor macro information for that code.\n");
}
static void
@@ -131,13 +130,18 @@ show_pp_source_pos (struct ui_file *stream,
struct macro_source_file *file,
int line)
{
- fprintf_filtered (stream, "%s:%d\n", file->filename, line);
+ char *fullname;
+
+ fullname = macro_source_fullname (file);
+ fprintf_filtered (stream, "%s:%d\n", fullname, line);
+ xfree (fullname);
while (file->included_by)
{
- fprintf_filtered (gdb_stdout, " included at %s:%d\n",
- file->included_by->filename,
+ fullname = macro_source_fullname (file->included_by);
+ fprintf_filtered (gdb_stdout, " included at %s:%d\n", fullname,
file->included_at_line);
+ xfree (fullname);
file = file->included_by;
}
}
« no previous file with comments | « gdb/machoread.c ('k') | gdb/macroexp.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698