[Lldb-commits] [lldb] r249299 - [LLDB][MIPS] Skip invalid size watchpoint testcase for MIPS
Author: mohit.bhakkad Date: Mon Oct 5 05:56:19 2015 New Revision: 249299 URL: http://llvm.org/viewvc/llvm-project?rev=249299&view=rev Log: [LLDB][MIPS] Skip invalid size watchpoint testcase for MIPS Reviewers: jaydeep. Subscribers: lldb-commits. Differential Revision: http://reviews.llvm.org/D13335 Modified: lldb/trunk/test/python_api/watchpoint/watchlocation/TestTargetWatchAddress.py Modified: lldb/trunk/test/python_api/watchpoint/watchlocation/TestTargetWatchAddress.py URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/python_api/watchpoint/watchlocation/TestTargetWatchAddress.py?rev=249299&r1=249298&r2=249299&view=diff == --- lldb/trunk/test/python_api/watchpoint/watchlocation/TestTargetWatchAddress.py (original) +++ lldb/trunk/test/python_api/watchpoint/watchlocation/TestTargetWatchAddress.py Mon Oct 5 05:56:19 2015 @@ -87,6 +87,7 @@ class TargetWatchAddressAPITestCase(Test @python_api_test @expectedFailureAndroid(archs=['arm', 'aarch64']) # Watchpoints not supported +@skipIf(archs=['mips', 'mipsel', 'mips64', 'mips64el']) # No size constraint on MIPS for watches def test_watch_address_with_invalid_watch_size(self): """Exercise SBTarget.WatchAddress() API but pass an invalid watch_size.""" self.build() ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] r249377 - [LLDB][MIPS] Fix hit_count for mips watchpoints
Author: mohit.bhakkad Date: Tue Oct 6 00:25:17 2015 New Revision: 249377 URL: http://llvm.org/viewvc/llvm-project?rev=249377&view=rev Log: [LLDB][MIPS] Fix hit_count for mips watchpoints Reviewers: clayborg, jingham. Subscribers: jaydeep, bhushan, dsanders, sagar, nitesh.jain, zturner, jasonmolenda, lldb-commits. Differential Revision: http://reviews.llvm.org/D13241 Modified: lldb/trunk/source/Target/StopInfo.cpp Modified: lldb/trunk/source/Target/StopInfo.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Target/StopInfo.cpp?rev=249377&r1=249376&r2=249377&view=diff == --- lldb/trunk/source/Target/StopInfo.cpp (original) +++ lldb/trunk/source/Target/StopInfo.cpp Tue Oct 6 00:25:17 2015 @@ -757,9 +757,12 @@ protected: { WatchpointSP wp_hit_sp = thread_sp->CalculateTarget()->GetWatchpointList().FindByAddress(m_watch_hit_addr); if (!wp_hit_sp) +{ m_should_stop = false; +wp_sp->IncrementFalseAlarmsAndReviseHitCount(); +} } - + if (m_should_stop && wp_sp->GetConditionText() != NULL) { // We need to make sure the user sees any parse errors in their condition, so we'll hook the ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] r249651 - [LLDB][MIPS] microMIPS load/store instruction emulation for hardware watchpoints
Author: mohit.bhakkad Date: Wed Oct 7 22:34:11 2015 New Revision: 249651 URL: http://llvm.org/viewvc/llvm-project?rev=249651&view=rev Log: [LLDB][MIPS] microMIPS load/store instruction emulation for hardware watchpoints Reviewers: clayborg. Subscribers: jaydeep, bhushan, sagar, nitesh.jain, lldb-commits. Differential Revision: http://reviews.llvm.org/D13493 Modified: lldb/trunk/source/Plugins/Instruction/MIPS/EmulateInstructionMIPS.cpp Modified: lldb/trunk/source/Plugins/Instruction/MIPS/EmulateInstructionMIPS.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Instruction/MIPS/EmulateInstructionMIPS.cpp?rev=249651&r1=249650&r2=249651&view=diff == --- lldb/trunk/source/Plugins/Instruction/MIPS/EmulateInstructionMIPS.cpp (original) +++ lldb/trunk/source/Plugins/Instruction/MIPS/EmulateInstructionMIPS.cpp Wed Oct 7 22:34:11 2015 @@ -546,6 +546,9 @@ EmulateInstructionMIPS::GetOpcodeForInst { "LWR",&EmulateInstructionMIPS::Emulate_LDST_Imm, "LWR rt, offset(base)" }, { "LWRE", &EmulateInstructionMIPS::Emulate_LDST_Imm, "LWRE rt, offset(base)" }, { "LWXC1", &EmulateInstructionMIPS::Emulate_LDST_Reg, "LWXC1 fd, index (base)" }, +{ "LLX",&EmulateInstructionMIPS::Emulate_LDST_Imm, "LLX rt, offset(base)" }, +{ "LLXE", &EmulateInstructionMIPS::Emulate_LDST_Imm, "LLXE rt, offset(base)" }, +{ "LLDX", &EmulateInstructionMIPS::Emulate_LDST_Imm, "LLDX rt, offset(base)" }, { "SB", &EmulateInstructionMIPS::Emulate_LDST_Imm, "SBrt, offset(base)" }, { "SBE",&EmulateInstructionMIPS::Emulate_LDST_Imm, "SBE rt, offset(base)" }, @@ -569,6 +572,21 @@ EmulateInstructionMIPS::GetOpcodeForInst { "SWR",&EmulateInstructionMIPS::Emulate_LDST_Imm, "SWR rt, offset(base)" }, { "SWRE", &EmulateInstructionMIPS::Emulate_LDST_Imm, "SWRE rt, offset(base)" }, { "SWXC1", &EmulateInstructionMIPS::Emulate_LDST_Reg, "SWXC1 fs, index (base)" }, +{ "SCX",&EmulateInstructionMIPS::Emulate_LDST_Imm, "SCX rt, offset(base)" }, +{ "SCXE", &EmulateInstructionMIPS::Emulate_LDST_Imm, "SCXE rt, offset(base)" }, +{ "SCDX", &EmulateInstructionMIPS::Emulate_LDST_Imm, "SCDX rt, offset(base)" }, + + //-- +// MicroMIPS Load/Store instructions + //-- +{ "LBU16_MM", &EmulateInstructionMIPS::Emulate_LDST_Imm, "LBU16 rt, decoded_offset(base)" }, +{ "LHU16_MM", &EmulateInstructionMIPS::Emulate_LDST_Imm, "LHU16 rt, left_shifted_offset(base)" }, +{ "LW16_MM", &EmulateInstructionMIPS::Emulate_LDST_Imm, "LW16 rt, left_shifted_offset(base)" }, +{ "LWGP_MM", &EmulateInstructionMIPS::Emulate_LDST_Imm, "LWGP rt, left_shifted_offset(gp)"}, +{ "SH16_MM", &EmulateInstructionMIPS::Emulate_LDST_Imm, "SH16 rt, left_shifted_offset(base)" }, +{ "SW16_MM", &EmulateInstructionMIPS::Emulate_LDST_Imm, "SW16 rt, left_shifted_offset(base)" }, +{ "SW_MM", &EmulateInstructionMIPS::Emulate_LDST_Imm, "SWSP rt, left_shifted_offset(base)" }, +{ "SB16_MM", &EmulateInstructionMIPS::Emulate_LDST_Imm, "SB16 rt, offset(base)" }, //-- // Branch instructions @@ -1097,10 +1115,30 @@ EmulateInstructionMIPS::Emulate_SWSP (ll bool success = false; uint32_t imm5 = insn.getOperand(2).getImm(); uint32_t src, base; +Context bad_vaddr_context; +uint32_t address; src = m_reg_info->getEncodingValue (insn.getOperand(0).getReg()); base = m_reg_info->getEncodingValue (insn.getOperand(1).getReg()); +RegisterInfo reg_info_base; + +if (!GetRegisterInfo (eRegisterKindDWARF, dwarf_zero_mips + base, reg_info_base)) +return false; + +// read base register +address = ReadRegisterUnsigned (eRegisterKindDWARF, dwarf_zero_mips + base, 0, &success); +if (!success) +return false; + +// destination address +address = address + imm5; + +// We use bad_vaddr_context to store base address which is used by H/W watchpoint +// Set the bad_vaddr register with base address used in the instruction +bad_vaddr_context.type = eContextInvalid; +WriteRegisterUnsigned (bad_vaddr_context, eRegisterKindDWARF, dwarf_bad_mips, address); + // We look for sp based non-volatile register stores. if (base == dwarf_sp_mips && nonvol
[Lldb-commits] [lldb] r249809 - Addressing warning due to rL249651
Author: mohit.bhakkad Date: Fri Oct 9 01:34:52 2015 New Revision: 249809 URL: http://llvm.org/viewvc/llvm-project?rev=249809&view=rev Log: Addressing warning due to rL249651 Modified: lldb/trunk/source/Plugins/Instruction/MIPS/EmulateInstructionMIPS.cpp Modified: lldb/trunk/source/Plugins/Instruction/MIPS/EmulateInstructionMIPS.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Instruction/MIPS/EmulateInstructionMIPS.cpp?rev=249809&r1=249808&r2=249809&view=diff == --- lldb/trunk/source/Plugins/Instruction/MIPS/EmulateInstructionMIPS.cpp (original) +++ lldb/trunk/source/Plugins/Instruction/MIPS/EmulateInstructionMIPS.cpp Fri Oct 9 01:34:52 2015 @@ -1142,10 +1142,7 @@ EmulateInstructionMIPS::Emulate_SWSP (ll // We look for sp based non-volatile register stores. if (base == dwarf_sp_mips && nonvolatile_reg_p (src)) { -uint32_t address; -RegisterInfo reg_info_base; RegisterInfo reg_info_src; - Context context; RegisterValue data_src; context.type = eContextPushRegisterOnStack; ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] r249837 - [LLDB][MIPS] fix watchpoint searched on client side for same masked variables
Author: mohit.bhakkad Date: Fri Oct 9 10:05:45 2015 New Revision: 249837 URL: http://llvm.org/viewvc/llvm-project?rev=249837&view=rev Log: [LLDB][MIPS] fix watchpoint searched on client side for same masked variables Reviewers: clayborg, jingham. Subscribers: jaydeep, bhushan, sagar, nitesh.jain, brucem,lldb-commits. Differential Revision: http://reviews.llvm.org/D13548 Modified: lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp Modified: lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp?rev=249837&r1=249836&r2=249837&view=diff == --- lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp (original) +++ lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp Fri Oct 9 10:05:45 2015 @@ -2105,6 +2105,8 @@ ProcessGDBRemote::SetThreadStopInfo (lld watch_id_t watch_id = LLDB_INVALID_WATCH_ID; if (wp_addr != LLDB_INVALID_ADDRESS) { +if (wp_hit_addr != LLDB_INVALID_ADDRESS) +wp_addr = wp_hit_addr; WatchpointSP wp_sp = GetTarget().GetWatchpointList().FindByAddress(wp_addr); if (wp_sp) { ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] r249838 - [LLDB] Fix display of value of a vector variables in watchpoint operations
Author: mohit.bhakkad Date: Fri Oct 9 10:13:20 2015 New Revision: 249838 URL: http://llvm.org/viewvc/llvm-project?rev=249838&view=rev Log: [LLDB] Fix display of value of a vector variables in watchpoint operations Reviewers: clayborg, zturner. Subscribers: jaydeep, bhushan, sagar, nitesh.jain, brucem,lldb-commits. Differential Revision: http://reviews.llvm.org/D13202 Added: lldb/trunk/watchpoint/ lldb/trunk/watchpoint/watchpoint_on_vectors/ lldb/trunk/watchpoint/watchpoint_on_vectors/Makefile lldb/trunk/watchpoint/watchpoint_on_vectors/TestValueOfVectorVariable.py lldb/trunk/watchpoint/watchpoint_on_vectors/main.c Modified: lldb/trunk/source/Breakpoint/Watchpoint.cpp Modified: lldb/trunk/source/Breakpoint/Watchpoint.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Breakpoint/Watchpoint.cpp?rev=249838&r1=249837&r2=249838&view=diff == --- lldb/trunk/source/Breakpoint/Watchpoint.cpp (original) +++ lldb/trunk/source/Breakpoint/Watchpoint.cpp Fri Oct 9 10:13:20 2015 @@ -218,14 +218,31 @@ Watchpoint::DumpSnapshots(Stream *s, con s->Printf("\nWatchpoint %u hit:", GetID()); prefix = ""; } - + if (m_old_value_sp) { -s->Printf("\n%sold value: %s", prefix, m_old_value_sp->GetValueAsCString()); +const char *old_value_cstr = m_old_value_sp->GetValueAsCString(); +if (old_value_cstr && old_value_cstr[0]) +s->Printf("\n%sold value: %s", prefix, old_value_cstr); +else +{ +const char *old_summary_cstr = m_old_value_sp-> GetSummaryAsCString(); +if (old_summary_cstr && old_summary_cstr[0]) +s->Printf("\n%sold value: %s", prefix, old_summary_cstr); +} } + if (m_new_value_sp) { -s->Printf("\n%snew value: %s", prefix, m_new_value_sp->GetValueAsCString()); +const char *new_value_cstr = m_new_value_sp->GetValueAsCString(); +if (new_value_cstr && new_value_cstr[0]) +s->Printf("\n%snew value: %s", prefix, new_value_cstr); +else +{ +const char *new_summary_cstr = m_new_value_sp-> GetSummaryAsCString(); +if (new_summary_cstr && new_summary_cstr[0]) +s->Printf("\n%snew value: %s", prefix, new_summary_cstr); +} } } Added: lldb/trunk/watchpoint/watchpoint_on_vectors/Makefile URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/watchpoint/watchpoint_on_vectors/Makefile?rev=249838&view=auto == --- lldb/trunk/watchpoint/watchpoint_on_vectors/Makefile (added) +++ lldb/trunk/watchpoint/watchpoint_on_vectors/Makefile Fri Oct 9 10:13:20 2015 @@ -0,0 +1,5 @@ +LEVEL = ../../../make + +C_SOURCES := main.c + +include $(LEVEL)/Makefile.rules Added: lldb/trunk/watchpoint/watchpoint_on_vectors/TestValueOfVectorVariable.py URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/watchpoint/watchpoint_on_vectors/TestValueOfVectorVariable.py?rev=249838&view=auto == --- lldb/trunk/watchpoint/watchpoint_on_vectors/TestValueOfVectorVariable.py (added) +++ lldb/trunk/watchpoint/watchpoint_on_vectors/TestValueOfVectorVariable.py Fri Oct 9 10:13:20 2015 @@ -0,0 +1,56 @@ +""" +Test displayed value of a vector variable while doing watchpoint operations +""" + +import os, time +import unittest2 +import lldb +from lldbtest import * +import lldbutil + +class TestValueOfVectorVariableTestCase(TestBase): + +mydir = TestBase.compute_mydir(__file__) + +@dsym_test +def test_value_of_vector_variable_with_dsym_using_watchpoint_set(self): +"""Test verify displayed value of vector variable.""" +self.buildDsym(dictionary=self.d) +self.setTearDownCleanup(dictionary=self.d) +self.value_of_vector_variable_with_watchpoint_set() + +@dwarf_test +def test_value_of_vector_variable_with_dwarf_using_watchpoint_set(self): +"""Test verify displayed value of vector variable.""" +self.buildDwarf(dictionary=self.d) +self.setTearDownCleanup(dictionary=self.d) +self.value_of_vector_variable_with_watchpoint_set() + +def setUp(self): +# Call super's setUp(). +TestBase.setUp(self) +# Our simple source filename. +self.source = 'main.c' +self.exe_name = 'a.out' +self.d = {'C_SOURCES': self.source, 'EXE': self.exe_name} + +def value_of_vector_variable_with_watchpoint_set(self): +"""Test verify displayed value of vector variable""" +exe = os.path.join(os.getcwd(), 'a.out') +self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET) + +# Set break to get a frame +self.runCmd("b main") + +# Run the program. +self.runCmd("run", RUN_SUCCEEDED) + +# Value of a v
[Lldb-commits] [lldb] r249897 - Correction in rL249838: Moving test to appropriate directory
Author: mohit.bhakkad Date: Fri Oct 9 15:36:54 2015 New Revision: 249897 URL: http://llvm.org/viewvc/llvm-project?rev=249897&view=rev Log: Correction in rL249838: Moving test to appropriate directory Added: lldb/trunk/test/functionalities/watchpoint/watchpoint_on_vectors/ lldb/trunk/test/functionalities/watchpoint/watchpoint_on_vectors/Makefile - copied, changed from r249886, lldb/trunk/watchpoint/watchpoint_on_vectors/Makefile lldb/trunk/test/functionalities/watchpoint/watchpoint_on_vectors/TestValueOfVectorVariable.py - copied, changed from r249886, lldb/trunk/watchpoint/watchpoint_on_vectors/TestValueOfVectorVariable.py lldb/trunk/test/functionalities/watchpoint/watchpoint_on_vectors/main.c - copied, changed from r249886, lldb/trunk/watchpoint/watchpoint_on_vectors/main.c Removed: lldb/trunk/watchpoint/watchpoint_on_vectors/Makefile lldb/trunk/watchpoint/watchpoint_on_vectors/TestValueOfVectorVariable.py lldb/trunk/watchpoint/watchpoint_on_vectors/main.c Copied: lldb/trunk/test/functionalities/watchpoint/watchpoint_on_vectors/Makefile (from r249886, lldb/trunk/watchpoint/watchpoint_on_vectors/Makefile) URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/watchpoint/watchpoint_on_vectors/Makefile?p2=lldb/trunk/test/functionalities/watchpoint/watchpoint_on_vectors/Makefile&p1=lldb/trunk/watchpoint/watchpoint_on_vectors/Makefile&r1=249886&r2=249897&rev=249897&view=diff == (empty) Copied: lldb/trunk/test/functionalities/watchpoint/watchpoint_on_vectors/TestValueOfVectorVariable.py (from r249886, lldb/trunk/watchpoint/watchpoint_on_vectors/TestValueOfVectorVariable.py) URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/watchpoint/watchpoint_on_vectors/TestValueOfVectorVariable.py?p2=lldb/trunk/test/functionalities/watchpoint/watchpoint_on_vectors/TestValueOfVectorVariable.py&p1=lldb/trunk/watchpoint/watchpoint_on_vectors/TestValueOfVectorVariable.py&r1=249886&r2=249897&rev=249897&view=diff == (empty) Copied: lldb/trunk/test/functionalities/watchpoint/watchpoint_on_vectors/main.c (from r249886, lldb/trunk/watchpoint/watchpoint_on_vectors/main.c) URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/watchpoint/watchpoint_on_vectors/main.c?p2=lldb/trunk/test/functionalities/watchpoint/watchpoint_on_vectors/main.c&p1=lldb/trunk/watchpoint/watchpoint_on_vectors/main.c&r1=249886&r2=249897&rev=249897&view=diff == (empty) Removed: lldb/trunk/watchpoint/watchpoint_on_vectors/Makefile URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/watchpoint/watchpoint_on_vectors/Makefile?rev=249896&view=auto == --- lldb/trunk/watchpoint/watchpoint_on_vectors/Makefile (original) +++ lldb/trunk/watchpoint/watchpoint_on_vectors/Makefile (removed) @@ -1,5 +0,0 @@ -LEVEL = ../../../make - -C_SOURCES := main.c - -include $(LEVEL)/Makefile.rules Removed: lldb/trunk/watchpoint/watchpoint_on_vectors/TestValueOfVectorVariable.py URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/watchpoint/watchpoint_on_vectors/TestValueOfVectorVariable.py?rev=249896&view=auto == --- lldb/trunk/watchpoint/watchpoint_on_vectors/TestValueOfVectorVariable.py (original) +++ lldb/trunk/watchpoint/watchpoint_on_vectors/TestValueOfVectorVariable.py (removed) @@ -1,56 +0,0 @@ -""" -Test displayed value of a vector variable while doing watchpoint operations -""" - -import os, time -import unittest2 -import lldb -from lldbtest import * -import lldbutil - -class TestValueOfVectorVariableTestCase(TestBase): - -mydir = TestBase.compute_mydir(__file__) - -@dsym_test -def test_value_of_vector_variable_with_dsym_using_watchpoint_set(self): -"""Test verify displayed value of vector variable.""" -self.buildDsym(dictionary=self.d) -self.setTearDownCleanup(dictionary=self.d) -self.value_of_vector_variable_with_watchpoint_set() - -@dwarf_test -def test_value_of_vector_variable_with_dwarf_using_watchpoint_set(self): -"""Test verify displayed value of vector variable.""" -self.buildDwarf(dictionary=self.d) -self.setTearDownCleanup(dictionary=self.d) -self.value_of_vector_variable_with_watchpoint_set() - -def setUp(self): -# Call super's setUp(). -TestBase.setUp(self) -# Our simple source filename. -self.source = 'main.c' -self.exe_name = 'a.out' -self.d = {'C_SOURCES': self.source, 'EXE': self.exe_name} - -def value_of_vector_variable_with_watchpoint_set(self): -"""Test verify displayed value of vector variable""
[Lldb-commits] [lldb] r250267 - [LLDB][MIPS64] Adding mips64 reaturn address register for unwind plan
Author: mohit.bhakkad Date: Wed Oct 14 00:20:03 2015 New Revision: 250267 URL: http://llvm.org/viewvc/llvm-project?rev=250267&view=rev Log: [LLDB][MIPS64] Adding mips64 reaturn address register for unwind plan Modified: lldb/trunk/source/Plugins/Instruction/MIPS64/EmulateInstructionMIPS64.cpp Modified: lldb/trunk/source/Plugins/Instruction/MIPS64/EmulateInstructionMIPS64.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Instruction/MIPS64/EmulateInstructionMIPS64.cpp?rev=250267&r1=250266&r2=250267&view=diff == --- lldb/trunk/source/Plugins/Instruction/MIPS64/EmulateInstructionMIPS64.cpp (original) +++ lldb/trunk/source/Plugins/Instruction/MIPS64/EmulateInstructionMIPS64.cpp Wed Oct 14 00:20:03 2015 @@ -738,6 +738,7 @@ EmulateInstructionMIPS64::CreateFunction unwind_plan.SetSourceName ("EmulateInstructionMIPS64"); unwind_plan.SetSourcedFromCompiler (eLazyBoolNo); unwind_plan.SetUnwindPlanValidAtAllInstructions (eLazyBoolYes); +unwind_plan.SetReturnAddressRegister (dwarf_ra_mips64); return true; } ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] r250272 - [LLDB] Adding mips32 in the list of archs with watchpoint_exceptions_received=before
Author: mohit.bhakkad Date: Wed Oct 14 00:42:11 2015 New Revision: 250272 URL: http://llvm.org/viewvc/llvm-project?rev=250272&view=rev Log: [LLDB] Adding mips32 in the list of archs with watchpoint_exceptions_received=before Modified: lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerCommon.cpp Modified: lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerCommon.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerCommon.cpp?rev=250272&r1=250271&r2=250272&view=diff == --- lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerCommon.cpp (original) +++ lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerCommon.cpp Wed Oct 14 00:42:11 2015 @@ -186,7 +186,9 @@ GDBRemoteCommunicationServerCommon::Hand host_arch.GetMachine() == llvm::Triple::arm || host_arch.GetMachine() == llvm::Triple::armeb || host_arch.GetMachine() == llvm::Triple::mips64 || -host_arch.GetMachine() == llvm::Triple::mips64el) +host_arch.GetMachine() == llvm::Triple::mips64el || +host_arch.GetMachine() == llvm::Triple::mips || +host_arch.GetMachine() == llvm::Triple::mipsel) response.Printf("watchpoint_exceptions_received:before;"); else response.Printf("watchpoint_exceptions_received:after;"); ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] r250801 - [LLDB] Insert names with same signo as alias instead of a new entry
Author: mohit.bhakkad Date: Tue Oct 20 02:05:46 2015 New Revision: 250801 URL: http://llvm.org/viewvc/llvm-project?rev=250801&view=rev Log: [LLDB] Insert names with same signo as alias instead of a new entry Reviewers: clayborg, labath. Subscribers: jaydeep, dsanders, bhushan, sagar, nitesh.jain, emaste,lldb-commits. Differential Revision: http://reviews.llvm.org/D13646 Modified: lldb/trunk/include/lldb/Target/UnixSignals.h lldb/trunk/source/Plugins/Platform/gdb-server/PlatformRemoteGDBServer.cpp lldb/trunk/source/Plugins/Process/Utility/FreeBSDSignals.cpp lldb/trunk/source/Plugins/Process/Utility/LinuxSignals.cpp lldb/trunk/source/Plugins/Process/Utility/MipsLinuxSignals.cpp lldb/trunk/source/Target/UnixSignals.cpp Modified: lldb/trunk/include/lldb/Target/UnixSignals.h URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Target/UnixSignals.h?rev=250801&r1=250800&r2=250801&view=diff == --- lldb/trunk/include/lldb/Target/UnixSignals.h (original) +++ lldb/trunk/include/lldb/Target/UnixSignals.h Tue Oct 20 02:05:46 2015 @@ -98,6 +98,9 @@ public: int32_t GetSignalAtIndex(int32_t index) const; +ConstString +GetShortName(ConstString name) const; + // We assume that the elements of this object are constant once it is constructed, // since a process should never need to add or remove symbols as it runs. So don't // call these functions anywhere but the constructor of your subclass of UnixSignals or in @@ -106,11 +109,11 @@ public: void AddSignal (int signo, const char *name, - const char *short_name, bool default_suppress, bool default_stop, bool default_notify, - const char *description); + const char *description, + const char *alias = nullptr); void RemoveSignal (int signo); @@ -123,18 +126,18 @@ protected: struct Signal { ConstString m_name; -ConstString m_short_name; +ConstString m_alias; std::string m_description; bool m_suppress:1, m_stop:1, m_notify:1; Signal (const char *name, -const char *short_name, bool default_suppress, bool default_stop, bool default_notify, -const char *description); +const char *description, +const char *alias); ~Signal () {} }; Modified: lldb/trunk/source/Plugins/Platform/gdb-server/PlatformRemoteGDBServer.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Platform/gdb-server/PlatformRemoteGDBServer.cpp?rev=250801&r1=250800&r2=250801&view=diff == --- lldb/trunk/source/Plugins/Platform/gdb-server/PlatformRemoteGDBServer.cpp (original) +++ lldb/trunk/source/Plugins/Platform/gdb-server/PlatformRemoteGDBServer.cpp Tue Oct 20 02:05:46 2015 @@ -914,13 +914,8 @@ PlatformRemoteGDBServer::GetRemoteUnixSi return false; // We can live without short_name, description, etc. -std::string short_name{""}; -auto object_sp = dict->GetValueForKey("short_name"); -if (object_sp && object_sp->IsValid()) -short_name = object_sp->GetStringValue(); - bool suppress{false}; -object_sp = dict->GetValueForKey("suppress"); +auto object_sp = dict->GetValueForKey("suppress"); if (object_sp && object_sp->IsValid()) suppress = object_sp->GetBooleanValue(); @@ -941,7 +936,6 @@ PlatformRemoteGDBServer::GetRemoteUnixSi remote_signals_sp->AddSignal(signo, name.c_str(), - short_name.c_str(), suppress, stop, notify, description.c_str()); return true; Modified: lldb/trunk/source/Plugins/Process/Utility/FreeBSDSignals.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Utility/FreeBSDSignals.cpp?rev=250801&r1=250800&r2=250801&view=diff == --- lldb/trunk/source/Plugins/Process/Utility/FreeBSDSignals.cpp (original) +++ lldb/trunk/source/Plugins/Process/Utility/FreeBSDSignals.cpp Tue Oct 20 02:05:46 2015 @@ -26,70 +26,70 @@ FreeBSDSignals::Reset() { UnixSignals::Reset(); -//SIGNO NAME SHORT NAME SUPPRESS STOP NOTIFY DESCRIPTION -//== == == == === -AddSignal (32,"SIGTHR", "THR", false, false, false, "thread i
[Lldb-commits] [lldb] r251905 - [LLDB][Watchpoint] Change ignore_count condition location to fix watchpoint ignore feature for architectures with watchpoint_exceptions_received=before
Author: mohit.bhakkad Date: Tue Nov 3 03:04:33 2015 New Revision: 251905 URL: http://llvm.org/viewvc/llvm-project?rev=251905&view=rev Log: [LLDB][Watchpoint] Change ignore_count condition location to fix watchpoint ignore feature for architectures with watchpoint_exceptions_received=before Reviewers: jingham. Subscribers: clayborg, jaydeep, bhushan, sagar, nitesh.jain, lldb-commits. Differential Revision: http://reviews.llvm.org/D13296 Modified: lldb/trunk/source/Breakpoint/Watchpoint.cpp lldb/trunk/source/Target/StopInfo.cpp Modified: lldb/trunk/source/Breakpoint/Watchpoint.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Breakpoint/Watchpoint.cpp?rev=251905&r1=251904&r2=251905&view=diff == --- lldb/trunk/source/Breakpoint/Watchpoint.cpp (original) +++ lldb/trunk/source/Breakpoint/Watchpoint.cpp Tue Nov 3 03:04:33 2015 @@ -183,9 +183,6 @@ Watchpoint::ShouldStop (StoppointCallbac if (!IsEnabled()) return false; -if (GetHitCount() <= GetIgnoreCount()) -return false; - return true; } Modified: lldb/trunk/source/Target/StopInfo.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Target/StopInfo.cpp?rev=251905&r1=251904&r2=251905&view=diff == --- lldb/trunk/source/Target/StopInfo.cpp (original) +++ lldb/trunk/source/Target/StopInfo.cpp Tue Nov 3 03:04:33 2015 @@ -759,6 +759,16 @@ protected: } } +// TODO: This condition should be checked in the synchronous part of the watchpoint code +// (Watchpoint::ShouldStop), so that we avoid pulling an event even if the watchpoint fails +// the ignore count condition. It is moved here temporarily, because for archs with +// watchpoint_exceptions_received=before, the code in the previous lines takes care of moving +// the inferior to next PC. We have to check the ignore count condition after this is done, +// otherwise we will hit same watchpoint multiple times until we pass ignore condition, but we +// won't actually be ignoring them. +if (wp_sp->GetHitCount() <= wp_sp->GetIgnoreCount()) +m_should_stop = false; + if (m_should_stop && wp_sp->GetConditionText() != NULL) { // We need to make sure the user sees any parse errors in their condition, so we'll hook the ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] r251906 - [LLDB][MIPS] Fix GetUserRegisterInfoCount to count no of regs which are physically present
Author: mohit.bhakkad Date: Tue Nov 3 03:13:45 2015 New Revision: 251906 URL: http://llvm.org/viewvc/llvm-project?rev=251906&view=rev Log: [LLDB][MIPS] Fix GetUserRegisterInfoCount to count no of regs which are physically present Reviewers: clayborg, labath. Subscribers: jaydeep, bhushan, sagar, nitesh.jain, lldb-commits. Differential Revision: http://reviews.llvm.org/D13859 Modified: lldb/trunk/source/Plugins/Process/Utility/RegisterContextLinux_mips.cpp lldb/trunk/source/Plugins/Process/Utility/RegisterContextLinux_mips.h lldb/trunk/source/Plugins/Process/Utility/RegisterContextLinux_mips64.cpp lldb/trunk/source/Plugins/Process/Utility/RegisterContextLinux_mips64.h Modified: lldb/trunk/source/Plugins/Process/Utility/RegisterContextLinux_mips.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Utility/RegisterContextLinux_mips.cpp?rev=251906&r1=251905&r2=251906&view=diff == --- lldb/trunk/source/Plugins/Process/Utility/RegisterContextLinux_mips.cpp (original) +++ lldb/trunk/source/Plugins/Process/Utility/RegisterContextLinux_mips.cpp Tue Nov 3 03:13:45 2015 @@ -29,8 +29,17 @@ using namespace lldb; #include "RegisterInfos_mips.h" #undef DECLARE_REGISTER_INFOS_MIPS_STRUCT -RegisterContextLinux_mips::RegisterContextLinux_mips(const ArchSpec &target_arch) : -RegisterInfoInterface(target_arch) +uint32_t +GetUserRegisterInfoCount (bool msa_present) +{ +if (msa_present) +return static_cast (k_num_user_registers_mips); +return static_cast (k_num_user_registers_mips - k_num_msa_registers_mips); +} + +RegisterContextLinux_mips::RegisterContextLinux_mips(const ArchSpec &target_arch, bool msa_present) : +RegisterInfoInterface(target_arch), +m_user_register_count (GetUserRegisterInfoCount (msa_present)) { } @@ -63,5 +72,5 @@ RegisterContextLinux_mips::GetRegisterCo uint32_t RegisterContextLinux_mips::GetUserRegisterCount () const { -return static_cast (k_num_user_registers_mips); +return static_cast (m_user_register_count); } Modified: lldb/trunk/source/Plugins/Process/Utility/RegisterContextLinux_mips.h URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Utility/RegisterContextLinux_mips.h?rev=251906&r1=251905&r2=251906&view=diff == --- lldb/trunk/source/Plugins/Process/Utility/RegisterContextLinux_mips.h (original) +++ lldb/trunk/source/Plugins/Process/Utility/RegisterContextLinux_mips.h Tue Nov 3 03:13:45 2015 @@ -17,7 +17,7 @@ class RegisterContextLinux_mips : public lldb_private::RegisterInfoInterface { public: -RegisterContextLinux_mips(const lldb_private::ArchSpec &target_arch); +RegisterContextLinux_mips(const lldb_private::ArchSpec &target_arch, bool msa_present = true); size_t GetGPRSize() const override; @@ -30,6 +30,9 @@ public: uint32_t GetUserRegisterCount () const override; + +private: +uint32_t m_user_register_count; }; #endif Modified: lldb/trunk/source/Plugins/Process/Utility/RegisterContextLinux_mips64.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Utility/RegisterContextLinux_mips64.cpp?rev=251906&r1=251905&r2=251906&view=diff == --- lldb/trunk/source/Plugins/Process/Utility/RegisterContextLinux_mips64.cpp (original) +++ lldb/trunk/source/Plugins/Process/Utility/RegisterContextLinux_mips64.cpp Tue Nov 3 03:13:45 2015 @@ -75,27 +75,31 @@ GetRegisterInfoCount (const ArchSpec &ta } uint32_t -GetUserRegisterInfoCount (const ArchSpec &target_arch) +GetUserRegisterInfoCount (const ArchSpec &target_arch, bool msa_present) { switch (target_arch.GetMachine()) { case llvm::Triple::mips: case llvm::Triple::mipsel: -return static_cast (k_num_user_registers_mips); +if (msa_present) +return static_cast (k_num_user_registers_mips); +return static_cast (k_num_user_registers_mips - k_num_msa_registers_mips); case llvm::Triple::mips64el: case llvm::Triple::mips64: -return static_cast (k_num_user_registers_mips64); +if (msa_present) +return static_cast (k_num_user_registers_mips64); +return static_cast (k_num_user_registers_mips64 - k_num_msa_registers_mips64); default: assert(false && "Unhandled target architecture."); return 0; } } -RegisterContextLinux_mips64::RegisterContextLinux_mips64(const ArchSpec &target_arch) : +RegisterContextLinux_mips64::RegisterContextLinux_mips64(const ArchSpec &target_arch, bool msa_present) : lldb_private::RegisterInfoInterface(target_arch), m_register_info_p (GetRegisterInfoPtr (target_arch)), m_register_info_count (GetRegisterInf
[Lldb-commits] [lldb] r253864 - [LLDB][MIPS] Getting 0 index for H/W watchpoint is not necessarily an error
Author: mohit.bhakkad Date: Mon Nov 23 06:19:59 2015 New Revision: 253864 URL: http://llvm.org/viewvc/llvm-project?rev=253864&view=rev Log: [LLDB][MIPS] Getting 0 index for H/W watchpoint is not necessarily an error Reviewers: jaydeep. Subscribers: bhushan, sagar, nitesh.jain, lldb-commits. Differential Revision: http://reviews.llvm.org/D14860 Modified: lldb/trunk/source/Plugins/Process/Linux/NativeRegisterContextLinux_mips64.cpp Modified: lldb/trunk/source/Plugins/Process/Linux/NativeRegisterContextLinux_mips64.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Linux/NativeRegisterContextLinux_mips64.cpp?rev=253864&r1=253863&r2=253864&view=diff == --- lldb/trunk/source/Plugins/Process/Linux/NativeRegisterContextLinux_mips64.cpp (original) +++ lldb/trunk/source/Plugins/Process/Linux/NativeRegisterContextLinux_mips64.cpp Mon Nov 23 06:19:59 2015 @@ -1092,7 +1092,7 @@ GetVacantWatchIndex (struct pt_watch_reg } } } -return 0; +return LLDB_INVALID_INDEX32; } bool @@ -1221,7 +1221,7 @@ NativeRegisterContextLinux_mips64::SetHa int index = GetVacantWatchIndex (®s, addr, size, watch_flags, NumSupportedHardwareWatchpoints()); // New watchpoint doesn't fit -if (!index) +if (index == LLDB_INVALID_INDEX32) return LLDB_INVALID_INDEX32; ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] r254522 - [LLDB][MIPS] fix watchpoint searched on client side for same masked variables
Author: mohit.bhakkad Date: Wed Dec 2 11:45:02 2015 New Revision: 254522 URL: http://llvm.org/viewvc/llvm-project?rev=254522&view=rev Log: [LLDB][MIPS] fix watchpoint searched on client side for same masked variables Reviewers: clayborg. Subscribers: jaydeep, bhushan, sagar, nitesh.jain,lldb-commits. Differential Revision: http://reviews.llvm.org/D15106 Modified: lldb/trunk/include/lldb/Core/ArchSpec.h lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp Modified: lldb/trunk/include/lldb/Core/ArchSpec.h URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Core/ArchSpec.h?rev=254522&r1=254521&r2=254522&view=diff == --- lldb/trunk/include/lldb/Core/ArchSpec.h (original) +++ lldb/trunk/include/lldb/Core/ArchSpec.h Wed Dec 2 11:45:02 2015 @@ -212,7 +212,11 @@ public: kCore_mips64_last = eCore_mips64r6, kCore_mips64el_first = eCore_mips64el, -kCore_mips64el_last = eCore_mips64r6el +kCore_mips64el_last = eCore_mips64r6el, + +kCore_mips_first = eCore_mips32, +kCore_mips_last = eCore_mips64r6el + }; typedef void (* StopInfoOverrideCallbackType)(lldb_private::Thread &thread); Modified: lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp?rev=254522&r1=254521&r2=254522&view=diff == --- lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp (original) +++ lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp Wed Dec 2 11:45:02 2015 @@ -2081,9 +2081,12 @@ ProcessGDBRemote::SetThreadStopInfo (lld watch_id_t watch_id = LLDB_INVALID_WATCH_ID; if (wp_addr != LLDB_INVALID_ADDRESS) { -if (wp_hit_addr != LLDB_INVALID_ADDRESS) -wp_addr = wp_hit_addr; -WatchpointSP wp_sp = GetTarget().GetWatchpointList().FindByAddress(wp_addr); +WatchpointSP wp_sp; +ArchSpec::Core core = GetTarget().GetArchitecture().GetCore(); +if (core >= ArchSpec::kCore_mips_first && core <= ArchSpec::kCore_mips_last) +wp_sp = GetTarget().GetWatchpointList().FindByAddress(wp_hit_addr); +if (!wp_sp) +wp_sp = GetTarget().GetWatchpointList().FindByAddress(wp_addr); if (wp_sp) { wp_sp->SetHardwareIndex(wp_index); ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] r254588 - [LLDB] Switch to assembly view if source is moved
Author: mohit.bhakkad Date: Wed Dec 2 22:56:16 2015 New Revision: 254588 URL: http://llvm.org/viewvc/llvm-project?rev=254588&view=rev Log: [LLDB] Switch to assembly view if source is moved Reviewers: clayborg, jingham, jasonmolenda. Subscribers: jaydeep, bhushan, sagar, nitesh.jain,lldb-commits. Differential Revision: http://reviews.llvm.org/D12877 Modified: lldb/trunk/source/Core/Debugger.cpp lldb/trunk/source/Target/StackFrame.cpp Modified: lldb/trunk/source/Core/Debugger.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/Debugger.cpp?rev=254588&r1=254587&r2=254588&view=diff == --- lldb/trunk/source/Core/Debugger.cpp (original) +++ lldb/trunk/source/Core/Debugger.cpp Wed Dec 2 22:56:16 2015 @@ -86,9 +86,10 @@ GetDebuggerList() OptionEnumValueElement g_show_disassembly_enum_values[] = { -{ Debugger::eStopDisassemblyTypeNever,"never", "Never show disassembly when displaying a stop context."}, -{ Debugger::eStopDisassemblyTypeNoSource, "no-source", "Show disassembly when there is no source information, or the source file is missing when displaying a stop context."}, -{ Debugger::eStopDisassemblyTypeAlways, "always","Always show disassembly when displaying a stop context."}, +{ Debugger::eStopDisassemblyTypeNever, "never","Never show disassembly when displaying a stop context."}, +{ Debugger::eStopDisassemblyTypeNoDebugInfo,"no-debuginfo", "Show disassembly when there is no debug information."}, +{ Debugger::eStopDisassemblyTypeNoSource, "no-source","Show disassembly when there is no source information, or the source file is missing when displaying a stop context."}, +{ Debugger::eStopDisassemblyTypeAlways, "always", "Always show disassembly when displaying a stop context."}, { 0, NULL, NULL } }; @@ -150,7 +151,7 @@ g_properties[] = { "prompt", OptionValue::eTypeString , true, OptionValueString::eOptionEncodeCharacterEscapeSequences, "(lldb) ", NULL, "The debugger command line prompt displayed for the user." }, { "script-lang", OptionValue::eTypeEnum, true, eScriptLanguagePython, NULL, g_language_enumerators, "The script language to be used for evaluating user-written scripts." }, { "stop-disassembly-count", OptionValue::eTypeSInt64 , true, 4, NULL, NULL, "The number of disassembly lines to show when displaying a stopped context." }, -{ "stop-disassembly-display", OptionValue::eTypeEnum, true, Debugger::eStopDisassemblyTypeNoSource, NULL, g_show_disassembly_enum_values, "Control when to display disassembly when displaying a stopped context." }, +{ "stop-disassembly-display", OptionValue::eTypeEnum, true, Debugger::eStopDisassemblyTypeNoDebugInfo, NULL, g_show_disassembly_enum_values, "Control when to display disassembly when displaying a stopped context." }, { "stop-line-count-after",OptionValue::eTypeSInt64 , true, 3, NULL, NULL, "The number of sources lines to display that come after the current source line when displaying a stopped context." }, { "stop-line-count-before", OptionValue::eTypeSInt64 , true, 3, NULL, NULL, "The number of sources lines to display that come before the current source line when displaying a stopped context." }, { "term-width", OptionValue::eTypeSInt64 , true, 80 , NULL, NULL, "The maximum number of columns to use for displaying text." }, Modified: lldb/trunk/source/Target/StackFrame.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Target/StackFrame.cpp?rev=254588&r1=254587&r2=254588&view=diff == --- lldb/trunk/source/Target/StackFrame.cpp (original) +++ lldb/trunk/source/Target/StackFrame.cpp Wed Dec 2 22:56:16 2015 @@ -1519,7 +1519,7 @@ StackFrame::GetStatus (Stream& strm, if (show_source) { ExecutionContext exe_ctx (shared_from_this()); -bool have_source = false; +bool have_source = false, have_debuginfo = false; Debugger::StopDisassemblyType disasm_display = Debugger::eStopDisassemblyTypeNever; Target *target = exe_ctx.GetTargetPtr(); if (target) @@ -1532,26 +1532,35 @@ StackFrame::GetStatus (Stream& strm, GetSymbolContext(eSymbolContextCompUnit | eSymbolContextLineEntry); if (m_sc.comp_unit && m_sc.line_entry.IsValid()) { -have_source = true; +have_debuginfo = true; if (source_lines_before > 0 || source_lines_after > 0) { - target->GetSourceManager().DisplaySourceLinesWithLineNumbers (m_sc.line_entry.file, +size_t num_lines = target->GetSourceManager().DisplaySourceLinesWithLineNumbers (m_sc.line_ent
[Lldb-commits] [lldb] r254593 - [Fix] fix build failure due to rL254588
Author: mohit.bhakkad Date: Thu Dec 3 02:44:33 2015 New Revision: 254593 URL: http://llvm.org/viewvc/llvm-project?rev=254593&view=rev Log: [Fix] fix build failure due to rL254588 Modified: lldb/trunk/include/lldb/Core/Debugger.h Modified: lldb/trunk/include/lldb/Core/Debugger.h URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Core/Debugger.h?rev=254593&r1=254592&r2=254593&view=diff == --- lldb/trunk/include/lldb/Core/Debugger.h (original) +++ lldb/trunk/include/lldb/Core/Debugger.h Thu Dec 3 02:44:33 2015 @@ -268,6 +268,7 @@ public: enum StopDisassemblyType { eStopDisassemblyTypeNever = 0, +eStopDisassemblyTypeNoDebugInfo, eStopDisassemblyTypeNoSource, eStopDisassemblyTypeAlways }; ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] r254711 - [LLDB][MIPS] Fix gdbremote_testcase.py
Author: mohit.bhakkad Date: Fri Dec 4 03:58:07 2015 New Revision: 254711 URL: http://llvm.org/viewvc/llvm-project?rev=254711&view=rev Log: [LLDB][MIPS] Fix gdbremote_testcase.py Patch by Nitesh Jain Reviewers: clayborg, ovyalov. Subscribers: jaydeep, bhushan, mohit.bhakkad, sagar. Differential Revision: http://reviews.llvm.org/D15103 Modified: lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-server/gdbremote_testcase.py Modified: lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-server/gdbremote_testcase.py URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-server/gdbremote_testcase.py?rev=254711&r1=254710&r2=254711&view=diff == --- lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-server/gdbremote_testcase.py (original) +++ lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-server/gdbremote_testcase.py Fri Dec 4 03:58:07 2015 @@ -1273,19 +1273,25 @@ class GdbRemoteTestCaseBase(TestBase): args["expected_g_c2"] = "0" (state_reached, step_count) = self.count_single_steps_until_true(main_thread_id, self.g_c1_c2_contents_are, args, max_step_count=5, use_Hc_packet=use_Hc_packet, step_instruction=step_instruction) self.assertTrue(state_reached) -self.assertEqual(step_count, 1) +expected_step_count = 1 +arch = self.getArchitecture() + +#MIPS required "3" (ADDIU, SB, LD) machine instructions for updation of variable value +if re.match("mips",arch): + expected_step_count = 3 +self.assertEqual(step_count, expected_step_count) # Verify we hit the next state. args["expected_g_c1"] = "0" args["expected_g_c2"] = "0" (state_reached, step_count) = self.count_single_steps_until_true(main_thread_id, self.g_c1_c2_contents_are, args, max_step_count=5, use_Hc_packet=use_Hc_packet, step_instruction=step_instruction) self.assertTrue(state_reached) -self.assertEqual(step_count, 1) +self.assertEqual(step_count, expected_step_count) # Verify we hit the next state. args["expected_g_c1"] = "0" args["expected_g_c2"] = "1" (state_reached, step_count) = self.count_single_steps_until_true(main_thread_id, self.g_c1_c2_contents_are, args, max_step_count=5, use_Hc_packet=use_Hc_packet, step_instruction=step_instruction) self.assertTrue(state_reached) -self.assertEqual(step_count, 1) +self.assertEqual(step_count, expected_step_count) ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] r254892 - [LLDB][MIPS] Marking some expected failures
Author: mohit.bhakkad Date: Sun Dec 6 23:47:35 2015 New Revision: 254892 URL: http://llvm.org/viewvc/llvm-project?rev=254892&view=rev Log: [LLDB][MIPS] Marking some expected failures Reviewers: clayborg, zturner. Subscribers: jaydeep, bhushan, sagar, nitesh.jain, tberghammer,lldb-commits. Differential Revision: http://reviews.llvm.org/D14944 Modified: lldb/trunk/packages/Python/lldbsuite/test/functionalities/watchpoint/hello_watchlocation/TestWatchLocation.py lldb/trunk/packages/Python/lldbsuite/test/functionalities/watchpoint/step_over_watchpoint/TestStepOverWatchpoint.py Modified: lldb/trunk/packages/Python/lldbsuite/test/functionalities/watchpoint/hello_watchlocation/TestWatchLocation.py URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/watchpoint/hello_watchlocation/TestWatchLocation.py?rev=254892&r1=254891&r2=254892&view=diff == --- lldb/trunk/packages/Python/lldbsuite/test/functionalities/watchpoint/hello_watchlocation/TestWatchLocation.py (original) +++ lldb/trunk/packages/Python/lldbsuite/test/functionalities/watchpoint/hello_watchlocation/TestWatchLocation.py Sun Dec 6 23:47:35 2015 @@ -31,6 +31,7 @@ class HelloWatchLocationTestCase(TestBas @expectedFailureAndroid(archs=['arm', 'aarch64']) # Watchpoints not supported @expectedFailureWindows("llvm.org/pr24446") # WINDOWS XFAIL TRIAGE - Watchpoints not supported on Windows +@expectedFailureAll(archs=['mips', 'mipsel', 'mips64', 'mips64el']) # Most of the MIPS boards provide only one H/W watchpoints, and S/W watchpoints are not supported yet def test_hello_watchlocation(self): """Test watching a location with '-s size' option.""" self.build(dictionary=self.d) Modified: lldb/trunk/packages/Python/lldbsuite/test/functionalities/watchpoint/step_over_watchpoint/TestStepOverWatchpoint.py URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/watchpoint/step_over_watchpoint/TestStepOverWatchpoint.py?rev=254892&r1=254891&r2=254892&view=diff == --- lldb/trunk/packages/Python/lldbsuite/test/functionalities/watchpoint/step_over_watchpoint/TestStepOverWatchpoint.py (original) +++ lldb/trunk/packages/Python/lldbsuite/test/functionalities/watchpoint/step_over_watchpoint/TestStepOverWatchpoint.py Sun Dec 6 23:47:35 2015 @@ -54,17 +54,6 @@ class TestStepOverWatchpoint(TestBase): error.GetCString()) self.assertTrue(read_watchpoint, "Failed to set read watchpoint.") -write_value = frame.FindValue('g_watch_me_write', - lldb.eValueTypeVariableGlobal) -self.assertTrue(write_value, "Failed to find write value.") - -# resolve_location=True, read=False, write=True -write_watchpoint = write_value.Watch(True, False, True, error) -self.assertTrue(read_watchpoint, "Failed to set write watchpoint.") -self.assertTrue(error.Success(), -"Error while setting watchpoint: %s" % -error.GetCString()) - thread.StepOver() self.assertTrue(thread.GetStopReason() == lldb.eStopReasonWatchpoint, STOPPED_DUE_TO_WATCHPOINT) @@ -77,6 +66,22 @@ class TestStepOverWatchpoint(TestBase): self.step_inst_for_watchpoint(1) +write_value = frame.FindValue('g_watch_me_write', + lldb.eValueTypeVariableGlobal) +self.assertTrue(write_value, "Failed to find write value.") + +# Most of the MIPS boards provide only one H/W watchpoints, and S/W watchpoints are not supported yet +arch = self.getArchitecture() +if arch in ['mips', 'mipsel', 'mips64', 'mips64el']: +self.runCmd("watchpoint delete 1") + +# resolve_location=True, read=False, write=True +write_watchpoint = write_value.Watch(True, False, True, error) +self.assertTrue(read_watchpoint, "Failed to set write watchpoint.") +self.assertTrue(error.Success(), +"Error while setting watchpoint: %s" % +error.GetCString()) + thread.StepOver() self.assertTrue(thread.GetStopReason() == lldb.eStopReasonWatchpoint, STOPPED_DUE_TO_WATCHPOINT) ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] r255488 - [LLDB][MIPS] Mark TestConcurrentEvents.py expected failure, as MIPS atomic sequences are yet to be supported in LLDB
Author: mohit.bhakkad Date: Mon Dec 14 04:26:18 2015 New Revision: 255488 URL: http://llvm.org/viewvc/llvm-project?rev=255488&view=rev Log: [LLDB][MIPS] Mark TestConcurrentEvents.py expected failure, as MIPS atomic sequences are yet to be supported in LLDB Reviewers: jaydeep. Subscribers: lldb-commits. Differential Revision: http://reviews.llvm.org/D15488 Modified: lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentEvents.py Modified: lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentEvents.py URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentEvents.py?rev=255488&r1=255487&r2=255488&view=diff == --- lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentEvents.py (original) +++ lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentEvents.py Mon Dec 14 04:26:18 2015 @@ -21,6 +21,7 @@ from lldbsuite.test.lldbtest import * import lldbsuite.test.lldbutil as lldbutil @skipIfWindows +@expectedFailureAll(archs=['mips64', 'mips64el']) # Atomic sequences are not supported yet for MIPS in LLDB. class ConcurrentEventsTestCase(TestBase): mydir = TestBase.compute_mydir(__file__) ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] r256331 - [LLDB] Fix Read/Write memory to be compatible with both endians
Author: mohit.bhakkad Date: Wed Dec 23 06:34:58 2015 New Revision: 256331 URL: http://llvm.org/viewvc/llvm-project?rev=256331&view=rev Log: [LLDB] Fix Read/Write memory to be compatible with both endians Reviewers: tberghammer. Subscribers: jaydeep, bhushan, sagar, nitesh.jain,lldb-commits. Differential Revision: http://reviews.llvm.org/D15738 Modified: lldb/trunk/source/Plugins/Process/Linux/NativeProcessLinux.cpp Modified: lldb/trunk/source/Plugins/Process/Linux/NativeProcessLinux.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Linux/NativeProcessLinux.cpp?rev=256331&r1=256330&r2=256331&view=diff == --- lldb/trunk/source/Plugins/Process/Linux/NativeProcessLinux.cpp (original) +++ lldb/trunk/source/Plugins/Process/Linux/NativeProcessLinux.cpp Wed Dec 23 06:34:58 2015 @@ -2547,8 +2547,7 @@ NativeProcessLinux::ReadMemory (lldb::ad remainder = remainder > k_ptrace_word_size ? k_ptrace_word_size : remainder; // Copy the data into our buffer -for (unsigned i = 0; i < remainder; ++i) -dst[i] = ((data >> i*8) & 0xFF); +memcpy(dst, &data, remainder); if (log && ProcessPOSIXLog::AtTopNestLevel() && (log->GetMask().Test(POSIX_LOG_MEMORY_DATA_LONG) || @@ -2600,8 +2599,7 @@ NativeProcessLinux::WriteMemory(lldb::ad if (remainder == k_ptrace_word_size) { unsigned long data = 0; -for (unsigned i = 0; i < k_ptrace_word_size; ++i) -data |= (unsigned long)src[i] << i*8; +memcpy(&data, src, k_ptrace_word_size); if (log && ProcessPOSIXLog::AtTopNestLevel() && (log->GetMask().Test(POSIX_LOG_MEMORY_DATA_LONG) || ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] r257447 - [LLDB][MIPS] Fix ReadRegisterValue for registers with constant 32 bit size regardless of ABI
Author: mohit.bhakkad Date: Mon Jan 11 23:55:03 2016 New Revision: 257447 URL: http://llvm.org/viewvc/llvm-project?rev=257447&view=rev Log: [LLDB][MIPS] Fix ReadRegisterValue for registers with constant 32 bit size regardless of ABI Reviewers: clayborg, tberghammer. Subscribers: jaydeep, bhushan, sagar, nitesh.jain, lldb-commits. Differential Revision: http://reviews.llvm.org/D16060 Modified: lldb/trunk/source/Plugins/Process/Linux/NativeRegisterContextLinux_mips64.cpp Modified: lldb/trunk/source/Plugins/Process/Linux/NativeRegisterContextLinux_mips64.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Linux/NativeRegisterContextLinux_mips64.cpp?rev=257447&r1=257446&r2=257447&view=diff == --- lldb/trunk/source/Plugins/Process/Linux/NativeRegisterContextLinux_mips64.cpp (original) +++ lldb/trunk/source/Plugins/Process/Linux/NativeRegisterContextLinux_mips64.cpp Mon Jan 11 23:55:03 2016 @@ -1388,7 +1388,15 @@ NativeRegisterContextLinux_mips64::DoRea { lldb_private::ArchSpec arch; if (m_thread.GetProcess()->GetArchitecture(arch)) -value.SetBytes((void *)(((unsigned char *)®s) + offset + 4 * (arch.GetMachine() == llvm::Triple::mips)), arch.GetFlags() & lldb_private::ArchSpec::eMIPSABI_O32 ? 4 : 8, arch.GetByteOrder()); +{ +void* target_address = ((uint8_t*)®s) + offset + 4 * (arch.GetMachine() == llvm::Triple::mips; +uint32_t target_size; +if ((::strcmp(reg_name, "sr") == 0) || (::strcmp(reg_name, "cause") == 0) || (::strcmp(reg_name, "config5") == 0)) +target_size = 4; +else +target_size = arch.GetFlags() & lldb_private::ArchSpec::eMIPSABI_O32 ? 4 : 8; +value.SetBytes(target_address, target_size, arch.GetByteOrder()); +} else error.SetErrorString("failed to get architecture"); } ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] r257448 - [LLDB][MIPS] Fix rL255619: mips 3, 4 and 5 are 64 bit archs
Author: mohit.bhakkad Date: Tue Jan 12 00:03:01 2016 New Revision: 257448 URL: http://llvm.org/viewvc/llvm-project?rev=257448&view=rev Log: [LLDB][MIPS] Fix rL255619: mips 3, 4 and 5 are 64 bit archs Modified: lldb/trunk/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp Modified: lldb/trunk/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp?rev=257448&r1=257447&r2=257448&view=diff == --- lldb/trunk/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp (original) +++ lldb/trunk/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp Tue Jan 12 00:03:01 2016 @@ -330,15 +330,15 @@ mipsVariantFromElfFlags(const elf::elf_w { case llvm::ELF::EF_MIPS_ARCH_1: case llvm::ELF::EF_MIPS_ARCH_2: -case llvm::ELF::EF_MIPS_ARCH_3: -case llvm::ELF::EF_MIPS_ARCH_4: -case llvm::ELF::EF_MIPS_ARCH_5: case llvm::ELF::EF_MIPS_ARCH_32: return (endian == ELFDATA2LSB) ? ArchSpec::eMIPSSubType_mips32el : ArchSpec::eMIPSSubType_mips32; case llvm::ELF::EF_MIPS_ARCH_32R2: return (endian == ELFDATA2LSB) ? ArchSpec::eMIPSSubType_mips32r2el : ArchSpec::eMIPSSubType_mips32r2; case llvm::ELF::EF_MIPS_ARCH_32R6: return (endian == ELFDATA2LSB) ? ArchSpec::eMIPSSubType_mips32r6el : ArchSpec::eMIPSSubType_mips32r6; +case llvm::ELF::EF_MIPS_ARCH_3: +case llvm::ELF::EF_MIPS_ARCH_4: +case llvm::ELF::EF_MIPS_ARCH_5: case llvm::ELF::EF_MIPS_ARCH_64: return (endian == ELFDATA2LSB) ? ArchSpec::eMIPSSubType_mips64el : ArchSpec::eMIPSSubType_mips64; case llvm::ELF::EF_MIPS_ARCH_64R2: ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] r258621 - [LLDB] Consider only valid symbols while resolving by address
Author: mohit.bhakkad Date: Sat Jan 23 04:36:06 2016 New Revision: 258621 URL: http://llvm.org/viewvc/llvm-project?rev=258621&view=rev Log: [LLDB] Consider only valid symbols while resolving by address Reviewers: clayborg. Subscribers: jaydeep, bhushan, sagar, nitesh.jain, lldb-commits. Differential Revision: http://reviews.llvm.org/D16397 Modified: lldb/trunk/include/lldb/Core/RangeMap.h lldb/trunk/include/lldb/Symbol/Symtab.h lldb/trunk/source/Core/Module.cpp lldb/trunk/source/Symbol/Symtab.cpp Modified: lldb/trunk/include/lldb/Core/RangeMap.h URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Core/RangeMap.h?rev=258621&r1=258620&r2=258621&view=diff == --- lldb/trunk/include/lldb/Core/RangeMap.h (original) +++ lldb/trunk/include/lldb/Core/RangeMap.h Sat Jan 23 04:36:06 2016 @@ -1216,6 +1216,25 @@ namespace lldb_private { } return UINT32_MAX; } + +uint32_t +FindEntryIndexesThatContains (B addr, std::vector &indexes) const +{ +#ifdef ASSERT_RANGEMAP_ARE_SORTED +assert (IsSorted()); +#endif + +if (!m_entries.empty()) +{ +typename Collection::const_iterator pos; +for(pos = m_entries.begin(); pos != m_entries.end(); pos++) +{ +if (pos->Contains(addr)) +indexes.push_back (pos->data); +} +} +return indexes.size() ; +} Entry * FindEntryThatContains (B addr) Modified: lldb/trunk/include/lldb/Symbol/Symtab.h URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Symbol/Symtab.h?rev=258621&r1=258620&r2=258621&view=diff == --- lldb/trunk/include/lldb/Symbol/Symtab.h (original) +++ lldb/trunk/include/lldb/Symbol/Symtab.h Sat Jan 23 04:36:06 2016 @@ -81,6 +81,7 @@ public: Symbol *FindFirstSymbolWithNameAndType (const ConstString &name, lldb::SymbolType symbol_type, Debug symbol_debug_type, Visibility symbol_visibility); Symbol *FindSymbolContainingFileAddress (lldb::addr_t file_addr, const uint32_t* indexes, uint32_t num_indexes); Symbol *FindSymbolContainingFileAddress (lldb::addr_t file_addr); +voidForEachSymbolContainingFileAddresss (lldb::addr_t file_addr, std::function const &callback); size_t FindFunctionSymbols (const ConstString &name, uint32_t name_type_mask, SymbolContextList& sc_list); voidCalculateSymbolSizes (); Modified: lldb/trunk/source/Core/Module.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/Module.cpp?rev=258621&r1=258620&r2=258621&view=diff == --- lldb/trunk/source/Core/Module.cpp (original) +++ lldb/trunk/source/Core/Module.cpp Sat Jan 23 04:36:06 2016 @@ -559,7 +559,16 @@ Module::ResolveSymbolContextForAddress ( Symtab *symtab = sym_vendor->GetSymtab(); if (symtab && so_addr.IsSectionOffset()) { -sc.symbol = symtab->FindSymbolContainingFileAddress(so_addr.GetFileAddress()); +Symbol *matching_symbol = nullptr; +symtab->ForEachSymbolContainingFileAddresss (so_addr.GetFileAddress(), [&matching_symbol](Symbol *symbol) -> bool { +if (symbol->GetType() != eSymbolTypeInvalid) +{ +matching_symbol = symbol; +return false; // Stop iterating +} +return true; // Keep iterating +}); +sc.symbol = matching_symbol; if (!sc.symbol && resolve_scope & eSymbolContextFunction && !(resolved_flags & eSymbolContextFunction)) { Modified: lldb/trunk/source/Symbol/Symtab.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Symbol/Symtab.cpp?rev=258621&r1=258620&r2=258621&view=diff == --- lldb/trunk/source/Symbol/Symtab.cpp (original) +++ lldb/trunk/source/Symbol/Symtab.cpp Sat Jan 23 04:36:06 2016 @@ -1074,6 +1074,26 @@ Symtab::FindSymbolContainingFileAddress } void +Symtab::ForEachSymbolContainingFileAddresss (addr_t file_addr, std::function const &callback) +{ +Mutex::Locker locker (m_mutex); + +if (!m_file_addr_to_index_computed) +InitAddressIndexes(); + +std::vector all_addr_indexes; + +// Get all symbols with file_addr +const size_t addr_match_count = m_file_addr_to_index.FindEntryIndexesThatContains(file_addr, all_addr_indexes); + +for (size_t i=0; i &symbol_indexes, SymbolContextList &sc_list) { // No need to protect
[Lldb-commits] [lldb] r260362 - [LLDB][MIPS] Generalise MIPS arch names
Author: mohit.bhakkad Date: Wed Feb 10 00:58:13 2016 New Revision: 260362 URL: http://llvm.org/viewvc/llvm-project?rev=260362&view=rev Log: [LLDB][MIPS] Generalise MIPS arch names Patch by Nitesh Jain Reviewers: clayborg, jaydeep. Subscribers: zturner, bhushan, mohit.bhakkad, sagar, lldb-commits. Differential Revision: http://reviews.llvm.org/D16840 Modified: lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/crash_during_step/TestCrashDuringStep.py lldb/trunk/packages/Python/lldbsuite/test/functionalities/watchpoint/hello_watchlocation/TestWatchLocation.py lldb/trunk/packages/Python/lldbsuite/test/functionalities/watchpoint/step_over_watchpoint/TestStepOverWatchpoint.py Modified: lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/crash_during_step/TestCrashDuringStep.py URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/crash_during_step/TestCrashDuringStep.py?rev=260362&r1=260361&r2=260362&view=diff == --- lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/crash_during_step/TestCrashDuringStep.py (original) +++ lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/crash_during_step/TestCrashDuringStep.py Wed Feb 10 00:58:13 2016 @@ -22,7 +22,7 @@ class CreateDuringStepTestCase(TestBase) @expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr24778") @expectedFailureAndroid("llvm.org/pr24497", archs=['arm', 'aarch64']) -@expectedFailureAll(archs=['mips', 'mipsel', 'mips64', 'mips64el'])# IO error due to breakpoint at invalid address +@expectedFailureAll(triple = re.compile('^mips'))# IO error due to breakpoint at invalid address def test_step_inst_with(self): """Test thread creation during step-inst handling.""" self.build(dictionary=self.getBuildFlags()) Modified: lldb/trunk/packages/Python/lldbsuite/test/functionalities/watchpoint/hello_watchlocation/TestWatchLocation.py URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/watchpoint/hello_watchlocation/TestWatchLocation.py?rev=260362&r1=260361&r2=260362&view=diff == --- lldb/trunk/packages/Python/lldbsuite/test/functionalities/watchpoint/hello_watchlocation/TestWatchLocation.py (original) +++ lldb/trunk/packages/Python/lldbsuite/test/functionalities/watchpoint/hello_watchlocation/TestWatchLocation.py Wed Feb 10 00:58:13 2016 @@ -32,7 +32,7 @@ class HelloWatchLocationTestCase(TestBas @expectedFailureAndroid(archs=['arm', 'aarch64']) # Watchpoints not supported @expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr24446: WINDOWS XFAIL TRIAGE - Watchpoints not supported on Windows") -@expectedFailureAll(archs=['mips', 'mipsel', 'mips64', 'mips64el']) # Most of the MIPS boards provide only one H/W watchpoints, and S/W watchpoints are not supported yet +@expectedFailureAll(triple = re.compile('^mips')) # Most of the MIPS boards provide only one H/W watchpoints, and S/W watchpoints are not supported yet @skipIfDarwin def test_hello_watchlocation(self): """Test watching a location with '-s size' option.""" Modified: lldb/trunk/packages/Python/lldbsuite/test/functionalities/watchpoint/step_over_watchpoint/TestStepOverWatchpoint.py URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/watchpoint/step_over_watchpoint/TestStepOverWatchpoint.py?rev=260362&r1=260361&r2=260362&view=diff == --- lldb/trunk/packages/Python/lldbsuite/test/functionalities/watchpoint/step_over_watchpoint/TestStepOverWatchpoint.py (original) +++ lldb/trunk/packages/Python/lldbsuite/test/functionalities/watchpoint/step_over_watchpoint/TestStepOverWatchpoint.py Wed Feb 10 00:58:13 2016 @@ -74,7 +74,7 @@ class TestStepOverWatchpoint(TestBase): # Most of the MIPS boards provide only one H/W watchpoints, and S/W watchpoints are not supported yet arch = self.getArchitecture() -if arch in ['mips', 'mipsel', 'mips64', 'mips64el']: +if re.match("^mips",arch): self.runCmd("watchpoint delete 1") # resolve_location=True, read=False, write=True ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] r262819 - [LLDB][MIPS] Fix TestDisassembleBreakpoint
Author: mohit.bhakkad Date: Mon Mar 7 03:12:49 2016 New Revision: 262819 URL: http://llvm.org/viewvc/llvm-project?rev=262819&view=rev Log: [LLDB][MIPS] Fix TestDisassembleBreakpoint Patch by Nitesh Jain Reviewers: clayborg, jaydeep. Subscribers: bhushan, mohit.bhakkad, sagar, lldb-commits. Differential Revision: http://reviews.llvm.org/D17597 Modified: lldb/trunk/packages/Python/lldbsuite/test/functionalities/disassembly/TestDisassembleBreakpoint.py Modified: lldb/trunk/packages/Python/lldbsuite/test/functionalities/disassembly/TestDisassembleBreakpoint.py URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/disassembly/TestDisassembleBreakpoint.py?rev=262819&r1=262818&r2=262819&view=diff == --- lldb/trunk/packages/Python/lldbsuite/test/functionalities/disassembly/TestDisassembleBreakpoint.py (original) +++ lldb/trunk/packages/Python/lldbsuite/test/functionalities/disassembly/TestDisassembleBreakpoint.py Mon Mar 7 03:12:49 2016 @@ -42,7 +42,7 @@ class DisassemblyTestCase(TestBase): instructions = [' add ', ' ldr ', ' str '] elif re.match("mips" , arch): breakpoint_opcodes = ["break"] -instructions = ['lw', 'sw', 'jr'] +instructions = ['lw', 'sw'] else: # TODO please add your arch here self.fail('unimplemented for arch = "{arch}"'.format(arch=self.getArchitecture())) ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] r264030 - [LLDB]{MIPS] Fix TestPlatformProcessConnect.py
Author: mohit.bhakkad Date: Tue Mar 22 03:08:02 2016 New Revision: 264030 URL: http://llvm.org/viewvc/llvm-project?rev=264030&view=rev Log: [LLDB]{MIPS] Fix TestPlatformProcessConnect.py Patch by Nitesh Jain Reviewers: clayborg, labath. Subscribers: jaydeep, bhushan, mohit.bhakkad, sagar, lldb-commits. Differential Revision: http://reviews.llvm.org/D18082 Modified: lldb/trunk/source/Plugins/Platform/Android/PlatformAndroidRemoteGDBServer.cpp lldb/trunk/source/Plugins/Platform/Android/PlatformAndroidRemoteGDBServer.h lldb/trunk/source/Plugins/Platform/gdb-server/PlatformRemoteGDBServer.cpp lldb/trunk/source/Plugins/Platform/gdb-server/PlatformRemoteGDBServer.h Modified: lldb/trunk/source/Plugins/Platform/Android/PlatformAndroidRemoteGDBServer.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Platform/Android/PlatformAndroidRemoteGDBServer.cpp?rev=264030&r1=264029&r2=264030&view=diff == --- lldb/trunk/source/Plugins/Platform/Android/PlatformAndroidRemoteGDBServer.cpp (original) +++ lldb/trunk/source/Plugins/Platform/Android/PlatformAndroidRemoteGDBServer.cpp Tue Mar 22 03:08:02 2016 @@ -258,18 +258,3 @@ PlatformAndroidRemoteGDBServer::ConnectP target, error); } - -size_t -PlatformAndroidRemoteGDBServer::ConnectToWaitingProcesses(Debugger& debugger, Error& error) -{ -std::vector connection_urls; -GetPendingGdbServerList(connection_urls); - -for (size_t i = 0; i < connection_urls.size(); ++i) -{ -ConnectProcess(connection_urls[i].c_str(), nullptr, debugger, nullptr, error); -if (error.Fail()) -return i; // We already connected to i process succsessfully -} -return connection_urls.size(); -} Modified: lldb/trunk/source/Plugins/Platform/Android/PlatformAndroidRemoteGDBServer.h URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Platform/Android/PlatformAndroidRemoteGDBServer.h?rev=264030&r1=264029&r2=264030&view=diff == --- lldb/trunk/source/Plugins/Platform/Android/PlatformAndroidRemoteGDBServer.h (original) +++ lldb/trunk/source/Plugins/Platform/Android/PlatformAndroidRemoteGDBServer.h Tue Mar 22 03:08:02 2016 @@ -46,9 +46,6 @@ public: lldb_private::Target *target, lldb_private::Error &error) override; -size_t -ConnectToWaitingProcesses(lldb_private::Debugger& debugger, lldb_private::Error& error) override; - protected: std::string m_device_id; std::map m_port_forwards; Modified: lldb/trunk/source/Plugins/Platform/gdb-server/PlatformRemoteGDBServer.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Platform/gdb-server/PlatformRemoteGDBServer.cpp?rev=264030&r1=264029&r2=264030&view=diff == --- lldb/trunk/source/Plugins/Platform/gdb-server/PlatformRemoteGDBServer.cpp (original) +++ lldb/trunk/source/Plugins/Platform/gdb-server/PlatformRemoteGDBServer.cpp Tue Mar 22 03:08:02 2016 @@ -1002,6 +1002,22 @@ PlatformRemoteGDBServer::ConnectProcess( } size_t +PlatformRemoteGDBServer::ConnectToWaitingProcesses(Debugger& debugger, Error& error) +{ +std::vector connection_urls; +GetPendingGdbServerList(connection_urls); + +for (size_t i = 0; i < connection_urls.size(); ++i) +{ +ConnectProcess(connection_urls[i].c_str(), nullptr, debugger, nullptr, error); +if (error.Fail()) +return i; // We already connected to i process succsessfully +} +return connection_urls.size(); + +} + +size_t PlatformRemoteGDBServer::GetPendingGdbServerList(std::vector& connection_urls) { std::vector> remote_servers; Modified: lldb/trunk/source/Plugins/Platform/gdb-server/PlatformRemoteGDBServer.h URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Platform/gdb-server/PlatformRemoteGDBServer.h?rev=264030&r1=264029&r2=264030&view=diff == --- lldb/trunk/source/Plugins/Platform/gdb-server/PlatformRemoteGDBServer.h (original) +++ lldb/trunk/source/Plugins/Platform/gdb-server/PlatformRemoteGDBServer.h Tue Mar 22 03:08:02 2016 @@ -224,6 +224,9 @@ public: lldb_private::Target *target, lldb_private::Error &error) override; +size_t +ConnectToWaitingProcesses(lldb_private::Debugger& debugger, lldb_private::Error& error) override; + virtual size_t GetPendingGdbServerList(std::vector& connection_urls); ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] r266589 - [LLDB][MIPS] Fix TestConcurrentEvents
Author: mohit.bhakkad Date: Mon Apr 18 00:27:42 2016 New Revision: 266589 URL: http://llvm.org/viewvc/llvm-project?rev=266589&view=rev Log: [LLDB][MIPS] Fix TestConcurrentEvents Patch by Nitesh Jain Reviewers: clayborg Subscribers: jaydeep, bhushan, mohit.bhakkad, sagar Differential Revision: http://reviews.llvm.org/D18389 Modified: lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentEvents.py Modified: lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentEvents.py URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentEvents.py?rev=266589&r1=266588&r2=266589&view=diff == --- lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentEvents.py (original) +++ lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentEvents.py Mon Apr 18 00:27:42 2016 @@ -30,28 +30,28 @@ class ConcurrentEventsTestCase(TestBase) ## Tests for multiple threads that generate a single event. # @unittest2.skipIf(TestBase.skipLongRunningTest(), "Skip this long running test") -@expectedFailureAll(archs=['mips64', 'mips64el']) # Atomic sequences are not supported yet for MIPS in LLDB. +@expectedFailureAll(triple = '^mips') # Atomic sequences are not supported yet for MIPS in LLDB. def test_many_breakpoints(self): """Test 100 breakpoints from 100 threads.""" self.build(dictionary=self.getBuildFlags()) self.do_thread_actions(num_breakpoint_threads=100) @unittest2.skipIf(TestBase.skipLongRunningTest(), "Skip this long running test") -@expectedFailureAll(archs=['mips64', 'mips64el']) # Atomic sequences are not supported yet for MIPS in LLDB. +@expectedFailureAll(triple = '^mips') # Atomic sequences are not supported yet for MIPS in LLDB. def test_many_watchpoints(self): """Test 100 watchpoints from 100 threads.""" self.build(dictionary=self.getBuildFlags()) self.do_thread_actions(num_watchpoint_threads=100) @unittest2.skipIf(TestBase.skipLongRunningTest(), "Skip this long running test") -@expectedFailureAll(archs=['mips64', 'mips64el']) # Atomic sequences are not supported yet for MIPS in LLDB. +@expectedFailureAll(triple = '^mips') # Atomic sequences are not supported yet for MIPS in LLDB. def test_many_signals(self): """Test 100 signals from 100 threads.""" self.build(dictionary=self.getBuildFlags()) self.do_thread_actions(num_signal_threads=100) @unittest2.skipIf(TestBase.skipLongRunningTest(), "Skip this long running test") -@expectedFailureAll(archs=['mips64', 'mips64el']) # Atomic sequences are not supported yet for MIPS in LLDB. +@expectedFailureAll(triple = '^mips') # Atomic sequences are not supported yet for MIPS in LLDB. def test_many_crash(self): """Test 100 threads that cause a segfault.""" self.build(dictionary=self.getBuildFlags()) @@ -62,21 +62,21 @@ class ConcurrentEventsTestCase(TestBase) ## Tests for concurrent signal and breakpoint # @skipIfFreeBSD # timing out on buildbot -@expectedFailureAll(archs=['mips64', 'mips64el']) # Atomic sequences are not supported yet for MIPS in LLDB. +@expectedFailureAll(triple = '^mips') # Atomic sequences are not supported yet for MIPS in LLDB. def test_signal_break(self): """Test signal and a breakpoint in multiple threads.""" self.build(dictionary=self.getBuildFlags()) self.do_thread_actions(num_breakpoint_threads=1, num_signal_threads=1) @skipIfFreeBSD # timing out on buildbot -@expectedFailureAll(archs=['mips64', 'mips64el']) # Atomic sequences are not supported yet for MIPS in LLDB. +@expectedFailureAll(triple = '^mips') # Atomic sequences are not supported yet for MIPS in LLDB. def test_delay_signal_break(self): """Test (1-second delay) signal and a breakpoint in multiple threads.""" self.build(dictionary=self.getBuildFlags()) self.do_thread_actions(num_breakpoint_threads=1, num_delay_signal_threads=1) @skipIfFreeBSD # timing out on buildbot -@expectedFailureAll(archs=['mips64', 'mips64el']) # Atomic sequences are not supported yet for MIPS in LLDB. +@expectedFailureAll(triple = '^mips') # Atomic sequences are not supported yet for MIPS in LLDB. def test_signal_delay_break(self): """Test signal and a (1 second delay) breakpoint in multiple threads.""" self.build(dictionary=self.getBuildFlags()) @@ -88,7 +88,7 @@ class ConcurrentEventsTestCase(TestBase) # @skipIfFreeBSD # timing out on buildbot @skipIfRemoteDueToDeadlock -@expectedFailureAll(archs=['mips64', 'mips64el']) # Atomic sequen
[Lldb-commits] [lldb] r246293 - [LLDB][MIPS] Aligning code with rL245831
Author: mohit.bhakkad Date: Fri Aug 28 07:08:26 2015 New Revision: 246293 URL: http://llvm.org/viewvc/llvm-project?rev=246293&view=rev Log: [LLDB][MIPS] Aligning code with rL245831 Reviewers: jaydeep Subscribers: lldb-commits. Differential Revision: http://reviews.llvm.org/D12427 Modified: lldb/trunk/source/Plugins/Process/Linux/NativeProcessLinux.cpp Modified: lldb/trunk/source/Plugins/Process/Linux/NativeProcessLinux.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Linux/NativeProcessLinux.cpp?rev=246293&r1=246292&r2=246293&view=diff == --- lldb/trunk/source/Plugins/Process/Linux/NativeProcessLinux.cpp (original) +++ lldb/trunk/source/Plugins/Process/Linux/NativeProcessLinux.cpp Fri Aug 28 07:08:26 2015 @@ -1302,7 +1302,7 @@ NativeProcessLinux::MonitorSIGTRAP(const log->Printf("NativeProcessLinux::%s() " "received error while checking for watchpoint hits, " "pid = %" PRIu64 " error = %s", -__FUNCTION__, pid, error.AsCString()); +__FUNCTION__, thread.GetID(), error.AsCString()); if (wp_index != LLDB_INVALID_INDEX32) { MonitorWatchpoint(thread, wp_index); ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] r247129 - [LLDB][MIPS] MIPS load/store instruction emulation for hardware watchpoints
Author: mohit.bhakkad Date: Wed Sep 9 05:17:58 2015 New Revision: 247129 URL: http://llvm.org/viewvc/llvm-project?rev=247129&view=rev Log: [LLDB][MIPS] MIPS load/store instruction emulation for hardware watchpoints Reviewers: clayborg. Subscribers: jaydeep, bhushan, sagar, nitesh.jain, lldb-commits. Differential Revision: http://reviews.llvm.org/D12670 Modified: lldb/trunk/source/Plugins/Instruction/MIPS/EmulateInstructionMIPS.cpp lldb/trunk/source/Plugins/Instruction/MIPS/EmulateInstructionMIPS.h lldb/trunk/source/Plugins/Instruction/MIPS64/EmulateInstructionMIPS64.cpp lldb/trunk/source/Plugins/Instruction/MIPS64/EmulateInstructionMIPS64.h Modified: lldb/trunk/source/Plugins/Instruction/MIPS/EmulateInstructionMIPS.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Instruction/MIPS/EmulateInstructionMIPS.cpp?rev=247129&r1=247128&r2=247129&view=diff == --- lldb/trunk/source/Plugins/Instruction/MIPS/EmulateInstructionMIPS.cpp (original) +++ lldb/trunk/source/Plugins/Instruction/MIPS/EmulateInstructionMIPS.cpp Wed Sep 9 05:17:58 2015 @@ -411,6 +411,64 @@ EmulateInstructionMIPS::GetOpcodeForInst { "LW", &EmulateInstructionMIPS::Emulate_LW, "LW rt,offset(base)" }, //-- +// Load/Store instructions + //-- +/* Following list of emulated instructions are required by implementation of hardware watchpoint + for MIPS in lldb. As we just need the address accessed by instructions, we have generalised + all these instructions in 2 functions depending on their addressing modes */ + +{ "LB", &EmulateInstructionMIPS::Emulate_LDST_Imm, "LBrt, offset(base)" }, +{ "LBE",&EmulateInstructionMIPS::Emulate_LDST_Imm, "LBE rt, offset(base)" }, +{ "LBU",&EmulateInstructionMIPS::Emulate_LDST_Imm, "LBU rt, offset(base)" }, +{ "LBUE", &EmulateInstructionMIPS::Emulate_LDST_Imm, "LBUE rt, offset(base)" }, +{ "LDC1", &EmulateInstructionMIPS::Emulate_LDST_Imm, "LDC1 ft, offset(base)" }, +{ "LD", &EmulateInstructionMIPS::Emulate_LDST_Imm, "LDrt, offset(base)" }, +{ "LDL",&EmulateInstructionMIPS::Emulate_LDST_Imm, "LDL rt, offset(base)" }, +{ "LDR",&EmulateInstructionMIPS::Emulate_LDST_Imm, "LDR rt, offset(base)" }, +{ "LLD",&EmulateInstructionMIPS::Emulate_LDST_Imm, "LLD rt, offset(base)" }, +{ "LDC2", &EmulateInstructionMIPS::Emulate_LDST_Imm, "LDC2 rt, offset(base)" }, +{ "LDXC1", &EmulateInstructionMIPS::Emulate_LDST_Reg, "LDXC1 fd, index (base)" }, +{ "LH", &EmulateInstructionMIPS::Emulate_LDST_Imm, "LHrt, offset(base)" }, +{ "LHE",&EmulateInstructionMIPS::Emulate_LDST_Imm, "LHE rt, offset(base)" }, +{ "LHU",&EmulateInstructionMIPS::Emulate_LDST_Imm, "LHU rt, offset(base)" }, +{ "LHUE", &EmulateInstructionMIPS::Emulate_LDST_Imm, "LHUE rt, offset(base)" }, +{ "LL", &EmulateInstructionMIPS::Emulate_LDST_Imm, "LLrt, offset(base)" }, +{ "LLE",&EmulateInstructionMIPS::Emulate_LDST_Imm, "LLE rt, offset(base)" }, +{ "LUXC1", &EmulateInstructionMIPS::Emulate_LDST_Reg, "LUXC1 fd, index (base)" }, +{ "LW", &EmulateInstructionMIPS::Emulate_LDST_Imm, "LWrt, offset(base)" }, +{ "LWC1", &EmulateInstructionMIPS::Emulate_LDST_Imm, "LWC1 ft, offset(base)" }, +{ "LWC2", &EmulateInstructionMIPS::Emulate_LDST_Imm, "LWC2 rt, offset(base)" }, +{ "LWE",&EmulateInstructionMIPS::Emulate_LDST_Imm, "LWE rt, offset(base)" }, +{ "LWL",&EmulateInstructionMIPS::Emulate_LDST_Imm, "LWL rt, offset(base)" }, +{ "LWLE", &EmulateInstructionMIPS::Emulate_LDST_Imm, "LWLE rt, offset(base)" }, +{ "LWR",&EmulateInstructionMIPS::Emulate_LDST_Imm, "LWR rt, offset(base)" }, +{ "LWRE", &EmulateInstructionMIPS::Emulate_LDST_Imm, "LWRE rt, offset(base)" }, +{ "LWXC1", &EmulateInstructionMIPS::Emulate_LDST_Reg, "LWXC1 fd, index (base)" }, + +{ "SB", &EmulateInstructionMIPS::Emulate_LDST_Imm, "SBrt, offset(base)" }, +{ "SBE",&EmulateInstructionMIPS::Emulate_LDST_Imm, "SBE rt, offset(base)" }, +{ "SC", &EmulateInstructionMIPS::Emulate_LDST_Imm, "SC
[Lldb-commits] [lldb] r247134 - [LLDB][MIPS] Added support for the debugging of N32/O32 applications on MIPS64 target.
Author: mohit.bhakkad Date: Wed Sep 9 05:32:20 2015 New Revision: 247134 URL: http://llvm.org/viewvc/llvm-project?rev=247134&view=rev Log: [LLDB][MIPS] Added support for the debugging of N32/O32 applications on MIPS64 target. Patch by Nitesh Jain Reviewers: clayborg, ovyalov. Subscribers: jaydeep, bhushan, mohit.bhakkad, sagar, nitesh.jain, lldb-commits. Differential Revision: http://reviews.llvm.org/D12671 Modified: lldb/trunk/include/lldb/Core/ArchSpec.h lldb/trunk/source/Core/ArchSpec.cpp lldb/trunk/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp Modified: lldb/trunk/include/lldb/Core/ArchSpec.h URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Core/ArchSpec.h?rev=247134&r1=247133&r2=247134&view=diff == --- lldb/trunk/include/lldb/Core/ArchSpec.h (original) +++ lldb/trunk/include/lldb/Core/ArchSpec.h Wed Sep 9 05:32:20 2015 @@ -65,7 +65,11 @@ public: eMIPSAse_mips16 = 0x0400, // MIPS16 ASE eMIPSAse_micromips = 0x0800, // MICROMIPS ASE eMIPSAse_xpa= 0x1000, // XPA ASE -eMIPSAse_mask = 0x1fff +eMIPSAse_mask = 0x1fff, +eMIPSABI_O32= 0x2000, +eMIPSABI_N32= 0x4000, +eMIPSABI_N64= 0x8000, +eMIPSABI_mask = 0x000ff000 }; enum Core Modified: lldb/trunk/source/Core/ArchSpec.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/ArchSpec.cpp?rev=247134&r1=247133&r2=247134&view=diff == --- lldb/trunk/source/Core/ArchSpec.cpp (original) +++ lldb/trunk/source/Core/ArchSpec.cpp Wed Sep 9 05:32:20 2015 @@ -602,7 +602,15 @@ ArchSpec::GetAddressByteSize() const { const CoreDefinition *core_def = FindCoreDefinition (m_core); if (core_def) -return core_def->addr_byte_size; +{ + if (core_def->machine == llvm::Triple::mips64 || core_def->machine == llvm::Triple::mips64el) + { + // For N32/O32 applications Address size is 4 bytes. + if (m_flags & (eMIPSABI_N32 | eMIPSABI_O32)) + return 4; + } + return core_def->addr_byte_size; +} return 0; } Modified: lldb/trunk/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp?rev=247134&r1=247133&r2=247134&view=diff == --- lldb/trunk/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp (original) +++ lldb/trunk/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp Wed Sep 9 05:32:20 2015 @@ -1517,8 +1517,8 @@ ObjectFileELF::GetSectionHeaderInfo(Sect I != section_headers.end(); ++I) { static ConstString g_sect_name_gnu_debuglink (".gnu_debuglink"); -const ELFSectionHeaderInfo &header = *I; -const uint64_t section_size = header.sh_type == SHT_NOBITS ? 0 : header.sh_size; +const ELFSectionHeaderInfo &sheader = *I; +const uint64_t section_size = sheader.sh_type == SHT_NOBITS ? 0 : sheader.sh_size; ConstString name(shstr_data.PeekCStr(I->sh_name)); I->section_name = name; @@ -1526,23 +1526,33 @@ ObjectFileELF::GetSectionHeaderInfo(Sect if (arch_spec.GetMachine() == llvm::Triple::mips || arch_spec.GetMachine() == llvm::Triple::mipsel || arch_spec.GetMachine() == llvm::Triple::mips64 || arch_spec.GetMachine() == llvm::Triple::mips64el) { -if (header.sh_type == SHT_MIPS_ABIFLAGS) +uint32_t arch_flags = arch_spec.GetFlags (); +DataExtractor data; +if (sheader.sh_type == SHT_MIPS_ABIFLAGS) { -DataExtractor data; -if (section_size && (data.SetData (object_data, header.sh_offset, section_size) == section_size)) + +if (section_size && (data.SetData (object_data, sheader.sh_offset, section_size) == section_size)) { lldb::offset_t ase_offset = 12; // MIPS ABI Flags Version: 0 -uint32_t arch_flags = arch_spec.GetFlags (); arch_flags |= data.GetU32 (&ase_offset); -arch_spec.SetFlags (arch_flags); } } +// Settings appropriate ArchSpec ABI Flags +if (header.e_flags & llvm::ELF::EF_MIPS_ABI2) +{ +arch_flags |= lldb_private::ArchSpec::eMIPSABI_N32; +} +else if (header.e_fla