[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnash-commit] /srv/bzr/gnash/trunk r9690: Fix debugger
From: |
Markus Gothe |
Subject: |
[Gnash-commit] /srv/bzr/gnash/trunk r9690: Fix debugger |
Date: |
Sun, 07 Sep 2008 05:18:34 +0200 |
User-agent: |
Bazaar (1.5) |
------------------------------------------------------------
revno: 9690
committer: Markus Gothe <address@hidden>
branch nick: gnash
timestamp: Sun 2008-09-07 05:18:34 +0200
message:
Fix debugger
modified:
libcore/as_environment.cpp
libcore/as_environment.h
libcore/debugger.cpp
=== modified file 'libcore/as_environment.cpp'
--- a/libcore/as_environment.cpp 2008-09-01 18:11:06 +0000
+++ b/libcore/as_environment.cpp 2008-09-07 03:18:34 +0000
@@ -979,6 +979,12 @@
{
}
+as_value
+as_environment::get_stack_index(unsigned int index)
+{
+ return static_cast<as_value>(_stack.value(index));
+}
+
void
as_environment::dump_stack(std::ostream& out, unsigned int limit) const
{
=== modified file 'libcore/as_environment.h'
--- a/libcore/as_environment.h 2008-09-01 18:11:06 +0000
+++ b/libcore/as_environment.h 2008-09-07 03:18:34 +0000
@@ -417,7 +417,14 @@
/// Case insensitive for SWF up to 6, sensitive from 7 up
///
as_object* find_object(const std::string& path, const ScopeStack*
scopeStack=NULL) const;
-
+
+ /// Return content of the stack on a given index.
+ //
+ /// @param index
+ /// index of the stack.
+ ///
+ as_value get_stack_index(unsigned int index);
+
/// Dump content of the stack to a std::ostream
//
/// @param out
=== modified file 'libcore/debugger.cpp'
--- a/libcore/debugger.cpp 2008-05-25 09:05:18 +0000
+++ b/libcore/debugger.cpp 2008-09-07 03:18:34 +0000
@@ -550,7 +550,7 @@
return;
}
if (env.stack_size()) {
- env.m_stack[index] = val;
+ env.get_stack_index(index) = val;
}
}
@@ -567,7 +567,7 @@
for (unsigned int i=0, n=env.stack_size(); i<n; i++) {
// FIXME, shouldn't these go to the log as well as to cerr?
cerr << "\t" << i << ": ";
- as_value val = env.m_stack[i];
+ as_value val = env.get_stack_index(i);
// FIXME: we want to print the name of the function
// if (val.is_as_function()) {
// // cerr << val.get_symbol_handle() << endl;
@@ -576,7 +576,8 @@
// cerr << name << " ";
// }
// }
- cerr << env.m_stack[i];
+ cerr << env.get_stack_index(i);
+
if (val.is_object()) {
boost::intrusive_ptr<as_object> o = val.to_object();
string name = lookupSymbol(o.get());
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Gnash-commit] /srv/bzr/gnash/trunk r9690: Fix debugger,
Markus Gothe <=