lldb-commits@cs.uiuc.edu
ki.stfu accepted this revision. ki.stfu added a comment. This revision is now accepted and ready to land. lgtm Comment at: tools/lldb-mi/MIUtilString.cpp:489-491 @@ -488,6 +488,5 @@ -MIchar *pPtr = const_cast(&vrText); -for (MIuint i = 0; i < len; i++, pPtr++) +for (MIuint i = 0; i < len; i++, vpText++) { -const MIchar c = *pPtr; +const MIchar c = *vpText; if (::isalnum((int)c) == 0) a bit weird. may be the following is better? ``` for (MIuint i = 0; i < len; ++i) { const MIchar c = vpText[i]; [...] ``` http://reviews.llvm.org/D10906 ___ lldb-commits mailing list lldb-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/lldb-commits
lldb-commits@cs.uiuc.edu
brucem updated this revision to Diff 28993. brucem added a comment. Update per review comments. Updating D10906: Fix type signature for CMIUtilString::IsAllValidAlphaAndNumeric. = This should take a "const char*" not a "char &". http://reviews.llvm.org/D10906 Files: tools/lldb-mi/MICmnLLDBDebugSessionInfo.cpp tools/lldb-mi/MIUtilString.cpp tools/lldb-mi/MIUtilString.h Index: tools/lldb-mi/MIUtilString.h === --- tools/lldb-mi/MIUtilString.h +++ tools/lldb-mi/MIUtilString.h @@ -35,7 +35,7 @@ static CMIUtilString Format(const CMIUtilString vFormating, ...); static CMIUtilString FormatBinary(const MIuint64 vnDecimal); static CMIUtilString FormatValist(const CMIUtilString &vrFormating, va_list vArgs); -static bool IsAllValidAlphaAndNumeric(const MIchar &vrText); +static bool IsAllValidAlphaAndNumeric(const MIchar *vpText); static bool Compare(const CMIUtilString &vrLhs, const CMIUtilString &vrRhs); static CMIUtilString ConvertToPrintableASCII(const char vChar); static CMIUtilString ConvertToPrintableASCII(const char16_t vChar16); Index: tools/lldb-mi/MIUtilString.cpp === --- tools/lldb-mi/MIUtilString.cpp +++ tools/lldb-mi/MIUtilString.cpp @@ -475,21 +475,20 @@ // Details: Determine if the text is all valid alpha numeric characters. Letters can be // either upper or lower case. // Type:Static method. -// Args:vrText - (R) The text data to examine. +// Args:vpText - (R) The text data to examine. // Return: bool - True = yes all alpha, false = one or more chars is non alpha. // Throws: None. //-- bool -CMIUtilString::IsAllValidAlphaAndNumeric(const MIchar &vrText) +CMIUtilString::IsAllValidAlphaAndNumeric(const MIchar *vpText) { -const MIuint len = ::strlen(&vrText); +const MIuint len = ::strlen(vpText); if (len == 0) return false; -MIchar *pPtr = const_cast(&vrText); -for (MIuint i = 0; i < len; i++, pPtr++) +for (MIuint i = 0; i < len; i++, vpText++) { -const MIchar c = *pPtr; +const MIchar c = *vpText; if (::isalnum((int)c) == 0) return false; } Index: tools/lldb-mi/MICmnLLDBDebugSessionInfo.cpp === --- tools/lldb-mi/MICmnLLDBDebugSessionInfo.cpp +++ tools/lldb-mi/MICmnLLDBDebugSessionInfo.cpp @@ -383,7 +383,7 @@ const MIchar *pThreadName = rThread.GetName(); const MIuint len = (pThreadName != nullptr) ? CMIUtilString(pThreadName).length() : 0; const bool bHaveName = ((pThreadName != nullptr) && (len > 0) && (len < 32) && - CMIUtilString::IsAllValidAlphaAndNumeric(*pThreadName)); // 32 is arbitary number + CMIUtilString::IsAllValidAlphaAndNumeric(pThreadName)); // 32 is arbitary number const MIchar *pThrdFmt = bHaveName ? "%s" : "Thread %d"; CMIUtilString strThread; if (bHaveName) Index: tools/lldb-mi/MIUtilString.h === --- tools/lldb-mi/MIUtilString.h +++ tools/lldb-mi/MIUtilString.h @@ -35,7 +35,7 @@ static CMIUtilString Format(const CMIUtilString vFormating, ...); static CMIUtilString FormatBinary(const MIuint64 vnDecimal); static CMIUtilString FormatValist(const CMIUtilString &vrFormating, va_list vArgs); -static bool IsAllValidAlphaAndNumeric(const MIchar &vrText); +static bool IsAllValidAlphaAndNumeric(const MIchar *vpText); static bool Compare(const CMIUtilString &vrLhs, const CMIUtilString &vrRhs); static CMIUtilString ConvertToPrintableASCII(const char vChar); static CMIUtilString ConvertToPrintableASCII(const char16_t vChar16); Index: tools/lldb-mi/MIUtilString.cpp === --- tools/lldb-mi/MIUtilString.cpp +++ tools/lldb-mi/MIUtilString.cpp @@ -475,21 +475,20 @@ // Details: Determine if the text is all valid alpha numeric characters. Letters can be // either upper or lower case. // Type:Static method. -// Args:vrText - (R) The text data to examine. +// Args:vpText - (R) The text data to examine. // Return: bool - True = yes all alpha, false = one or more chars is non alpha. // Throws: None. //-- bool -CMIUtilString::IsAllValidAlphaAndNumeric(const MIchar &vrText) +CMIUtilString::IsAllValidAlphaAndNumeric(const MIchar *vpText) { -const MIuint len = ::strlen(&vrText); +const MIuint len = ::strlen(vpText); if (len == 0) return false; -MIchar *pPtr = const_cast(&vrText); -for (MIuint i = 0; i < len; i++, pPtr++) +for (MIuint i = 0; i < len; i++, vpText++) { -const MIchar c = *pPtr; +const MIchar c = *vpText; if (::isalnum
Re: [Lldb-commits] [PATCH] D10866: Improve DWARF CFI CIE parsing and remove duplicated code
jasonmolenda accepted this revision. jasonmolenda added a comment. This revision is now accepted and ready to land. This looks OK to me too. http://reviews.llvm.org/D10866 ___ lldb-commits mailing list lldb-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [PATCH] D10902: Enable usage of eh_frame based unwind plan as a fallback
jasonmolenda accepted this revision. jasonmolenda added a comment. This revision is now accepted and ready to land. Great idea. http://reviews.llvm.org/D10902 ___ lldb-commits mailing list lldb-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/lldb-commits
lldb-commits@cs.uiuc.edu
ki.stfu requested changes to this revision. ki.stfu added a comment. This revision now requires changes to proceed. Looks good apart from one renaming. Comment at: tools/lldb-mi/MIUtilString.cpp:478 @@ -477,3 +477,3 @@ // Type:Static method. // Args:vrText - (R) The text data to examine. // Return: bool - True = yes all alpha, false = one or more chars is non alpha. ditto Comment at: tools/lldb-mi/MIUtilString.cpp:483 @@ -482,3 +482,3 @@ bool -CMIUtilString::IsAllValidAlphaAndNumeric(const MIchar &vrText) +CMIUtilString::IsAllValidAlphaAndNumeric(const MIchar *vrText) { ditto Comment at: tools/lldb-mi/MIUtilString.h:38 @@ -37,3 +37,3 @@ static CMIUtilString FormatValist(const CMIUtilString &vrFormating, va_list vArgs); -static bool IsAllValidAlphaAndNumeric(const MIchar &vrText); +static bool IsAllValidAlphaAndNumeric(const MIchar *vrText); static bool Compare(const CMIUtilString &vrLhs, const CMIUtilString &vrRhs); In vrText, "r" means reference. Rename it to vpText. http://reviews.llvm.org/D10906 ___ lldb-commits mailing list lldb-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [PATCH] D10912: Typo fixes.
This revision was automatically updated to reflect the committed changes. Closed by commit rL241317: Typo fixes. (authored by brucem). CHANGED PRIOR TO COMMIT http://reviews.llvm.org/D10912?vs=28986&id=28989#toc rL LLVM http://reviews.llvm.org/D10912 Files: lldb/trunk/tools/lldb-mi/MICmnMIValueResult.cpp lldb/trunk/tools/lldb-mi/MICmnMIValueResult.h lldb/trunk/tools/lldb-mi/MICmnMIValueTuple.cpp lldb/trunk/tools/lldb-mi/MICmnMIValueTuple.h Index: lldb/trunk/tools/lldb-mi/MICmnMIValueResult.cpp === --- lldb/trunk/tools/lldb-mi/MICmnMIValueResult.cpp +++ lldb/trunk/tools/lldb-mi/MICmnMIValueResult.cpp @@ -48,7 +48,7 @@ // Type:Method. // Args:vrVariable - (R) MI value's name. // vrValue - (R) The MI value. -// vbUseSpacing- (R) True = put space seperators into the string, false = no spaces used. +// vbUseSpacing- (R) True = put space separators into the string, false = no spaces used. // Return: None. // Throws: None. //-- Index: lldb/trunk/tools/lldb-mi/MICmnMIValueResult.h === --- lldb/trunk/tools/lldb-mi/MICmnMIValueResult.h +++ lldb/trunk/tools/lldb-mi/MICmnMIValueResult.h @@ -59,5 +59,5 @@ CMIUtilString m_strPartVariable; CMICmnMIValue m_partMIValue; bool m_bEmptyConstruction; // True = *this object used constructor with no parameters, false = constructor with parameters -bool m_bUseSpacing;// True = put space seperators into the string, false = no spaces used +bool m_bUseSpacing;// True = put space separators into the string, false = no spaces used }; Index: lldb/trunk/tools/lldb-mi/MICmnMIValueTuple.h === --- lldb/trunk/tools/lldb-mi/MICmnMIValueTuple.h +++ lldb/trunk/tools/lldb-mi/MICmnMIValueTuple.h @@ -60,5 +60,5 @@ // Attributes: private: -bool m_bSpaceAfterComma; // True = put space seperators into the string, false = no spaces used +bool m_bSpaceAfterComma; // True = put space separators into the string, false = no spaces used }; Index: lldb/trunk/tools/lldb-mi/MICmnMIValueTuple.cpp === --- lldb/trunk/tools/lldb-mi/MICmnMIValueTuple.cpp +++ lldb/trunk/tools/lldb-mi/MICmnMIValueTuple.cpp @@ -42,7 +42,7 @@ // Details: CMICmnMIValueTuple constructor. // Type:Method. // Args:vResult - (R) MI result object. -// vbUseSpacing- (R) True = put space seperators into the string, false = no spaces used. +// vbUseSpacing- (R) True = put space separators into the string, false = no spaces used. // Return: None. // Throws: None. //-- @@ -164,7 +164,7 @@ // will return MIstatus::failure. // Type:Method. // Args:vValue - (R) The MI value object. -// vbUseSpacing- (R) True = put space seperators into the string, false = no spaces used. +// vbUseSpacing- (R) True = put space separators into the string, false = no spaces used. // Return: MIstatus::success - Functional succeeded. // MIstatus::failure - Functional failed. // Throws: None. @@ -182,7 +182,7 @@ // will return MIstatus::failure. // Type:Method. // Args:vValue - (R) The MI value object. -// vbUseSpacing- (R) True = put space seperators into the string, false = no spaces used. +// vbUseSpacing- (R) True = put space separators into the string, false = no spaces used. // Return: MIstatus::success - Functional succeeded. // MIstatus::failure - Functional failed. // Throws: None. Index: lldb/trunk/tools/lldb-mi/MICmnMIValueResult.cpp === --- lldb/trunk/tools/lldb-mi/MICmnMIValueResult.cpp +++ lldb/trunk/tools/lldb-mi/MICmnMIValueResult.cpp @@ -48,7 +48,7 @@ // Type:Method. // Args:vrVariable - (R) MI value's name. // vrValue - (R) The MI value. -// vbUseSpacing- (R) True = put space seperators into the string, false = no spaces used. +// vbUseSpacing- (R) True = put space separators into the string, false = no spaces used. // Return: None. // Throws: None. //-- Index: lldb/trunk/tools/lldb-mi/MICmnMIValueResult.h === --- lldb/trunk/tools/lldb-mi/MICmnMIValueResult.h +++ lldb/trunk/tools/lldb-mi/MICmnMIValueResult.h @@ -59,5 +59,5 @@ CMIUtilString m_strPartVariable; CMICmnMIValue m_partMIValue; bool m_bEmptyConstruction; // True = *this object used constructor with no parameters, false = constructor with parameters -bool m_bUseSpacing;// True = put space seperators into the string, false = no spaces used +bool m_bUseSpacing;// True = put space separ
[Lldb-commits] [lldb] r241317 - Typo fixes.
Author: brucem Date: Thu Jul 2 22:54:17 2015 New Revision: 241317 URL: http://llvm.org/viewvc/llvm-project?rev=241317&view=rev Log: Typo fixes. Summary: Some typo fixes in comments in lldb-mi. Reviewers: abidh, ki.stfu Subscribers: lldb-commits-list Differential Revision: http://reviews.llvm.org/D10912 Modified: lldb/trunk/tools/lldb-mi/MICmnMIValueResult.cpp lldb/trunk/tools/lldb-mi/MICmnMIValueResult.h lldb/trunk/tools/lldb-mi/MICmnMIValueTuple.cpp lldb/trunk/tools/lldb-mi/MICmnMIValueTuple.h Modified: lldb/trunk/tools/lldb-mi/MICmnMIValueResult.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/lldb-mi/MICmnMIValueResult.cpp?rev=241317&r1=241316&r2=241317&view=diff == --- lldb/trunk/tools/lldb-mi/MICmnMIValueResult.cpp (original) +++ lldb/trunk/tools/lldb-mi/MICmnMIValueResult.cpp Thu Jul 2 22:54:17 2015 @@ -48,7 +48,7 @@ CMICmnMIValueResult::CMICmnMIValueResult // Type:Method. // Args:vrVariable - (R) MI value's name. // vrValue - (R) The MI value. -// vbUseSpacing- (R) True = put space seperators into the string, false = no spaces used. +// vbUseSpacing- (R) True = put space separators into the string, false = no spaces used. // Return: None. // Throws: None. //-- Modified: lldb/trunk/tools/lldb-mi/MICmnMIValueResult.h URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/lldb-mi/MICmnMIValueResult.h?rev=241317&r1=241316&r2=241317&view=diff == --- lldb/trunk/tools/lldb-mi/MICmnMIValueResult.h (original) +++ lldb/trunk/tools/lldb-mi/MICmnMIValueResult.h Thu Jul 2 22:54:17 2015 @@ -59,5 +59,5 @@ class CMICmnMIValueResult : public CMICm CMIUtilString m_strPartVariable; CMICmnMIValue m_partMIValue; bool m_bEmptyConstruction; // True = *this object used constructor with no parameters, false = constructor with parameters -bool m_bUseSpacing;// True = put space seperators into the string, false = no spaces used +bool m_bUseSpacing;// True = put space separators into the string, false = no spaces used }; Modified: lldb/trunk/tools/lldb-mi/MICmnMIValueTuple.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/lldb-mi/MICmnMIValueTuple.cpp?rev=241317&r1=241316&r2=241317&view=diff == --- lldb/trunk/tools/lldb-mi/MICmnMIValueTuple.cpp (original) +++ lldb/trunk/tools/lldb-mi/MICmnMIValueTuple.cpp Thu Jul 2 22:54:17 2015 @@ -42,7 +42,7 @@ CMICmnMIValueTuple::CMICmnMIValueTuple(c // Details: CMICmnMIValueTuple constructor. // Type:Method. // Args:vResult - (R) MI result object. -// vbUseSpacing- (R) True = put space seperators into the string, false = no spaces used. +// vbUseSpacing- (R) True = put space separators into the string, false = no spaces used. // Return: None. // Throws: None. //-- @@ -164,7 +164,7 @@ CMICmnMIValueTuple::Add(const CMICmnMIVa // will return MIstatus::failure. // Type:Method. // Args:vValue - (R) The MI value object. -// vbUseSpacing- (R) True = put space seperators into the string, false = no spaces used. +// vbUseSpacing- (R) True = put space separators into the string, false = no spaces used. // Return: MIstatus::success - Functional succeeded. // MIstatus::failure - Functional failed. // Throws: None. @@ -182,7 +182,7 @@ CMICmnMIValueTuple::Add(const CMICmnMIVa // will return MIstatus::failure. // Type:Method. // Args:vValue - (R) The MI value object. -// vbUseSpacing- (R) True = put space seperators into the string, false = no spaces used. +// vbUseSpacing- (R) True = put space separators into the string, false = no spaces used. // Return: MIstatus::success - Functional succeeded. // MIstatus::failure - Functional failed. // Throws: None. Modified: lldb/trunk/tools/lldb-mi/MICmnMIValueTuple.h URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/lldb-mi/MICmnMIValueTuple.h?rev=241317&r1=241316&r2=241317&view=diff == --- lldb/trunk/tools/lldb-mi/MICmnMIValueTuple.h (original) +++ lldb/trunk/tools/lldb-mi/MICmnMIValueTuple.h Thu Jul 2 22:54:17 2015 @@ -60,5 +60,5 @@ class CMICmnMIValueTuple : public CMICmn // Attributes: private: -bool m_bSpaceAfterComma; // True = put space seperators into the string, false = no spaces used +bool m_bSpaceAfterComma; // True = put space separators into the string, false = no spaces used }; ___ lldb-commits mailing list lldb-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [PATCH] D10912: Typo fixes.
ki.stfu accepted this revision. ki.stfu added a comment. This revision is now accepted and ready to land. Lgtm http://reviews.llvm.org/D10912 ___ lldb-commits mailing list lldb-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/lldb-commits
[Lldb-commits] [PATCH] D10912: Typo fixes.
brucem created this revision. brucem added reviewers: abidh, ki.stfu. brucem added a subscriber: lldb-commits-list. Some typo fixes in comments in lldb-mi. http://reviews.llvm.org/D10912 Files: tools/lldb-mi/MICmnMIValueResult.cpp tools/lldb-mi/MICmnMIValueResult.h tools/lldb-mi/MICmnMIValueTuple.cpp tools/lldb-mi/MICmnMIValueTuple.h Index: tools/lldb-mi/MICmnMIValueTuple.h === --- tools/lldb-mi/MICmnMIValueTuple.h +++ tools/lldb-mi/MICmnMIValueTuple.h @@ -60,5 +60,5 @@ // Attributes: private: -bool m_bSpaceAfterComma; // True = put space seperators into the string, false = no spaces used +bool m_bSpaceAfterComma; // True = put space separators into the string, false = no spaces used }; Index: tools/lldb-mi/MICmnMIValueTuple.cpp === --- tools/lldb-mi/MICmnMIValueTuple.cpp +++ tools/lldb-mi/MICmnMIValueTuple.cpp @@ -42,7 +42,7 @@ // Details: CMICmnMIValueTuple constructor. // Type:Method. // Args:vResult - (R) MI result object. -// vbUseSpacing- (R) True = put space seperators into the string, false = no spaces used. +// vbUseSpacing- (R) True = put space separators into the string, false = no spaces used. // Return: None. // Throws: None. //-- @@ -164,7 +164,7 @@ // will return MIstatus::failure. // Type:Method. // Args:vValue - (R) The MI value object. -// vbUseSpacing- (R) True = put space seperators into the string, false = no spaces used. +// vbUseSpacing- (R) True = put space separators into the string, false = no spaces used. // Return: MIstatus::success - Functional succeeded. // MIstatus::failure - Functional failed. // Throws: None. @@ -182,7 +182,7 @@ // will return MIstatus::failure. // Type:Method. // Args:vValue - (R) The MI value object. -// vbUseSpacing- (R) True = put space seperators into the string, false = no spaces used. +// vbUseSpacing- (R) True = put space separators into the string, false = no spaces used. // Return: MIstatus::success - Functional succeeded. // MIstatus::failure - Functional failed. // Throws: None. Index: tools/lldb-mi/MICmnMIValueResult.h === --- tools/lldb-mi/MICmnMIValueResult.h +++ tools/lldb-mi/MICmnMIValueResult.h @@ -59,5 +59,5 @@ CMIUtilString m_strPartVariable; CMICmnMIValue m_partMIValue; bool m_bEmptyConstruction; // True = *this object used constructor with no parameters, false = constructor with parameters -bool m_bUseSpacing;// True = put space seperators into the string, false = no spaces used +bool m_bUseSpacing;// True = put space separators into the string, false = no spaces used }; Index: tools/lldb-mi/MICmnMIValueResult.cpp === --- tools/lldb-mi/MICmnMIValueResult.cpp +++ tools/lldb-mi/MICmnMIValueResult.cpp @@ -48,7 +48,7 @@ // Type:Method. // Args:vrVariable - (R) MI value's name. // vrValue - (R) The MI value. -// vbUseSpacing- (R) True = put space seperators into the string, false = no spaces used. +// vbUseSpacing- (R) True = put space separators into the string, false = no spaces used. // Return: None. // Throws: None. //-- Index: tools/lldb-mi/MICmnMIValueTuple.h === --- tools/lldb-mi/MICmnMIValueTuple.h +++ tools/lldb-mi/MICmnMIValueTuple.h @@ -60,5 +60,5 @@ // Attributes: private: -bool m_bSpaceAfterComma; // True = put space seperators into the string, false = no spaces used +bool m_bSpaceAfterComma; // True = put space separators into the string, false = no spaces used }; Index: tools/lldb-mi/MICmnMIValueTuple.cpp === --- tools/lldb-mi/MICmnMIValueTuple.cpp +++ tools/lldb-mi/MICmnMIValueTuple.cpp @@ -42,7 +42,7 @@ // Details: CMICmnMIValueTuple constructor. // Type:Method. // Args:vResult - (R) MI result object. -// vbUseSpacing- (R) True = put space seperators into the string, false = no spaces used. +// vbUseSpacing- (R) True = put space separators into the string, false = no spaces used. // Return: None. // Throws: None. //-- @@ -164,7 +164,7 @@ // will return MIstatus::failure. // Type:Method. // Args:vValue - (R) The MI value object. -// vbUseSpacing- (R) True = put space seperators into the string, false = no spaces used. +// vbUseSpacing- (R) True = put space separators into the string, false = no spaces used. // Return: MIstatus::success - Functional succeeded. // MIstatus::failure - F
[Lldb-commits] [lldb] r241307 - Improve the packet dumper to be able to read the target.xml so it can dump register values when disassembling the packet log.
Author: gclayton Date: Thu Jul 2 17:22:45 2015 New Revision: 241307 URL: http://llvm.org/viewvc/llvm-project?rev=241307&view=rev Log: Improve the packet dumper to be able to read the target.xml so it can dump register values when disassembling the packet log. Modified: lldb/trunk/examples/python/gdbremote.py Modified: lldb/trunk/examples/python/gdbremote.py URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/examples/python/gdbremote.py?rev=241307&r1=241306&r2=241307&view=diff == --- lldb/trunk/examples/python/gdbremote.py (original) +++ lldb/trunk/examples/python/gdbremote.py Thu Jul 2 17:22:45 2015 @@ -16,6 +16,7 @@ # available. #-- +import binascii import commands import math import optparse @@ -25,6 +26,7 @@ import shlex import string import sys import tempfile +import xml.etree.ElementTree as ET #-- # Global variables @@ -397,6 +399,13 @@ class Packet: uval |= self.get_hex_uint8() << 56 return uval +def get_hex_ascii_str(self, n=0): +hex_chars = self.get_hex_chars(n) +if hex_chars: +return binascii.unhexlify(hex_chars) +else: +return None + def get_hex_chars(self, n = 0): str_len = len(self.str) if n == 0: @@ -477,16 +486,17 @@ def rsp_stop_reply(options, cmd, cmd_arg stop_type = packet.get_char() if stop_type == 'T' or stop_type == 'S': signo = packet.get_hex_uint8() -print 'signal = %i' % signo key_value_pairs = packet.get_key_value_pairs() for key_value_pair in key_value_pairs: key = key_value_pair[0] -value = key_value_pair[1] if is_hex_byte(key): reg_num = Packet(key).get_hex_uint8() -print '' + get_register_name_equal_value (options, reg_num, value) -else: -print '%s = %s' % (key, value) +if reg_num < len(g_register_infos): +reg_info = g_register_infos[reg_num] +key_value_pair[0] = reg_info.name() +key_value_pair[1] = reg_info.get_value_from_hex_string (key_value_pair[1]) +key_value_pairs.insert(0, ['signal', signo]) +dump_key_value_pairs (key_value_pairs) elif stop_type == 'W': exit_status = packet.get_hex_uint8() print 'exit (status=%i)' % exit_status @@ -500,6 +510,40 @@ def cmd_unknown_packet(options, cmd, arg else: print "cmd: %s", cmd +def cmd_qXfer(options, cmd, args): +# $qXfer:features:read:target.xml:0,1#14 +print "read target special data %s" % (args) + +def rsp_qXfer(options, cmd, cmd_args, rsp): +data = string.split(cmd_args, ':') +if data[0] == 'features': +if data[1] == 'read': +filename, extension = os.path.splitext(data[2]) +if extension == '.xml': +response = Packet(rsp) +xml_string = response.get_hex_ascii_str() +ch = xml_string[0] +if ch == 'l': +xml_string = xml_string[1:] +xml_root = ET.fromstring(xml_string) +for reg_element in xml_root.findall("./feature/reg"): +if not 'value_regnums' in reg_element.attrib: +reg_info = RegisterInfo([]) +if 'name' in reg_element.attrib: +reg_info.info['name'] = reg_element.attrib['name'] +else: +reg_info.info['name'] = 'unspecified' +if 'encoding' in reg_element.attrib: +reg_info.info['encoding'] = reg_element.attrib['encoding'] +else: +reg_info.info['encoding'] = 'uint' +if 'offset' in reg_element.attrib: +reg_info.info['offset'] = reg_element.attrib['offset'] +if 'bitsize' in reg_element.attrib: +reg_info.info['bitsize'] = reg_element.attrib['bitsize'] +g_register_infos.append(reg_info) + + def cmd_query_packet(options, cmd, args): if args: print "query: %s, args: %s" % (cmd, args) @@ -525,15 +569,22 @@ def rsp_ok_means_success(options, cmd, c else: print "%s%s -> %s" % (cmd, cmd_args, rsp) +def dump_key_value_pairs(key_value_pairs): +max_key_len = 0 +for key_value_pair in key_value_pairs: +key_len = len(key_value_pair[0]) +if max_key_len < key_len: + max_key_len = key_len +for key_value_pair in key_value_pairs
lldb-commits@cs.uiuc.edu
brucem created this revision. brucem added reviewers: ki.stfu, abidh, domipheus. brucem added a subscriber: lldb-commits-list. Fix type signature for CMIUtilString::IsAllValidAlphaAndNumeric. This passes the MI tests on Mac OS X. http://reviews.llvm.org/D10906 Files: tools/lldb-mi/MICmnLLDBDebugSessionInfo.cpp tools/lldb-mi/MIUtilString.cpp tools/lldb-mi/MIUtilString.h Index: tools/lldb-mi/MIUtilString.h === --- tools/lldb-mi/MIUtilString.h +++ tools/lldb-mi/MIUtilString.h @@ -35,7 +35,7 @@ static CMIUtilString Format(const CMIUtilString vFormating, ...); static CMIUtilString FormatBinary(const MIuint64 vnDecimal); static CMIUtilString FormatValist(const CMIUtilString &vrFormating, va_list vArgs); -static bool IsAllValidAlphaAndNumeric(const MIchar &vrText); +static bool IsAllValidAlphaAndNumeric(const MIchar *vrText); static bool Compare(const CMIUtilString &vrLhs, const CMIUtilString &vrRhs); static CMIUtilString ConvertToPrintableASCII(const char vChar); static CMIUtilString ConvertToPrintableASCII(const char16_t vChar16); Index: tools/lldb-mi/MIUtilString.cpp === --- tools/lldb-mi/MIUtilString.cpp +++ tools/lldb-mi/MIUtilString.cpp @@ -480,16 +480,15 @@ // Throws: None. //-- bool -CMIUtilString::IsAllValidAlphaAndNumeric(const MIchar &vrText) +CMIUtilString::IsAllValidAlphaAndNumeric(const MIchar *vrText) { -const MIuint len = ::strlen(&vrText); +const MIuint len = ::strlen(vrText); if (len == 0) return false; -MIchar *pPtr = const_cast(&vrText); -for (MIuint i = 0; i < len; i++, pPtr++) +for (MIuint i = 0; i < len; i++, vrText++) { -const MIchar c = *pPtr; +const MIchar c = *vrText; if (::isalnum((int)c) == 0) return false; } Index: tools/lldb-mi/MICmnLLDBDebugSessionInfo.cpp === --- tools/lldb-mi/MICmnLLDBDebugSessionInfo.cpp +++ tools/lldb-mi/MICmnLLDBDebugSessionInfo.cpp @@ -383,7 +383,7 @@ const MIchar *pThreadName = rThread.GetName(); const MIuint len = (pThreadName != nullptr) ? CMIUtilString(pThreadName).length() : 0; const bool bHaveName = ((pThreadName != nullptr) && (len > 0) && (len < 32) && - CMIUtilString::IsAllValidAlphaAndNumeric(*pThreadName)); // 32 is arbitary number + CMIUtilString::IsAllValidAlphaAndNumeric(pThreadName)); // 32 is arbitary number const MIchar *pThrdFmt = bHaveName ? "%s" : "Thread %d"; CMIUtilString strThread; if (bHaveName) Index: tools/lldb-mi/MIUtilString.h === --- tools/lldb-mi/MIUtilString.h +++ tools/lldb-mi/MIUtilString.h @@ -35,7 +35,7 @@ static CMIUtilString Format(const CMIUtilString vFormating, ...); static CMIUtilString FormatBinary(const MIuint64 vnDecimal); static CMIUtilString FormatValist(const CMIUtilString &vrFormating, va_list vArgs); -static bool IsAllValidAlphaAndNumeric(const MIchar &vrText); +static bool IsAllValidAlphaAndNumeric(const MIchar *vrText); static bool Compare(const CMIUtilString &vrLhs, const CMIUtilString &vrRhs); static CMIUtilString ConvertToPrintableASCII(const char vChar); static CMIUtilString ConvertToPrintableASCII(const char16_t vChar16); Index: tools/lldb-mi/MIUtilString.cpp === --- tools/lldb-mi/MIUtilString.cpp +++ tools/lldb-mi/MIUtilString.cpp @@ -480,16 +480,15 @@ // Throws: None. //-- bool -CMIUtilString::IsAllValidAlphaAndNumeric(const MIchar &vrText) +CMIUtilString::IsAllValidAlphaAndNumeric(const MIchar *vrText) { -const MIuint len = ::strlen(&vrText); +const MIuint len = ::strlen(vrText); if (len == 0) return false; -MIchar *pPtr = const_cast(&vrText); -for (MIuint i = 0; i < len; i++, pPtr++) +for (MIuint i = 0; i < len; i++, vrText++) { -const MIchar c = *pPtr; +const MIchar c = *vrText; if (::isalnum((int)c) == 0) return false; } Index: tools/lldb-mi/MICmnLLDBDebugSessionInfo.cpp === --- tools/lldb-mi/MICmnLLDBDebugSessionInfo.cpp +++ tools/lldb-mi/MICmnLLDBDebugSessionInfo.cpp @@ -383,7 +383,7 @@ const MIchar *pThreadName = rThread.GetName(); const MIuint len = (pThreadName != nullptr) ? CMIUtilString(pThreadName).length() : 0; const bool bHaveName = ((pThreadName != nullptr) && (len > 0) && (len < 32) && -CMIUtilString::IsAllValidAlphaAndNumeric(*pThreadName)); // 32 is arbitary number +CMIUtilString::IsAllValidAlphaAndNumeric(pThreadName)); // 32 is arbitary number const MIchar *pThrdFmt = bHaveName ? "
Re: [Lldb-commits] [PATCH] D10898: Fix typos
This revision was automatically updated to reflect the committed changes. Closed by commit rL241289: Fix typos (authored by brucem). CHANGED PRIOR TO COMMIT http://reviews.llvm.org/D10898?vs=28960&id=28966#toc rL LLVM http://reviews.llvm.org/D10898 Files: lldb/trunk/examples/synthetic/unordered_multi.py lldb/trunk/source/Plugins/Platform/Linux/PlatformLinux.cpp lldb/trunk/source/Plugins/Platform/MacOSX/PlatformDarwinKernel.cpp lldb/trunk/source/Plugins/Process/MacOSX-Kernel/ProcessKDP.cpp lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp lldb/trunk/test/lang/c/stepping/TestStepAndBreakpoints.py lldb/trunk/test/lang/c/stepping/main.c Index: lldb/trunk/test/lang/c/stepping/main.c === --- lldb/trunk/test/lang/c/stepping/main.c +++ lldb/trunk/test/lang/c/stepping/main.c @@ -42,7 +42,7 @@ int complex (int first, int second, int third) { -return first + second + third; // Step in targetting complex should stop here +return first + second + third; // Step in targeting complex should stop here } int main (int argc, char const *argv[]) @@ -56,11 +56,11 @@ int A3 = a(3); // frame select 1, thread step-out while stopped at "c(3)" printf("a(3) returns %d\n", A3); -int A4 = complex (a(1), b(2), c(3)); // Stop here to try step in targetting b. +int A4 = complex (a(1), b(2), c(3)); // Stop here to try step in targeting b. -int A5 = complex (a(2), b(3), c(4)); // Stop here to try step in targetting complex. +int A5 = complex (a(2), b(3), c(4)); // Stop here to try step in targeting complex. -int A6 = complex (a(4), b(5), c(6)); // Stop here to step targetting b and hitting breakpoint. +int A6 = complex (a(4), b(5), c(6)); // Stop here to step targeting b and hitting breakpoint. int A7 = complex (a(5), b(6), c(7)); // Stop here to make sure bogus target steps over. Index: lldb/trunk/test/lang/c/stepping/TestStepAndBreakpoints.py === --- lldb/trunk/test/lang/c/stepping/TestStepAndBreakpoints.py +++ lldb/trunk/test/lang/c/stepping/TestStepAndBreakpoints.py @@ -185,17 +185,17 @@ self.assertTrue (thread.GetFrameAtIndex(0).GetLineEntry().GetLine() == current_line) self.assertTrue (thread.GetFrameAtIndex(0).GetLineEntry().GetFileSpec() == current_file) -# Now we are going to test step in targetting a function: +# Now we are going to test step in targeting a function: break_in_b.SetEnabled (False) -break_before_complex_1 = target.BreakpointCreateBySourceRegex ('// Stop here to try step in targetting b.', self.main_source_spec) +break_before_complex_1 = target.BreakpointCreateBySourceRegex ('// Stop here to try step in targeting b.', self.main_source_spec) self.assertTrue(break_before_complex_1, VALID_BREAKPOINT) -break_before_complex_2 = target.BreakpointCreateBySourceRegex ('// Stop here to try step in targetting complex.', self.main_source_spec) +break_before_complex_2 = target.BreakpointCreateBySourceRegex ('// Stop here to try step in targeting complex.', self.main_source_spec) self.assertTrue(break_before_complex_2, VALID_BREAKPOINT) -break_before_complex_3 = target.BreakpointCreateBySourceRegex ('// Stop here to step targetting b and hitting breakpoint.', self.main_source_spec) +break_before_complex_3 = target.BreakpointCreateBySourceRegex ('// Stop here to step targeting b and hitting breakpoint.', self.main_source_spec) self.assertTrue(break_before_complex_3, VALID_BREAKPOINT) break_before_complex_4 = target.BreakpointCreateBySourceRegex ('// Stop here to make sure bogus target steps over.', self.main_source_spec) @@ -218,7 +218,7 @@ thread.StepInto ("complex") self.assertTrue (thread.GetFrameAtIndex(0).GetFunctionName() == "complex") -# Now continue out and stop at the next call to complex. This time enable breakpoints in a and c and then step targetting b: +# Now continue out and stop at the next call to complex. This time enable breakpoints in a and c and then step targeting b: threads = lldbutil.continue_to_breakpoint (process, break_before_complex_3) self.assertTrue (len(threads) == 1) thread = threads[0] @@ -241,7 +241,7 @@ process.Continue() self.assertTrue (thread.GetFrameAtIndex(0).GetFunctionName() == "b") -# Now continue out and stop at the next call to complex. This time enable breakpoints in a and c and then step targetting b: +# Now continue out and stop at the next call to complex. This time enable breakpoints in a and c and then step targeting b: threads = lldbutil.continue_to_breakpoint (process, break_before_complex_4) self.assertTrue (len(threads) == 1) thread = threads[0] Index:
[Lldb-commits] [lldb] r241289 - Fix typos
Author: brucem Date: Thu Jul 2 13:48:40 2015 New Revision: 241289 URL: http://llvm.org/viewvc/llvm-project?rev=241289&view=rev Log: Fix typos Summary: Fixes more typos. Reviewers: clayborg Subscribers: lldb-commits-list Differential Revision: http://reviews.llvm.org/D10898 Modified: lldb/trunk/examples/synthetic/unordered_multi.py lldb/trunk/source/Plugins/Platform/Linux/PlatformLinux.cpp lldb/trunk/source/Plugins/Platform/MacOSX/PlatformDarwinKernel.cpp lldb/trunk/source/Plugins/Process/MacOSX-Kernel/ProcessKDP.cpp lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp lldb/trunk/test/lang/c/stepping/TestStepAndBreakpoints.py lldb/trunk/test/lang/c/stepping/main.c Modified: lldb/trunk/examples/synthetic/unordered_multi.py URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/examples/synthetic/unordered_multi.py?rev=241289&r1=241288&r2=241289&view=diff == --- lldb/trunk/examples/synthetic/unordered_multi.py (original) +++ lldb/trunk/examples/synthetic/unordered_multi.py Thu Jul 2 13:48:40 2015 @@ -15,7 +15,7 @@ class libcxx_hash_table_SynthProvider: self.next_element = None self.bucket_count = None try: - # unordered_map is made up a a hash_map, which has 4 pieces in it: + # unordered_map is made up of a hash_map, which has 4 pieces in it: # bucket list : # array of buckets # p1 (pair): @@ -27,7 +27,7 @@ class libcxx_hash_table_SynthProvider: # first - max_load_factor # second - equality operator function # - # For display, we actually dont need to go inside the buckets, since 'p1' has a way to iterate over all + # For display, we actually don't need to go inside the buckets, since 'p1' has a way to iterate over all # the elements directly. # # We will calculate other values about the map because they will be useful for the summary. @@ -46,7 +46,7 @@ class libcxx_hash_table_SynthProvider: logger >> "Num elements = %r" % self.num_elements # save the pointers as we get them - # -- dont access this first element if num_element==0! + # -- don't access this first element if num_element==0! self.elements_cache = [] if self.num_elements: self.next_element = self.begin_ptr Modified: lldb/trunk/source/Plugins/Platform/Linux/PlatformLinux.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Platform/Linux/PlatformLinux.cpp?rev=241289&r1=241288&r2=241289&view=diff == --- lldb/trunk/source/Plugins/Platform/Linux/PlatformLinux.cpp (original) +++ lldb/trunk/source/Plugins/Platform/Linux/PlatformLinux.cpp Thu Jul 2 13:48:40 2015 @@ -40,7 +40,7 @@ #include "../../Process/Linux/NativeProcessLinux.h" #endif -// Define these constants from Linux mman.h for use when targetting +// Define these constants from Linux mman.h for use when targeting // remote linux systems even when host has different values. #define MAP_PRIVATE 2 #define MAP_ANON 0x20 Modified: lldb/trunk/source/Plugins/Platform/MacOSX/PlatformDarwinKernel.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Platform/MacOSX/PlatformDarwinKernel.cpp?rev=241289&r1=241288&r2=241289&view=diff == --- lldb/trunk/source/Plugins/Platform/MacOSX/PlatformDarwinKernel.cpp (original) +++ lldb/trunk/source/Plugins/Platform/MacOSX/PlatformDarwinKernel.cpp Thu Jul 2 13:48:40 2015 @@ -80,7 +80,7 @@ PlatformSP PlatformDarwinKernel::CreateInstance (bool force, const ArchSpec *arch) { // This is a special plugin that we don't want to activate just based on an ArchSpec for normal -// userlnad debugging. It is only useful in kernel debug sessions and the DynamicLoaderDarwinPlugin +// userland debugging. It is only useful in kernel debug sessions and the DynamicLoaderDarwinPlugin // (or a user doing 'platform select') will force the creation of this Platform plugin. if (force == false) return PlatformSP(); Modified: lldb/trunk/source/Plugins/Process/MacOSX-Kernel/ProcessKDP.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/MacOSX-Kernel/ProcessKDP.cpp?rev=241289&r1=241288&r2=241289&view=diff == --- lldb/trunk/source/Plugins/Process/MacOSX-Kernel/ProcessKDP.cpp (o
[Lldb-commits] [lldb] r241287 - Move PlatformFreeBSD to its own namespace
Author: emaste Date: Thu Jul 2 12:35:22 2015 New Revision: 241287 URL: http://llvm.org/viewvc/llvm-project?rev=241287&view=rev Log: Move PlatformFreeBSD to its own namespace Based on r233679 Modified: lldb/trunk/source/Initialization/SystemInitializerCommon.cpp lldb/trunk/source/Plugins/Platform/FreeBSD/PlatformFreeBSD.cpp lldb/trunk/source/Plugins/Platform/FreeBSD/PlatformFreeBSD.h Modified: lldb/trunk/source/Initialization/SystemInitializerCommon.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Initialization/SystemInitializerCommon.cpp?rev=241287&r1=241286&r2=241287&view=diff == --- lldb/trunk/source/Initialization/SystemInitializerCommon.cpp (original) +++ lldb/trunk/source/Initialization/SystemInitializerCommon.cpp Thu Jul 2 12:35:22 2015 @@ -106,7 +106,7 @@ SystemInitializerCommon::Initialize() ObjectFileELF::Initialize(); ObjectFilePECOFF::Initialize(); DynamicLoaderPOSIXDYLD::Initialize(); -PlatformFreeBSD::Initialize(); +platform_freebsd::PlatformFreeBSD::Initialize(); platform_linux::PlatformLinux::Initialize(); PlatformWindows::Initialize(); PlatformKalimba::Initialize(); @@ -152,7 +152,7 @@ SystemInitializerCommon::Terminate() ObjectFileELF::Terminate(); ObjectFilePECOFF::Terminate(); DynamicLoaderPOSIXDYLD::Terminate(); -PlatformFreeBSD::Terminate(); +platform_freebsd::PlatformFreeBSD::Terminate(); platform_linux::PlatformLinux::Terminate(); PlatformWindows::Terminate(); PlatformKalimba::Terminate(); Modified: lldb/trunk/source/Plugins/Platform/FreeBSD/PlatformFreeBSD.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Platform/FreeBSD/PlatformFreeBSD.cpp?rev=241287&r1=241286&r2=241287&view=diff == --- lldb/trunk/source/Plugins/Platform/FreeBSD/PlatformFreeBSD.cpp (original) +++ lldb/trunk/source/Plugins/Platform/FreeBSD/PlatformFreeBSD.cpp Thu Jul 2 12:35:22 2015 @@ -32,9 +32,10 @@ using namespace lldb; using namespace lldb_private; +using namespace lldb_private::platform_freebsd; PlatformSP -PlatformFreeBSD::CreateInstance (bool force, const lldb_private::ArchSpec *arch) +PlatformFreeBSD::CreateInstance(bool force, const ArchSpec *arch) { // The only time we create an instance is when we are creating a remote // freebsd platform @@ -68,8 +69,8 @@ PlatformFreeBSD::CreateInstance (bool fo } -lldb_private::ConstString -PlatformFreeBSD::GetPluginNameStatic (bool is_host) +ConstString +PlatformFreeBSD::GetPluginNameStatic(bool is_host) { if (is_host) { @@ -133,7 +134,7 @@ PlatformFreeBSD::GetModuleSpec (const Fi return Platform::GetModuleSpec (module_file_spec, arch, module_spec); } -lldb_private::Error +Error PlatformFreeBSD::RunShellCommand(const char *command, const FileSpec &working_dir, int *status_ptr, Modified: lldb/trunk/source/Plugins/Platform/FreeBSD/PlatformFreeBSD.h URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Platform/FreeBSD/PlatformFreeBSD.h?rev=241287&r1=241286&r2=241287&view=diff == --- lldb/trunk/source/Plugins/Platform/FreeBSD/PlatformFreeBSD.h (original) +++ lldb/trunk/source/Plugins/Platform/FreeBSD/PlatformFreeBSD.h Thu Jul 2 12:35:22 2015 @@ -16,162 +16,167 @@ // Project includes #include "lldb/Target/Platform.h" -class PlatformFreeBSD : public lldb_private::Platform -{ -public: -// Mostly taken from PlatformDarwin and PlatformMacOSX - -// -// Class functions -// -static lldb::PlatformSP -CreateInstance (bool force, const lldb_private::ArchSpec *arch); - -static void -Initialize (); - -static void -Terminate (); - -static lldb_private::ConstString -GetPluginNameStatic (bool is_host); - -static const char * -GetDescriptionStatic (bool is_host); - -// -// Class Methods -// -PlatformFreeBSD (bool is_host); - -virtual -~PlatformFreeBSD(); - -// -// lldb_private::PluginInterface functions -// -lldb_private::ConstString -GetPluginName() override -{ -return GetPluginNameStatic (IsHost()); -} +namespace lldb_private { +namespace platform_freebsd { -uint32_t -GetPluginVersion() override +class PlatformFreeBSD : public Platform { -return 1; -} +public: -const char * -GetDescripti
Re: [Lldb-commits] [PATCH] D10898: Fix typos
clayborg accepted this revision. clayborg added a comment. This revision is now accepted and ready to land. Looks good. http://reviews.llvm.org/D10898 ___ lldb-commits mailing list lldb-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [PATCH] D9404: Expression evaluation, a new ThreadPlanCallFunctionNoJIT for executing a function call on target via register manipulation
EwanCrawford updated this revision to Diff 28959. EwanCrawford added a comment. Thanks for taking the time to have a closer look Jim. Could you expand on your last point about situations where we don't want to run the target at all, it didn't quite click. REPOSITORY rL LLVM http://reviews.llvm.org/D9404 Files: include/lldb/Expression/IRInterpreter.h include/lldb/Expression/IRMemoryMap.h include/lldb/Target/ABI.h include/lldb/Target/ThreadPlanCallFunction.h include/lldb/Target/ThreadPlanCallFunctionUsingABI.h lldb.xcodeproj/project.pbxproj source/Expression/ClangExpressionParser.cpp source/Expression/ClangUserExpression.cpp source/Expression/IRInterpreter.cpp source/Expression/IRMemoryMap.cpp source/Plugins/ABI/SysV-hexagon/ABISysV_hexagon.cpp source/Target/CMakeLists.txt source/Target/ThreadPlanCallFunction.cpp source/Target/ThreadPlanCallFunctionUsingABI.cpp test/expression_command/call-function/TestCallUserDefinedFunction.py test/expression_command/call-function/main.cpp Index: test/expression_command/call-function/main.cpp === --- test/expression_command/call-function/main.cpp +++ test/expression_command/call-function/main.cpp @@ -1,5 +1,6 @@ #include #include +#include struct Five { @@ -14,6 +15,30 @@ return my_five; } +unsigned int +fib(unsigned int n) +{ +if (n < 2) +return n; +else +return fib(n - 1) + fib(n - 2); +} + +int +add(int a, int b) +{ +return a + b; +} + +bool +stringCompare(const char *str) +{ +if (strcmp( str, "Hello world" ) == 0) +return true; +else +return false; +} + int main (int argc, char const *argv[]) { std::string str = "Hello world"; Index: test/expression_command/call-function/TestCallUserDefinedFunction.py === --- test/expression_command/call-function/TestCallUserDefinedFunction.py +++ test/expression_command/call-function/TestCallUserDefinedFunction.py @@ -0,0 +1,68 @@ +""" +Test calling user defined functions using expression evaluation. + +Note: + LLDBs first choice method of evaluating functions is using the IR interpreter, + which is currently only supported on Hexagon. Otherwise JIT is used for the evaluation. + +""" + +import unittest2 +import lldb +import lldbutil +from lldbtest import * + +class ExprCommandCallUserDefinedFunction(TestBase): + +mydir = TestBase.compute_mydir(__file__) + +def setUp(self): +# Call super's setUp(). +TestBase.setUp(self) +# Find the line number to break for main.c. +self.line = line_number('main.cpp', +'// Please test these expressions while stopped at this line:') +@skipUnlessDarwin +@dsym_test +@expectedFailureDarwin("llvm.org/pr20274") # intermittent failure on MacOSX +def test_with_dsym(self): +"""Test return values of user defined function calls.""" +self.buildDsym() +self.call_function() + +@dwarf_test +@expectedFailureFreeBSD("llvm.org/pr20274") # intermittent failure +def test_with_dwarf(self): +"""Test return values of user defined function calls.""" +self.buildDwarf() +self.call_functions() + +def call_functions(self): +"""Test return values of user defined function calls.""" + +# Set breakpoint in main and run exe +self.runCmd("file a.out", CURRENT_EXECUTABLE_SET) +lldbutil.run_break_set_by_file_and_line (self, "main.cpp", self.line, num_expected_locations=-1, loc_exact=True) + +self.runCmd("run", RUN_SUCCEEDED) + +# Test recursive function call. +self.expect("expr fib(5)", substrs = ['$0 = 5']) + +# Test function with more than one paramter +self.expect("expr add(4,8)", substrs = ['$1 = 12']) + +# Test nesting function calls in function paramters +self.expect("expr add(add(5,2),add(3,4))", substrs = ['$2 = 14']) +self.expect("expr add(add(5,2),fib(5))", substrs = ['$3 = 12']) + +# Test function with pointer paramter +self.expect("exp stringCompare((const char*) \"Hello world\")", substrs = ['$4 = true']) +self.expect("exp stringCompare((const char*) \"Hellworld\")", substrs = ['$5 = false']) + + +if __name__ == '__main__': +import atexit +lldb.SBDebugger.Initialize() +atexit.register(lambda: lldb.SBDebugger.Terminate()) +unittest2.main() Index: source/Target/ThreadPlanCallFunctionUsingABI.cpp === --- source/Target/ThreadPlanCallFunctionUsingABI.cpp +++ source/Target/ThreadPlanCallFunctionUsingABI.cpp @@ -0,0 +1,91 @@ +//===-- ThreadPlanCallFunctionUsingABI.cpp --*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the Universi
Re: [Lldb-commits] [PATCH] D10898: Fix typos
brucem updated this revision to Diff 28960. brucem added a comment. Minor update. Addresses concern raised by emaste. http://reviews.llvm.org/D10898 Files: examples/synthetic/unordered_multi.py source/Plugins/Platform/Linux/PlatformLinux.cpp source/Plugins/Platform/MacOSX/PlatformDarwinKernel.cpp source/Plugins/Process/MacOSX-Kernel/ProcessKDP.cpp source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp test/lang/c/stepping/TestStepAndBreakpoints.py test/lang/c/stepping/main.c Index: test/lang/c/stepping/main.c === --- test/lang/c/stepping/main.c +++ test/lang/c/stepping/main.c @@ -42,7 +42,7 @@ int complex (int first, int second, int third) { -return first + second + third; // Step in targetting complex should stop here +return first + second + third; // Step in targeting complex should stop here } int main (int argc, char const *argv[]) @@ -56,11 +56,11 @@ int A3 = a(3); // frame select 1, thread step-out while stopped at "c(3)" printf("a(3) returns %d\n", A3); -int A4 = complex (a(1), b(2), c(3)); // Stop here to try step in targetting b. +int A4 = complex (a(1), b(2), c(3)); // Stop here to try step in targeting b. -int A5 = complex (a(2), b(3), c(4)); // Stop here to try step in targetting complex. +int A5 = complex (a(2), b(3), c(4)); // Stop here to try step in targeting complex. -int A6 = complex (a(4), b(5), c(6)); // Stop here to step targetting b and hitting breakpoint. +int A6 = complex (a(4), b(5), c(6)); // Stop here to step targeting b and hitting breakpoint. int A7 = complex (a(5), b(6), c(7)); // Stop here to make sure bogus target steps over. Index: test/lang/c/stepping/TestStepAndBreakpoints.py === --- test/lang/c/stepping/TestStepAndBreakpoints.py +++ test/lang/c/stepping/TestStepAndBreakpoints.py @@ -185,17 +185,17 @@ self.assertTrue (thread.GetFrameAtIndex(0).GetLineEntry().GetLine() == current_line) self.assertTrue (thread.GetFrameAtIndex(0).GetLineEntry().GetFileSpec() == current_file) -# Now we are going to test step in targetting a function: +# Now we are going to test step in targeting a function: break_in_b.SetEnabled (False) -break_before_complex_1 = target.BreakpointCreateBySourceRegex ('// Stop here to try step in targetting b.', self.main_source_spec) +break_before_complex_1 = target.BreakpointCreateBySourceRegex ('// Stop here to try step in targeting b.', self.main_source_spec) self.assertTrue(break_before_complex_1, VALID_BREAKPOINT) -break_before_complex_2 = target.BreakpointCreateBySourceRegex ('// Stop here to try step in targetting complex.', self.main_source_spec) +break_before_complex_2 = target.BreakpointCreateBySourceRegex ('// Stop here to try step in targeting complex.', self.main_source_spec) self.assertTrue(break_before_complex_2, VALID_BREAKPOINT) -break_before_complex_3 = target.BreakpointCreateBySourceRegex ('// Stop here to step targetting b and hitting breakpoint.', self.main_source_spec) +break_before_complex_3 = target.BreakpointCreateBySourceRegex ('// Stop here to step targeting b and hitting breakpoint.', self.main_source_spec) self.assertTrue(break_before_complex_3, VALID_BREAKPOINT) break_before_complex_4 = target.BreakpointCreateBySourceRegex ('// Stop here to make sure bogus target steps over.', self.main_source_spec) @@ -218,7 +218,7 @@ thread.StepInto ("complex") self.assertTrue (thread.GetFrameAtIndex(0).GetFunctionName() == "complex") -# Now continue out and stop at the next call to complex. This time enable breakpoints in a and c and then step targetting b: +# Now continue out and stop at the next call to complex. This time enable breakpoints in a and c and then step targeting b: threads = lldbutil.continue_to_breakpoint (process, break_before_complex_3) self.assertTrue (len(threads) == 1) thread = threads[0] @@ -241,7 +241,7 @@ process.Continue() self.assertTrue (thread.GetFrameAtIndex(0).GetFunctionName() == "b") -# Now continue out and stop at the next call to complex. This time enable breakpoints in a and c and then step targetting b: +# Now continue out and stop at the next call to complex. This time enable breakpoints in a and c and then step targeting b: threads = lldbutil.continue_to_breakpoint (process, break_before_complex_4) self.assertTrue (len(threads) == 1) thread = threads[0] Index: source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp === --- source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp +++ source/Plugins/Process/gdb-remote/G
[Lldb-commits] [lldb] r241282 - Make sure we can lookup re-exported symbols after recent changes to lldb_private::Symbol.
Author: gclayton Date: Thu Jul 2 11:43:49 2015 New Revision: 241282 URL: http://llvm.org/viewvc/llvm-project?rev=241282&view=rev Log: Make sure we can lookup re-exported symbols after recent changes to lldb_private::Symbol. Recently lldb_private::Symbol was changed so the old code: Address &Symbol::GetAddress(); Is now: Address Symbol::GetAddress(); And the Address object that is returned will be invalid for non-address based symbols. When we have re-exported symbols this code would now fail: const Address sym_address = sym_ctx.symbol->GetAddress(); if (!sym_address.IsValid()) continue; symbol_load_addr = sym_ctx.symbol->ResolveCallableAddress(*target_sp); if (symbol_load_addr == LLDB_INVALID_ADDRESS) { symbol_load_addr = sym_address.GetLoadAddress(target_sp.get()); } It used to return an Address reference to the value of the re-exported symbol that contained no section and a zero value for Address.m_offset (since the original symbol in the symbol table had a value of zero). When a reference was returned, this meant the "sym_address.IsValid()" would return true because the Address.m_offset was not LLDB_INVALID_ADDRESS, it was zero. This was working by mistake. The Symbol::ResolveCallableAddress(...) actually checks for reexported symbols and whole bunch of other cases and resolves the address correctly, so we should let it do its thing and not cut it off before it can resolve the address with the "if (!sym_address.IsValid()) continue;". Modified: lldb/trunk/source/Expression/IRExecutionUnit.cpp Modified: lldb/trunk/source/Expression/IRExecutionUnit.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Expression/IRExecutionUnit.cpp?rev=241282&r1=241281&r2=241282&view=diff == --- lldb/trunk/source/Expression/IRExecutionUnit.cpp (original) +++ lldb/trunk/source/Expression/IRExecutionUnit.cpp Thu Jul 2 11:43:49 2015 @@ -676,20 +676,10 @@ IRExecutionUnit::MemoryManager::getSymbo SymbolContext sym_ctx; sc_list.GetContextAtIndex(i, sym_ctx); -if (sym_ctx.symbol->GetType() == lldb::eSymbolTypeUndefined) -continue; - -const Address sym_address = sym_ctx.symbol->GetAddress(); - -if (!sym_address.IsValid()) -continue; - symbol_load_addr = sym_ctx.symbol->ResolveCallableAddress(*target_sp); - + if (symbol_load_addr == LLDB_INVALID_ADDRESS) -{ -symbol_load_addr = sym_address.GetLoadAddress(target_sp.get()); -} +symbol_load_addr = sym_ctx.symbol->GetAddress().GetLoadAddress(target_sp.get()); } if (symbol_load_addr == LLDB_INVALID_ADDRESS && process_sp && name_cs) ___ lldb-commits mailing list lldb-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/lldb-commits
[Lldb-commits] [PATCH] D10902: Enable usage of eh_frame based unwind plan as a fallback
tberghammer created this revision. tberghammer added a reviewer: jasonmolenda. tberghammer added a subscriber: lldb-commits-list. Enable usage of eh_frame based unwind plan as a fallback Previously if the instruction emulation based unwind plan failed then we fall back to the arch default unwind plan. Change it to fall back to the eh_frame based one even on non call sites if we have eh_frame as that one tend to be more reliable. http://reviews.llvm.org/D10902 Files: source/Plugins/Process/Utility/RegisterContextLLDB.cpp Index: source/Plugins/Process/Utility/RegisterContextLLDB.cpp === --- source/Plugins/Process/Utility/RegisterContextLLDB.cpp +++ source/Plugins/Process/Utility/RegisterContextLLDB.cpp @@ -855,12 +855,26 @@ { if (unwind_plan_sp->GetSourcedFromCompiler() == eLazyBoolNo) { -// We probably have an UnwindPlan created by inspecting assembly instructions, and we probably -// don't have any eh_frame instructions available. -// The assembly profilers work really well with compiler-generated functions but hand-written -// assembly can be problematic. We'll set the architecture default UnwindPlan as our fallback -// UnwindPlan in case this doesn't work out when we try to unwind. -m_fallback_unwind_plan_sp = arch_default_unwind_plan_sp; +// We probably have an UnwindPlan created by inspecting assembly instructions. The +// assembly profilers work really well with compiler-generated functions but hand- +// written assembly can be problematic. We set the eh_frame based unwind plan as our +// fallback unwind plan if instruction emulation doesn't work out even for non call +// sites if it is available and use the architecture default unwind plan if it is +// not available. The eh_frame unwind plan is more reliable even on non call sites +// then the architecture default plan and for hand written assembly code it is often +// written in a way that it valid at all location what helps in the most common +// cases when the instruction emulation fails. +UnwindPlanSP eh_frame_unwind_plan = func_unwinders_sp->GetEHFrameUnwindPlan (process->GetTarget(), m_current_offset_backed_up_one); +if (eh_frame_unwind_plan && +eh_frame_unwind_plan.get() != unwind_plan_sp.get() && +eh_frame_unwind_plan->GetSourceName() != unwind_plan_sp->GetSourceName()) +{ +m_fallback_unwind_plan_sp = eh_frame_unwind_plan; +} +else +{ +m_fallback_unwind_plan_sp = arch_default_unwind_plan_sp; +} } UnwindLogMsgVerbose ("frame uses %s for full UnwindPlan", unwind_plan_sp->GetSourceName().GetCString()); return unwind_plan_sp; @@ -887,12 +901,25 @@ } if (unwind_plan_sp && unwind_plan_sp->GetSourcedFromCompiler() == eLazyBoolNo) { -// We probably have an UnwindPlan created by inspecting assembly instructions, and we probably -// don't have any eh_frame instructions available. -// The assembly profilers work really well with compiler-generated functions but hand-written -// assembly can be problematic. We'll set the architecture default UnwindPlan as our fallback -// UnwindPlan in case this doesn't work out when we try to unwind. -m_fallback_unwind_plan_sp = arch_default_unwind_plan_sp; +// We probably have an UnwindPlan created by inspecting assembly instructions. The assembly +// profilers work really well with compiler-generated functions but hand- written assembly +// can be problematic. We set the eh_frame based unwind plan as our fallback unwind plan if +// instruction emulation doesn't work out even for non call sites if it is available and use +// the architecture default unwind plan if it is not available. The eh_frame unwind plan is +// more reliable even on non call sites then the architecture default plan and for hand +// written assembly code it is often written in a way that it valid at all location what +// helps in the most common cases when the instruction emulation fails. +UnwindPlanSP eh_frame_unwind_plan = func_unwinders_sp->GetEHFrameUnwindPlan (process->GetTarget(), m_current_offset_backed_up_one); +if (eh_frame_unwind_plan && +eh_frame_unwind_plan.get() != unwind_plan_sp.get() && +eh_frame_unwind_plan->GetSourceName() != unwind_plan_sp->GetSourceName()) +{ +m_fallback_unwind_plan_sp = eh_frame_unwind_plan; +} +else +{ +
[Lldb-commits] [lldb] r241278 - Fix linking issue after r241271 (dbghelp.lib was removed from default dependencies on Windows)
Author: lkholodov Date: Thu Jul 2 10:54:13 2015 New Revision: 241278 URL: http://llvm.org/viewvc/llvm-project?rev=241278&view=rev Log: Fix linking issue after r241271 (dbghelp.lib was removed from default dependencies on Windows) Modified: lldb/trunk/source/Core/Mangled.cpp Modified: lldb/trunk/source/Core/Mangled.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/Mangled.cpp?rev=241278&r1=241277&r2=241278&view=diff == --- lldb/trunk/source/Core/Mangled.cpp (original) +++ lldb/trunk/source/Core/Mangled.cpp Thu Jul 2 10:54:13 2015 @@ -13,6 +13,7 @@ #if defined(_MSC_VER) #include "lldb/Host/windows/windows.h" #include +#pragma comment(lib, "dbghelp.lib") #define LLDB_USE_BUILTIN_DEMANGLER #elif defined (__FreeBSD__) #define LLDB_USE_BUILTIN_DEMANGLER ___ lldb-commits mailing list lldb-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [PATCH] D10898: Fix typos
emaste added a subscriber: emaste. emaste added a comment. One comment, otherwise looks fine to me if you've confirmed the tests pass. Comment at: examples/synthetic/unordered_multi.py:18 @@ -17,3 +17,3 @@ try: - # unordered_map is made up a a hash_map, which has 4 pieces in it: + # unordered_map is a made up hash_map, which has 4 pieces in it: # bucket list : My guess, "made up of a" was what was originally intended? http://reviews.llvm.org/D10898 ___ lldb-commits mailing list lldb-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [PATCH] Default to linking lldb-server statically for Android.
Chaoren, the fact that they are asking for rationale is a good clue that the rationale should be captured in comments. ___ lldb-commits mailing list lldb-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [PATCH] D10887: Use accept instead of accept4 for Android.
chaoren added a comment. We can't patch bugs on the system libc of shipped devices, while with static linking, we can avoid all but the latest bugs in the toolchain (which I think the toolchain guys would be more receptive to fixing). labath added a comment. In http://reviews.llvm.org/D10887#198526, @chaoren wrote: > Using a shim results in about a 5M increase in the lldb-server binary > > because of the need to export all symbols dynamically. And still has those > two bugs (which would be in the system libs, if linked dynamically). Couldn't this be avoided somehow (with some __attribute__ magic or something). In reality, we just need one symbol, "lldb_main", or such). And if that proves unfeasible and we have to statically link, I would prefer patching bugs in older libc over patching "features" in newer ones. http://reviews.llvm.org/D10887 http://reviews.llvm.org/D10887 ___ lldb-commits mailing list lldb-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [PATCH] Use accept instead of accept4 for Android.
There are bugs in the old libs/headers. Same toolchain. On Jul 2, 2015 8:08 AM, "Chaoren Lin" wrote: > I am statically linking against API-21. There are some bugs in the old > toolchains that can be avoided by doing this. Aside from this issue, the > resulting binary seem to run fine on API 10 devices (and passes most of the > test suite). > On Jul 2, 2015 02:33, "Tamas Berghammer" wrote: > >> I agree with Pavel that the toolchain shouldn't generate any source code >> what is using a missing syscall. I checked the implementation of accept on >> Gingerbread (API-9) and it is using the right syscall ( >> https://android.googlesource.com/platform/bionic/+/gingerbread-release/libc/arch-arm/syscalls/accept.S >> ). >> >> I am not sure what is causing this issue, but one of my guess is that you >> are statically linking against a wrong version of libc. >> >> >> http://reviews.llvm.org/D10887 >> >> EMAIL PREFERENCES >> http://reviews.llvm.org/settings/panel/emailpreferences/ >> >> >> ___ lldb-commits mailing list lldb-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [PATCH] D10899: Fix qMemoryRegionInfo packet to return current value for address after the last memory region
labath accepted this revision. labath added a comment. This revision is now accepted and ready to land. lgtm http://reviews.llvm.org/D10899 ___ lldb-commits mailing list lldb-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [PATCH] D10887: Use accept instead of accept4 for Android.
chaoren added a comment. That's what the shim does. You need to export the main symbol to call it with dlopen. http://reviews.llvm.org/D10887 ___ lldb-commits mailing list lldb-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/lldb-commits
[Lldb-commits] [PATCH] D10899: Fix qMemoryRegionInfo packet to return current value for address after the last memory region
tberghammer created this revision. tberghammer added a reviewer: labath. tberghammer added a subscriber: lldb-commits-list. http://reviews.llvm.org/D10899 Files: source/Plugins/Process/Linux/NativeProcessLinux.cpp Index: source/Plugins/Process/Linux/NativeProcessLinux.cpp === --- source/Plugins/Process/Linux/NativeProcessLinux.cpp +++ source/Plugins/Process/Linux/NativeProcessLinux.cpp @@ -2702,12 +2702,25 @@ // The target memory address comes somewhere after the region we just parsed. } -// If we made it here, we didn't find an entry that contained the given address. -error.SetErrorString ("address comes after final region"); - -if (log) -log->Printf ("NativeProcessLinux::%s failed to find map entry for address 0x%" PRIx64 ": %s", __FUNCTION__, load_addr, error.AsCString ()); - +// If we made it here, we didn't find an entry that contained the given address. Return the +// load_addr as start and the amount of bytes betwwen load address and the end of the memory as +// size. +range_info.GetRange ().SetRangeBase (load_addr); +switch (m_arch.GetAddressByteSize()) +{ +case 4: +range_info.GetRange ().SetByteSize (0x1ull - load_addr); +break; +case 8: +range_info.GetRange ().SetByteSize (0ull - load_addr); +break; +default: +assert(false && "Unrecognized data byte size"); +break; +} +range_info.SetReadable (MemoryRegionInfo::OptionalBool::eNo); +range_info.SetWritable (MemoryRegionInfo::OptionalBool::eNo); +range_info.SetExecutable (MemoryRegionInfo::OptionalBool::eNo); return error; } Index: source/Plugins/Process/Linux/NativeProcessLinux.cpp === --- source/Plugins/Process/Linux/NativeProcessLinux.cpp +++ source/Plugins/Process/Linux/NativeProcessLinux.cpp @@ -2702,12 +2702,25 @@ // The target memory address comes somewhere after the region we just parsed. } -// If we made it here, we didn't find an entry that contained the given address. -error.SetErrorString ("address comes after final region"); - -if (log) -log->Printf ("NativeProcessLinux::%s failed to find map entry for address 0x%" PRIx64 ": %s", __FUNCTION__, load_addr, error.AsCString ()); - +// If we made it here, we didn't find an entry that contained the given address. Return the +// load_addr as start and the amount of bytes betwwen load address and the end of the memory as +// size. +range_info.GetRange ().SetRangeBase (load_addr); +switch (m_arch.GetAddressByteSize()) +{ +case 4: +range_info.GetRange ().SetByteSize (0x1ull - load_addr); +break; +case 8: +range_info.GetRange ().SetByteSize (0ull - load_addr); +break; +default: +assert(false && "Unrecognized data byte size"); +break; +} +range_info.SetReadable (MemoryRegionInfo::OptionalBool::eNo); +range_info.SetWritable (MemoryRegionInfo::OptionalBool::eNo); +range_info.SetExecutable (MemoryRegionInfo::OptionalBool::eNo); return error; } ___ lldb-commits mailing list lldb-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [PATCH] D10887: Use accept instead of accept4 for Android.
labath added a comment. In http://reviews.llvm.org/D10887#198526, @chaoren wrote: > Using a shim results in about a 5M increase in the lldb-server binary > because of the need to export all symbols dynamically. And still has those > two bugs (which would be in the system libs, if linked dynamically). Couldn't this be avoided somehow (with some __attribute__ magic or something). In reality, we just need one symbol, "lldb_main", or such). And if that proves unfeasible and we have to statically link, I would prefer patching bugs in older libc over patching "features" in newer ones. http://reviews.llvm.org/D10887 ___ lldb-commits mailing list lldb-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [PATCH] D10887: Use accept instead of accept4 for Android.
For reference, the gdbserver binary currently in the toolchain is statically linked. Using a shim results in about a 5M increase in the lldb-server binary because of the need to export all symbols dynamically. And still has those two bugs (which would be in the system libs, if linked dynamically). On Jul 2, 2015 08:32, "Pavel Labath" wrote: > labath added a comment. > > In http://reviews.llvm.org/D10887#198515, @chaoren wrote: > > > - b.android.com/178448 > > - pthread_sigmask doesn't work at all in the older toolchains > > > > The only possible problems I can see right now are missing syscalls, > and we can easily get a diff of those between API 21 and API 9. > > > The sentence "in general, statically linked binaries are compatible with > neither older nor newer releases, especially where networking is concerned" > from the bug leads me to believe that we should reconsider the static > linking approach. I would normally expect these to be at least forward > compatible, but if they don't guarantee even that, I think we should go > back to the idea of using a non-pie shim process to load the lldb-server on > old devices. Otherwise, we can encounter subtle and annoying breakages, > which I would prefer to avoid. > > > http://reviews.llvm.org/D10887 > > > > ___ lldb-commits mailing list lldb-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/lldb-commits
[Lldb-commits] [PATCH] D10898: Fix typos
brucem created this revision. brucem added a reviewer: clayborg. brucem added a subscriber: lldb-commits-list. Fixes more typos. http://reviews.llvm.org/D10898 Files: examples/synthetic/unordered_multi.py source/Plugins/Platform/Linux/PlatformLinux.cpp source/Plugins/Platform/MacOSX/PlatformDarwinKernel.cpp source/Plugins/Process/MacOSX-Kernel/ProcessKDP.cpp source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp test/lang/c/stepping/TestStepAndBreakpoints.py test/lang/c/stepping/main.c Index: test/lang/c/stepping/main.c === --- test/lang/c/stepping/main.c +++ test/lang/c/stepping/main.c @@ -42,7 +42,7 @@ int complex (int first, int second, int third) { -return first + second + third; // Step in targetting complex should stop here +return first + second + third; // Step in targeting complex should stop here } int main (int argc, char const *argv[]) @@ -56,11 +56,11 @@ int A3 = a(3); // frame select 1, thread step-out while stopped at "c(3)" printf("a(3) returns %d\n", A3); -int A4 = complex (a(1), b(2), c(3)); // Stop here to try step in targetting b. +int A4 = complex (a(1), b(2), c(3)); // Stop here to try step in targeting b. -int A5 = complex (a(2), b(3), c(4)); // Stop here to try step in targetting complex. +int A5 = complex (a(2), b(3), c(4)); // Stop here to try step in targeting complex. -int A6 = complex (a(4), b(5), c(6)); // Stop here to step targetting b and hitting breakpoint. +int A6 = complex (a(4), b(5), c(6)); // Stop here to step targeting b and hitting breakpoint. int A7 = complex (a(5), b(6), c(7)); // Stop here to make sure bogus target steps over. Index: test/lang/c/stepping/TestStepAndBreakpoints.py === --- test/lang/c/stepping/TestStepAndBreakpoints.py +++ test/lang/c/stepping/TestStepAndBreakpoints.py @@ -185,17 +185,17 @@ self.assertTrue (thread.GetFrameAtIndex(0).GetLineEntry().GetLine() == current_line) self.assertTrue (thread.GetFrameAtIndex(0).GetLineEntry().GetFileSpec() == current_file) -# Now we are going to test step in targetting a function: +# Now we are going to test step in targeting a function: break_in_b.SetEnabled (False) -break_before_complex_1 = target.BreakpointCreateBySourceRegex ('// Stop here to try step in targetting b.', self.main_source_spec) +break_before_complex_1 = target.BreakpointCreateBySourceRegex ('// Stop here to try step in targeting b.', self.main_source_spec) self.assertTrue(break_before_complex_1, VALID_BREAKPOINT) -break_before_complex_2 = target.BreakpointCreateBySourceRegex ('// Stop here to try step in targetting complex.', self.main_source_spec) +break_before_complex_2 = target.BreakpointCreateBySourceRegex ('// Stop here to try step in targeting complex.', self.main_source_spec) self.assertTrue(break_before_complex_2, VALID_BREAKPOINT) -break_before_complex_3 = target.BreakpointCreateBySourceRegex ('// Stop here to step targetting b and hitting breakpoint.', self.main_source_spec) +break_before_complex_3 = target.BreakpointCreateBySourceRegex ('// Stop here to step targeting b and hitting breakpoint.', self.main_source_spec) self.assertTrue(break_before_complex_3, VALID_BREAKPOINT) break_before_complex_4 = target.BreakpointCreateBySourceRegex ('// Stop here to make sure bogus target steps over.', self.main_source_spec) @@ -218,7 +218,7 @@ thread.StepInto ("complex") self.assertTrue (thread.GetFrameAtIndex(0).GetFunctionName() == "complex") -# Now continue out and stop at the next call to complex. This time enable breakpoints in a and c and then step targetting b: +# Now continue out and stop at the next call to complex. This time enable breakpoints in a and c and then step targeting b: threads = lldbutil.continue_to_breakpoint (process, break_before_complex_3) self.assertTrue (len(threads) == 1) thread = threads[0] @@ -241,7 +241,7 @@ process.Continue() self.assertTrue (thread.GetFrameAtIndex(0).GetFunctionName() == "b") -# Now continue out and stop at the next call to complex. This time enable breakpoints in a and c and then step targetting b: +# Now continue out and stop at the next call to complex. This time enable breakpoints in a and c and then step targeting b: threads = lldbutil.continue_to_breakpoint (process, break_before_complex_4) self.assertTrue (len(threads) == 1) thread = threads[0] Index: source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp === --- source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp +++ source/Plugins/Process/gd
Re: [Lldb-commits] [PATCH] D10887: Use accept instead of accept4 for Android.
chaoren added a comment. For reference, the gdbserver binary currently in the toolchain is statically linked. Using a shim results in about a 5M increase in the lldb-server binary because of the need to export all symbols dynamically. And still has those two bugs (which would be in the system libs, if linked dynamically). http://reviews.llvm.org/D10887 ___ lldb-commits mailing list lldb-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] r241276 - Remove outdated comment.
Author: chaoren Date: Thu Jul 2 10:30:59 2015 New Revision: 241276 URL: http://llvm.org/viewvc/llvm-project?rev=241276&view=rev Log: Remove outdated comment. Modified: lldb/trunk/test/functionalities/watchpoint/hello_watchpoint/TestMyFirstWatchpoint.py Modified: lldb/trunk/test/functionalities/watchpoint/hello_watchpoint/TestMyFirstWatchpoint.py URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/watchpoint/hello_watchpoint/TestMyFirstWatchpoint.py?rev=241276&r1=241275&r2=241276&view=diff == --- lldb/trunk/test/functionalities/watchpoint/hello_watchpoint/TestMyFirstWatchpoint.py (original) +++ lldb/trunk/test/functionalities/watchpoint/hello_watchpoint/TestMyFirstWatchpoint.py Thu Jul 2 10:30:59 2015 @@ -38,7 +38,6 @@ class HelloWatchpointTestCase(TestBase): self.line = line_number(self.source, '// Set break point at this line.') # And the watchpoint variable declaration line number. self.decl = line_number(self.source, '// Watchpoint variable declaration.') -# Build dictionary to have unique executable names for each test method. self.exe_name = 'a.out' self.d = {'C_SOURCES': self.source, 'EXE': self.exe_name} ___ lldb-commits mailing list lldb-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [PATCH] Change executable name to a.out.
Oops. Yeah, that doesn't make sense anymore. I'll remove it. On Jul 2, 2015 04:06, "Bruce Mitchener" wrote: > REPOSITORY > rL LLVM > > > Comment at: > lldb/trunk/test/functionalities/watchpoint/hello_watchpoint/TestMyFirstWatchpoint.py:41 > @@ -40,2 +40,3 @@ > self.decl = line_number(self.source, '// Watchpoint variable > declaration.') > # Build dictionary to have unique executable names for each test > method. > +self.exe_name = 'a.out' > > A bit late, but shouldn't this comment be updated? > > http://reviews.llvm.org/D10888 > > EMAIL PREFERENCES > http://reviews.llvm.org/settings/panel/emailpreferences/ > > > ___ lldb-commits mailing list lldb-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [PATCH] D10887: Use accept instead of accept4 for Android.
chaoren added a comment. - b.android.com/178448 - pthread_sigmask doesn't work at all in the older toolchains The only possible problems I can see right now are missing syscalls, and we can easily get a diff of those between API 21 and API 9. labath requested changes to this revision. labath added a reviewer: labath. labath added a comment. What kind of bugs are we talking about? I find the idea of using an API 21-built binary and running it on an older device extremely troubling, and I would not trust it even if it did seem to work. I think we should find another way to achive this. http://reviews.llvm.org/D10887 http://reviews.llvm.org/D10887 ___ lldb-commits mailing list lldb-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [PATCH] D10887: Use accept instead of accept4 for Android.
chaoren added a subscriber: chaoren. chaoren added a comment. I am statically linking against API-21. There are some bugs in the old toolchains that can be avoided by doing this. Aside from this issue, the resulting binary seem to run fine on API 10 devices (and passes most of the test suite). http://reviews.llvm.org/D10887 ___ lldb-commits mailing list lldb-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [PATCH] D10850: Fix TestCreateAfterAttach on Windows
labath accepted this revision. This revision is now accepted and ready to land. Comment at: test/functionalities/thread/create_after_attach/TestCreateAfterAttach.py:93 @@ -90,1 +92,3 @@ + 'main', + 'stop reason = breakpoint']) amccarth wrote: > chaoren wrote: > > amccarth wrote: > > > chaoren wrote: > > > > amccarth wrote: > > > > > labath wrote: > > > > > > I think this would be a good time to switch from substring matching > > > > > > to checking things properly using the SBAPI. Right now, it's > > > > > > getting quite hard to tell what this tests exactly, and if the all > > > > > > edge cases are treated properly (e.g. what would happen if one > > > > > > thread stops in "main", but some other thread has "stop reason = > > > > > > breakpoint"). lldbutil has a lot of wrappers to make it easy to use > > > > > > the python api. For example, this fragment could be written way > > > > > > more robustly like this: > > > > > > ``` > > > > > > threads = lldbutil.continue_to_breakpoint(process, 1) # run to > > > > > > first breakpoint > > > > > > self.assertEquals(len(threads), 1) > > > > > > self.assertEquals(threads[0].GetFrameAtIndex(0).GetFunctionName(), > > > > > > "main") > > > > > > ``` > > > > > > (disclaimer: I did not test this code, but I believe you get the > > > > > > idea) > > > > > I agree that should be done, but I would prefer to do it later, in a > > > > > separate patch. This patch has been blocked for two weeks while I > > > > > tracked down the problem with the confusion between the thread resume > > > > > state and the thread temporary resume state in the Windows > > > > > implementation. Further modification of the test increases the risk > > > > > of breaking it for other platforms than the one I'm focused on. > > > > > > > > > > There are higher priority things now. For example, because of some > > > > > crashing tests, simply running ninja check-lldb hangs, leaving dozens > > > > > of orphaned processes. > > > > ``` > > > > self.assertEquals(len(threads), 1) > > > > ``` > > > > > > > > I don't think you can make any assumptions on the number of threads > > > > because of the thread pool. But it is an important assertion to make on > > > > other platforms. > > > At this point, even on other platforms, there are at least two threads at > > > this point: the main thread, and the one spawned before this breakpoint. > > > > > > I could do self.assertGreaterEqual(len(threads), 2), if you think that's > > > useful. > > I think it's useful to assert to exact number of threads, and the creation > > order of those threads, and we'd still have a problem even if using the SB > > api. Perhaps you could create a Windows version of this test case where > > thread numbers/order don't matter and disable this one? > I don't see the value in basing the test on the implementation details of > either threading library (pthreads or std::thread), especially when you weigh > that against the maintenance costs of having different tests for different > platforms. > > Note that the original test didn't even do exactly what you're asking for, > since it also created a thread before attaching to the process. This change > makes the test no worse. What it does is make it useful for Windows as well > as the other platforms. And, in fact, it helped us find a Windows specific > bug which must also be fixed and is the most important part of this patch. > > If you like, I could move the creation of the first auxiliary thread until > after the attach, which would allow us to assert that there's exactly one > thread as you suggested, and would also address Pavel's concern that we're > actually creating the thread after the attach. >`self.assertEquals(len(threads), 1)` >I don't think you can make any assumptions on the number of threads because of >the thread pool. But it is an important assertion to make on other platforms. >At this point, even on other platforms, there are at least two threads at this >point: the main thread, and the one spawned before this breakpoint. Perhaps it was not clear from the snippet, but `continue_to_breakpoint` returns only the threads that are stopped at the breakpoint, which should be exactly 1 in all cases. This is why I am trying to push this idea. With the SBAPI, you can test *exactly* the condition you want, relying on string matching is always going to be fragile. >This patch has been blocked for two weeks while I tracked down the problem >with the confusion between the thread resume state and the thread temporary >resume state in the Windows implementation. Further modification of the test >increases the risk of breaking it for other platforms than the one I'm focused >on. I know windows implementation still has a long way to go, and I am sorry if the review process is slowing you down. However, I feel that compared to 2 weeks fixing the bug, spe
[Lldb-commits] [PATCH] D10895: Fix dosep.py on windows after r240946
labath created this revision. labath added a reviewer: amccarth. labath added a subscriber: lldb-commits-list. On windows, global python variables are not automatically passed to child processes. This commit makes sure the default timeout value is available to child processes by passing it directly. I pass the whole dotest_opts value to the children, so we can use the other members as well if we need to do it in the future. http://reviews.llvm.org/D10895 Files: test/dosep.py Index: test/dosep.py === --- test/dosep.py +++ test/dosep.py @@ -67,12 +67,14 @@ output_lock = None test_counter = None total_tests = None +dotest_options = None -def setup_lock_and_counter(lock, counter, total): -global output_lock, test_counter, total_tests +def setup_global_variables(lock, counter, total, options): +global output_lock, test_counter, total_tests, dotest_options output_lock = lock test_counter = counter total_tests = total +dotest_options = options def update_status(name = None, command = None, output = None): global output_lock, test_counter, total_tests @@ -152,7 +154,7 @@ timeout_name = os.path.basename(os.path.splitext(name)[0]).upper() -timeout = os.getenv("LLDB_%s_TIMEOUT" % timeout_name) or default_timeout +timeout = os.getenv("LLDB_%s_TIMEOUT" % timeout_name) or getDefaultTimeout(dotest_options.lldb_platform_name) exit_status, pass_count, fail_count = call_with_timeout(command, timeout, name) @@ -202,8 +204,8 @@ # calling each individually. if num_threads > 1: pool = multiprocessing.Pool(num_threads, -initializer = setup_lock_and_counter, -initargs = (output_lock, test_counter, total_tests)) +initializer = setup_global_variables, +initargs = (output_lock, test_counter, total_tests, dotest_options)) test_results = pool.map(process_dir_worker, test_work_items) else: test_results = [] @@ -336,6 +338,7 @@ dotest_argv = shlex.split(dotest_option_string, posix=is_posix) if dotest_option_string else [] parser = dotest_args.create_parser() +global dotest_options dotest_options = dotest_args.parse_args(parser, dotest_argv) if not dotest_options.s: @@ -372,9 +375,6 @@ if num_threads < 1: num_threads = 1 -global default_timeout -default_timeout = getDefaultTimeout(dotest_options.lldb_platform_name) - system_info = " ".join(platform.uname()) (timed_out, failed, passed, all_fails, all_passes) = walk_and_invoke(test_directory, test_subdir, dotest_argv, num_threads) Index: test/dosep.py === --- test/dosep.py +++ test/dosep.py @@ -67,12 +67,14 @@ output_lock = None test_counter = None total_tests = None +dotest_options = None -def setup_lock_and_counter(lock, counter, total): -global output_lock, test_counter, total_tests +def setup_global_variables(lock, counter, total, options): +global output_lock, test_counter, total_tests, dotest_options output_lock = lock test_counter = counter total_tests = total +dotest_options = options def update_status(name = None, command = None, output = None): global output_lock, test_counter, total_tests @@ -152,7 +154,7 @@ timeout_name = os.path.basename(os.path.splitext(name)[0]).upper() -timeout = os.getenv("LLDB_%s_TIMEOUT" % timeout_name) or default_timeout +timeout = os.getenv("LLDB_%s_TIMEOUT" % timeout_name) or getDefaultTimeout(dotest_options.lldb_platform_name) exit_status, pass_count, fail_count = call_with_timeout(command, timeout, name) @@ -202,8 +204,8 @@ # calling each individually. if num_threads > 1: pool = multiprocessing.Pool(num_threads, -initializer = setup_lock_and_counter, -initargs = (output_lock, test_counter, total_tests)) +initializer = setup_global_variables, +initargs = (output_lock, test_counter, total_tests, dotest_options)) test_results = pool.map(process_dir_worker, test_work_items) else: test_results = [] @@ -336,6 +338,7 @@ dotest_argv = shlex.split(dotest_option_string, posix=is_posix) if dotest_option_string else [] parser = dotest_args.create_parser() +global dotest_options dotest_options = dotest_args.parse_args(parser, dotest_argv) if not dotest_options.s: @@ -372,9 +375,6 @@ if num_threads < 1: num_threads = 1 -global default_timeout -default_timeout = getDefaultTimeout(dotest_options.lldb_platform_name) - system_info = " ".join(platform.uname()) (timed_out, failed, passed, all_fails, all_passes) = walk_and_invoke(test_directory, test_subdir, dotest_argv, num_threads) ___ lldb-commits mailing list lldb-com
Re: [Lldb-commits] [PATCH] Change executable name to a.out.
REPOSITORY rL LLVM Comment at: lldb/trunk/test/functionalities/watchpoint/hello_watchpoint/TestMyFirstWatchpoint.py:41 @@ -40,2 +40,3 @@ self.decl = line_number(self.source, '// Watchpoint variable declaration.') # Build dictionary to have unique executable names for each test method. +self.exe_name = 'a.out' A bit late, but shouldn't this comment be updated? http://reviews.llvm.org/D10888 EMAIL PREFERENCES http://reviews.llvm.org/settings/panel/emailpreferences/ ___ lldb-commits mailing list lldb-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [PATCH] Add new bugreport command to lldb
REPOSITORY rL LLVM http://reviews.llvm.org/D10868 Files: lldb/trunk/lldb.xcodeproj/project.pbxproj lldb/trunk/source/Commands/CMakeLists.txt lldb/trunk/source/Commands/CommandObjectBugreport.cpp lldb/trunk/source/Commands/CommandObjectBugreport.h lldb/trunk/source/Interpreter/CommandInterpreter.cpp EMAIL PREFERENCES http://reviews.llvm.org/settings/panel/emailpreferences/ Index: lldb/trunk/lldb.xcodeproj/project.pbxproj === --- lldb/trunk/lldb.xcodeproj/project.pbxproj +++ lldb/trunk/lldb.xcodeproj/project.pbxproj @@ -694,6 +694,7 @@ 6D55BAED1A8CD0A800A70529 /* PlatformAndroid.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6D55BAE91A8CD08C00A70529 /* PlatformAndroid.cpp */; }; 6D55BAEE1A8CD0B200A70529 /* PlatformAndroidRemoteGDBServer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6D55BAEB1A8CD08C00A70529 /* PlatformAndroidRemoteGDBServer.cpp */; }; 6D762BEE1B1605D2006C929D /* LLDBServerUtilities.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6D762BEC1B1605CD006C929D /* LLDBServerUtilities.cpp */; }; + 6D86CEA01B440F8500A7FBFA /* CommandObjectBugreport.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6D86CE9E1B440F6B00A7FBFA /* CommandObjectBugreport.cpp */; }; 8C2D6A53197A1EAF006989C9 /* MemoryHistory.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8C2D6A52197A1EAF006989C9 /* MemoryHistory.cpp */; }; 8C2D6A5E197A250F006989C9 /* MemoryHistoryASan.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8C2D6A5A197A1FDC006989C9 /* MemoryHistoryASan.cpp */; }; 8CCB017E19BA28A80009FD44 /* ThreadCollection.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8CCB017A19BA283D0009FD44 /* ThreadCollection.cpp */; }; @@ -2340,6 +2341,8 @@ 6D55BAEC1A8CD08C00A70529 /* PlatformAndroidRemoteGDBServer.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PlatformAndroidRemoteGDBServer.h; sourceTree = ""; }; 6D762BEC1B1605CD006C929D /* LLDBServerUtilities.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = LLDBServerUtilities.cpp; path = "tools/lldb-server/LLDBServerUtilities.cpp"; sourceTree = ""; }; 6D762BED1B1605CD006C929D /* LLDBServerUtilities.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = LLDBServerUtilities.h; path = "tools/lldb-server/LLDBServerUtilities.h"; sourceTree = ""; }; + 6D86CE9E1B440F6B00A7FBFA /* CommandObjectBugreport.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = CommandObjectBugreport.cpp; path = source/Commands/CommandObjectBugreport.cpp; sourceTree = ""; }; + 6D86CE9F1B440F6B00A7FBFA /* CommandObjectBugreport.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = CommandObjectBugreport.h; path = source/Commands/CommandObjectBugreport.h; sourceTree = ""; }; 8C2D6A52197A1EAF006989C9 /* MemoryHistory.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = MemoryHistory.cpp; path = source/Target/MemoryHistory.cpp; sourceTree = ""; }; 8C2D6A54197A1EBE006989C9 /* MemoryHistory.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = MemoryHistory.h; path = include/lldb/Target/MemoryHistory.h; sourceTree = ""; }; 8C2D6A5A197A1FDC006989C9 /* MemoryHistoryASan.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MemoryHistoryASan.cpp; sourceTree = ""; }; @@ -4232,6 +4235,8 @@ 26BC7E2D10F1B84700F91463 /* CommandObjectBreakpoint.cpp */, 9A42976111861A9F00FE05CD /* CommandObjectBreakpointCommand.h */, 9A42976211861AA600FE05CD /* CommandObjectBreakpointCommand.cpp */, +6D86CE9F1B440F6B00A7FBFA /* CommandObjectBugreport.h */, +6D86CE9E1B440F6B00A7FBFA /* CommandObjectBugreport.cpp */, 4C5DBBC711E3FEC60035160F /* CommandObjectCommands.h */, 4C5DBBC611E3FEC60035160F /* CommandObjectCommands.cpp */, 26BC7D1710F1B76300F91463 /* CommandObjectDisassemble.h */, @@ -6393,6 +6398,7 @@ 260CC64A15D0440D002BF2E0 /* OptionValueBoolean.cpp in Sources */, 260CC64B15D0440D002BF2E0 /* OptionValueProperties.cpp in Sources */, 3FDFED0C19B7C8E7009756A7 /* ThisThread.cpp in Sources */, +6D86CEA01B440F8500A7FBFA /* CommandObjectBugreport.cpp in Sources */, 260CC64C15D0440D002BF2E0 /* OptionValueDictionary.cpp in Sources */, 49DCF6FE170E6B4A0092F75E /* IRMemoryMap.cpp in Sources */, 260CC64D15D0440D002BF2E0 /* OptionValueEnumeration.cpp in Sources */, Index: lldb/trunk/source/Commands/CMakeLists.txt === --- lldb/trunk/source/Commands/CMakeLists.txt +++ lldb/trunk/source/Commands/CMakeLists.txt @@ -6,6 +6,7 @@ CommandObjectArgs.cpp CommandObjectBreakpoint.cpp CommandObjectBreakpointCommand.cpp + CommandObjectBugreport.cpp CommandObjectCommands.cpp CommandObjectDisassemble.cpp CommandObjectExpression.cpp Index: lldb/trunk
Re: [Lldb-commits] [PATCH] Default to linking lldb-server statically for Android.
What is the implication of this change in terms of the size of lldb-server? You are linking statically against the system libraries (such as libc, libm, libdl) what might not be a portable solution if they are depending on features only present in some device / kernel. http://reviews.llvm.org/D10858 EMAIL PREFERENCES http://reviews.llvm.org/settings/panel/emailpreferences/ ___ lldb-commits mailing list lldb-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [PATCH] Use accept instead of accept4 for Android.
Just to confirm: Which toolchain are you using to compile this? It sounds like the android-9 toolchain has serious problems if it produces executables that do not run on an android-9 device... Also, I know that this file already has a number of #ifdefs, but this is by far the most complicated one. It would be good if we could bury this detail somewhere deep inside Host/linux or Host/android. For example, we could define our own Accept4 call, which normally just calls accept4, but under the right conditions, it would fall back to the hack you did here. Something similar to what we do for process_vm_readv already... http://reviews.llvm.org/D10887 EMAIL PREFERENCES http://reviews.llvm.org/settings/panel/emailpreferences/ ___ lldb-commits mailing list lldb-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/lldb-commits