projects
/
wxWidgets.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Set focus to generic wxDataViewCtrl when clicking with any mouse button, not just...
[wxWidgets.git]
/
src
/
unix
/
stackwalk.cpp
diff --git
a/src/unix/stackwalk.cpp
b/src/unix/stackwalk.cpp
index 6b8b6051c197c958fe284e243816b87425d8b08a..ad78765094d27641369814f0707a4a21239ddab6 100644
(file)
--- a/
src/unix/stackwalk.cpp
+++ b/
src/unix/stackwalk.cpp
@@
-67,7
+67,7
@@
public:
private:
FILE *m_fp;
private:
FILE *m_fp;
- DECLARE_NO_COPY_CLASS(wxStdioPipe)
+ wxDECLARE_NO_COPY_CLASS(wxStdioPipe);
};
// ============================================================================
};
// ============================================================================
@@
-92,13
+92,13
@@
void wxStackFrame::OnGetName()
// format is: "module(funcname+offset) [address]" but the part in
// parentheses can be not present
wxString syminfo = wxString::FromAscii(m_syminfo);
// format is: "module(funcname+offset) [address]" but the part in
// parentheses can be not present
wxString syminfo = wxString::FromAscii(m_syminfo);
- const size_t posOpen = syminfo.find(
_
T('('));
+ const size_t posOpen = syminfo.find(
wx
T('('));
if ( posOpen != wxString::npos )
{
if ( posOpen != wxString::npos )
{
- const size_t posPlus = syminfo.find(
_
T('+'), posOpen + 1);
+ const size_t posPlus = syminfo.find(
wx
T('+'), posOpen + 1);
if ( posPlus != wxString::npos )
{
if ( posPlus != wxString::npos )
{
- const size_t posClose = syminfo.find(
_
T(')'), posPlus + 1);
+ const size_t posClose = syminfo.find(
wx
T(')'), posPlus + 1);
if ( posClose != wxString::npos )
{
if ( m_name.empty() )
if ( posClose != wxString::npos )
{
if ( m_name.empty() )
@@
-239,8
+239,9
@@
int wxStackWalker::InitFrames(wxStackFrame *arr, size_t n, void **addresses, cha
// parse addr2line output (should be exactly 2 lines for each address)
// reusing the g_buf used for building the command line above
wxString name, filename;
// parse addr2line output (should be exactly 2 lines for each address)
// reusing the g_buf used for building the command line above
wxString name, filename;
- unsigned long line, curr=0;
- for (size_t i=0; i<n; i++)
+ unsigned long line = 0,
+ curr = 0;
+ for ( size_t i = 0; i < n; i++ )
{
// 1st line has function name
if ( fgets(g_buf, WXSIZEOF(g_buf), fp) )
{
// 1st line has function name
if ( fgets(g_buf, WXSIZEOF(g_buf), fp) )
@@
-248,12
+249,13
@@
int wxStackWalker::InitFrames(wxStackFrame *arr, size_t n, void **addresses, cha
name = wxString::FromAscii(g_buf);
name.RemoveLast(); // trailing newline
name = wxString::FromAscii(g_buf);
name.RemoveLast(); // trailing newline
- if ( name ==
_
T("??") )
+ if ( name ==
wx
T("??") )
name.clear();
}
else
{
name.clear();
}
else
{
- wxLogDebug(_T("cannot read addr2line output for %d-th stack frame!"), i);
+ wxLogDebug(wxT("cannot read addr2line output for stack frame #%lu"),
+ (unsigned long)i);
return false;
}
return false;
}
@@
-263,23
+265,22
@@
int wxStackWalker::InitFrames(wxStackFrame *arr, size_t n, void **addresses, cha
filename = wxString::FromAscii(g_buf);
filename.RemoveLast();
filename = wxString::FromAscii(g_buf);
filename.RemoveLast();
- const size_t posColon = filename.find(
_
T(':'));
+ const size_t posColon = filename.find(
wx
T(':'));
if ( posColon != wxString::npos )
{
if ( posColon != wxString::npos )
{
- // parse line number
- if ( !wxString(filename, posColon + 1, wxString::npos).
- ToULong(&line) )
- line = 0;
+ // parse line number (it's ok if it fails, this will just leave
+ // line at its current, invalid, 0 value)
+ wxString(filename, posColon + 1, wxString::npos).ToULong(&line);
// remove line number from 'filename'
filename.erase(posColon);
// remove line number from 'filename'
filename.erase(posColon);
- if ( filename ==
_
T("??") )
+ if ( filename ==
wx
T("??") )
filename.clear();
}
else
{
filename.clear();
}
else
{
- wxLogDebug(
_
T("Unexpected addr2line format: \"%s\" - ")
-
_
T("the semicolon is missing"),
+ wxLogDebug(
wx
T("Unexpected addr2line format: \"%s\" - ")
+
wx
T("the semicolon is missing"),
filename.c_str());
}
}
filename.c_str());
}
}