Commit Graph

21 Commits

Author SHA1 Message Date
Greg Clayton b14eeddaa1 Fixed the logging output to be done consistently across all plug-ins.
Added a new log category for DWARF called "aranges" to log the parsing
of address ranges.

llvm-svn: 139489
2011-09-12 04:05:41 +00:00
Jason Molenda bfb36ff9ea Include lldb/commands as a valid logging type in the
'log list' output.

Remove an extraneous \n from one of the lldb/commands
log line.

Add an lldb/commands log indicating whether the command
was successful or not.

llvm-svn: 138530
2011-08-25 00:20:04 +00:00
Enrico Granata e992a0899e some editing of data visualization error messages to make them more meaningful
debugging printfs() for data visualization turned into a meaningful log:
 - introduced a new log category `types' in channel `lldb'

llvm-svn: 135773
2011-07-22 17:03:19 +00:00
Jim Ingham 95496b1856 Deleted one too many characters...
llvm-svn: 131041
2011-05-07 01:03:33 +00:00
Jim Ingham dc3d8ffbe9 Make the log message & setter match for "dyld/shlib". The "ListLogCategories" output should really be auto-generated from the settings so you can't make this sort of mistake...
llvm-svn: 131003
2011-05-06 18:34:33 +00:00
Greg Clayton 05c32e27c6 Patch to remove uses of non-standard strcasestr and replace then with
strncasecmp equivalents from Kirk Beitz.

llvm-svn: 124889
2011-02-04 18:55:41 +00:00
Greg Clayton 710dd5aebf Spelling changes applied from lldb_spelling.diffs from Bruce Mitchener.
Thanks Bruce!

llvm-svn: 123083
2011-01-08 20:28:42 +00:00
Caroline Tice d9d63369df - Fix alias-building & resolving to properly handle optional arguments for command options.
- Add logging for command resolution ('log enable lldb commands')
- Fix alias resolution to properly handle commands that take raw input (resolve the alias, but
  don't muck up the raw arguments).

Net result:  Among other things, 'expr' command can now take strings with escaped characters and
not have the command handling & alias resolution code muck up the escaped characters. E.g.
 'expr printf ("\n\n\tHello there!")' should now work properly.


Not working yet:  Creating aliases with raw input for commands that take raw input.  Working on that.
e.g. 'command alias print_hi expr printf ("\n\tHi!")' does not work yet.

llvm-svn: 121171
2010-12-07 19:58:26 +00:00
Greg Clayton 99d0faf27e Cleaned up code that wasn't using the Initialize and Terminate paradigm by
changing it to use it. There was an extra parameter added to the static
accessor global user settings controllers that wasn't needed. A bool was being
used as a parameter to the accessor just so it could be used to clean up 
the global user settings controller which is now fixed by splitting up the
initialization into the "static void Class::Initialize()", access into the
"static UserSettingsControllerSP & Class::GetSettingsController()", and
cleanup into "static void Class::Terminate()".

Also added initialize and terminate calls to the logging code to avoid issues
when LLDB is shutting down. There were cases after the logging was switched
over to use shared pointers where we could crash if the global destructor
chain was being run and it causes the log to be destroyed and any any logging
occurred.

llvm-svn: 119757
2010-11-18 23:32:35 +00:00
Caroline Tice 5c2816d903 Move the embedded Python interpreter onto a separate thread, to prevent
main thread from having to wait on it (which was causing some I/O 
hangs).

llvm-svn: 118700
2010-11-10 19:18:14 +00:00
Greg Clayton 2d4edfbc6a Modified all logging calls to hand out shared pointers to make sure we
don't crash if we disable logging when some code already has a copy of the
logger. Prior to this fix, logs were handed out as pointers and if they were
held onto while a log got disabled, then it could cause a crash. Now all logs
are handed out as shared pointers so this problem shouldn't happen anymore.
We are also using our new shared pointers that put the shared pointer count
and the object into the same allocation for a tad better performance.

llvm-svn: 118319
2010-11-06 01:53:30 +00:00
Jim Ingham d403f26bbe Don't need both LIBLLDB_LOG_DYNAMIC_LOADER and LIBLLDB_LOG_SHLIB. Go with the former.
llvm-svn: 118283
2010-11-05 17:59:33 +00:00
Greg Clayton 6ba508507e Fixed shared library unloads when the unloaded library doesn't come off
the end of the list. We had an issue in the MacOSX dynamic loader where if
we had shlibs:
1 - a.out
2 - a.dylib
3 - b.dylib

And then a.dylib got unloaded, we would unload b.dylib due to the assumption
that only shared libraries could come off the end of the list. We now properly
search and find which ones get loaded.

Added a new internal logging category for the "lldb" log channel named "dyld".
This should allow all dynamic loaders to use this as a generic log channel so
we can track shared library loads and unloads in the logs without having to 
have each plug-in make up its own logging channel.

llvm-svn: 118147
2010-11-03 04:08:06 +00:00
Caroline Tice 20ad3c40f4 Add the ability to disable individual log categories, rather
than just the entire log channel.

Add checks, where appropriate, to make sure a log channel/category has 
not been disabled before attempting to write to it.

llvm-svn: 117715
2010-10-29 21:48:37 +00:00
Greg Clayton 73b472d42a Updated the lldb_private::Flags class to have better method names and made
all of the calls inlined in the header file for better performance.

Fixed the summary for C string types (array of chars (with any combo if
modifiers), and pointers to chars) work in all cases.

Fixed an issue where a forward declaration to a clang type could cause itself
to resolve itself more than once if, during the resolving of the type itself
it caused something to try and resolve itself again. We now remove the clang
type from the forward declaration map in the DWARF parser when we start to 
resolve it and avoid this additional call. This should stop any duplicate
members from appearing and throwing all the alignment of structs, unions and
classes.

llvm-svn: 117437
2010-10-27 03:32:59 +00:00
Caroline Tice ceb6b1393d First pass at adding logging capabilities for the API functions. At the moment
it logs the function calls, their arguments and the return values.  This is not
complete or polished, but I am committing it now, at the request of someone who
really wants to use it, even though it's not really done.  It currently does not
attempt to log all the functions, just the most important ones.  I will be 
making further adjustments to the API logging code over the next few days/weeks.
(Suggestions for improvements are welcome).


Update the Python build scripts to re-build the swig C++ file whenever 
the python-extensions.swig file is modified.

Correct the help for 'log enable' command (give it the correct number & type of
arguments).

llvm-svn: 117349
2010-10-26 03:11:13 +00:00
Jason Molenda ab4f1924db Check in the native lldb unwinder.
Not yet enabled as the default unwinder but there are no known
backtrace problems with the code at this point.

Added 'log enable lldb unwind' to help diagnose backtrace problems;
this output needs a little refining but it's a good first step.

eh_frame information is currently read unconditionally - the code
is structured to allow this to be delayed until it's actually needed.
There is a performance hit when you have to parse the eh_frame
information for any largeish executable/library so it's necessary
to avoid if possible.

It's confusing having both the UnwindPlan::RegisterLocation struct
and the RegisterConextLLDB::RegisterLocation struct, I need to rename
one of them.

The writing of registers isn't done in the RegisterConextLLDB subclass
yet; neither is the running of complex DWARF expressions from eh_frame
(e.g. used for _sigtramp on Mac OS X).

llvm-svn: 117256
2010-10-25 11:12:07 +00:00
Jim Ingham b4dcbaeec2 Add a "lldb host" logging channel, and put logging in the Host::OpenInExternalEditor code.
llvm-svn: 112614
2010-08-31 18:05:13 +00:00
Jim Ingham 40af72e106 Move Args.{cpp,h} and Options.{cpp,h} to Interpreter where they really belong.
llvm-svn: 106034
2010-06-15 19:49:27 +00:00
Eli Friedman 048ceecb15 Add missing include.
llvm-svn: 105781
2010-06-10 04:51:35 +00:00
Chris Lattner 30fdc8d841 Initial checkin of lldb code from internal Apple repo.
llvm-svn: 105619
2010-06-08 16:52:24 +00:00