[nemiver] Don't query mixed asm files (Closes: #624971)
- From: Dodji Seketeli <dodji src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nemiver] Don't query mixed asm files (Closes: #624971)
- Date: Thu, 22 Jul 2010 14:19:35 +0000 (UTC)
commit 2509130e804dd69f7705f5b86561abb7804ba651
Author: Dodji Seketeli <dodji redhat com>
Date: Thu Jul 22 16:14:28 2010 +0200
Don't query mixed asm files (Closes: #624971)
* src/persp/dbgperspective/nmv-dbg-perspective.cc
(DBGPerspective::read_file_line): Don't try to ask the user if we
don't find the file path otherwise it can turn out to be extremely
annoying.
src/persp/dbgperspective/nmv-dbg-perspective.cc | 17 ++++++++++++++++-
1 files changed, 16 insertions(+), 1 deletions(-)
---
diff --git a/src/persp/dbgperspective/nmv-dbg-perspective.cc b/src/persp/dbgperspective/nmv-dbg-perspective.cc
index 086fe8a..1b13798 100644
--- a/src/persp/dbgperspective/nmv-dbg-perspective.cc
+++ b/src/persp/dbgperspective/nmv-dbg-perspective.cc
@@ -5870,6 +5870,16 @@ DBGPerspective::load_asm (const IDebugger::DisassembleInfo &a_info,
return true;
}
+/// Given a file path P and a line number N , reads the line N from P
+/// and return it iff the function returns true. This is useful
+/// e.g. when forging a mixed source/assembly source view, and we want
+/// to display a source line N from a file P.
+///
+/// \param a_file_path the file path to consider
+/// \param a_line_number the line number to consider
+/// \param a_line the string containing the resulting line read, if
+/// and only if the function returned true.
+/// \return true upon successful completion, false otherwise.
bool
DBGPerspective::read_file_line (const UString &a_file_path,
int a_line_number,
@@ -5879,7 +5889,12 @@ DBGPerspective::read_file_line (const UString &a_file_path,
return false;
UString path;
- if (!find_absolute_path_or_ask_user (a_file_path, path))
+ if (!find_absolute_path (a_file_path, path))
+ //Normally, there should be a sophisticated way to give the
+ //user a chance to let the tool figure out where the file
+ //a_file_path is, without becoming tedious if this function is
+ //called multiple times on a file that is not found. For now,
+ //let's just keep it stupid simple.
return false;
bool found_line = false;
int line_num = 1;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]