[lldb-dev] Heterogeneous debugging and HSA

2016-06-08 Thread Simon Brand via lldb-dev

Hi everyone,

I am a member of the HSA Foundation tools group, who are attempting to 
standardise debugging and profiling interfaces for heterogeneous systems.


HSA is a low-level heterogeneous system architecture and software 
platform. There are standards describing the architectural requirements, 
an LLVM-IR-like intermediate language for portable HSA applications 
(HSAIL), and a runtime interface for interacting with the system. We are 
currently developing a standard for debugging HSA applications in a 
vendor-independent manner.


By working together with other communities, we are hoping to extend 
existing debuggers and standards to support such systems. To this end, 
I'm hoping to start a conversation with you all about how LLDB could be 
augmented to support heterogeneous debugging, and to ask for input about 
the standards we are writing.


To aid these discussions and provide a testbed for ideas, I have 
modified LLDB to support debugging HSA programs on AMD's hardware. My 
aim for this project is to adapt it to the standard HSA debugging 
interface once this is completed, so that it could debug HSA 
applications on any vendor's implementation.


Currently, the changes I have made to LLDB are in no state for 
upstreaming to trunk LLDB, as I have made some HSA-specific alterations 
to core parts of the code base. My hope is that, aided by discussion 
with the community, I can abstract out these modifications to support 
the necessary features in an elegant and extensible manner. This would 
most likely involve changing the threading model of LLDB to support 
groups of threads which run on different devices and a "some-stop" model 
by which some thread groups can continue to execute whilst others are 
stopped. I plan on starting work on this soon, but I wonder if anyone 
else is already exploring this avenue?


If you would like to examine the code for my LLDB port or try it out, 
you can get the code here: 
https://github.com/HSAFoundation/HSA-Debugger-LLDB-Source


For our debugging standard, we are currently trying to work out the best 
way to express the multiple address spaces of HSA in DWARF and get an 
idea of how this is handled by GDB and LLDB. Our current thinking is to 
use DW_AT_address_class for pointers types and DW_op_xdref for 
variables. I couldn't see anywhere these are handled in LLDB; is there 
any ongoing work to add them? Or would you recommend a different approach?


Feel free to send me any queries or issues regarding the LLDB 
implementation or the HSA standards work.


Thanks,

Simon Brand

--
Simon Brand
Staff Software Engineer
Codeplay Software Ltd
Level C, Argyle House, 3 Lady Lawson St, Edinburgh, EH3 9DR
Tel: 0131 466 0503
Fax: 0131 557 6600
Website: http://www.codeplay.com
Twitter: https://twitter.com/codeplaysoft

This email and any attachments may contain confidential and /or privileged 
information and is for use by the addressee only. If you are not the intended 
recipient, please notify Codeplay Software Ltd immediately and delete the 
message from your computer. You may not copy or forward it, or use or disclose 
its contents to any other person. Any views or other information in this 
message which do not relate to our business are not authorized by Codeplay 
software Ltd, nor does this message form part of any contract unless so stated.
As internet communications are capable of data corruption Codeplay Software Ltd 
does not accept any responsibility for any changes made to this message after 
it was sent. Please note that Codeplay Software Ltd does not accept any 
liability or responsibility for viruses and it is your responsibility to scan 
any attachments.
Company registered in England and Wales, number: 04567874
Registered office: 81 Linkfield Street, Redhill RH1 6BY

___
lldb-dev mailing list
lldb-dev@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev


[lldb-dev] Debugging and non-byte-oriented architectures

2016-06-08 Thread Tyro Software via lldb-dev
LLDB and the GDB remote serial protocol beneath it are quite strongly
byte-oriented, for example the RSP "read memory" command has arguments
"addr,length-in-bytes". I'm experimenting with a debugger target for an
architecture that is based upon 16-bit-words, and while it's simple to map
between words and bytes (e.g. when reading code from $PC double the address
and the number of units retrieved) this gets confusing and raises the risk
that its doesn't get done universally.

My impression is that the code base is quite strongly wedded to 8-bit bytes
addressed directly, but maybe I didn't notice some kind of transparent
scaling (e.g. declare a register class as being 16-bit-word, then all
indirect access through it gets automagically scaled)? Are there existing
non-byte-based architectures supported by LLDB that I could look at?

/Tyro
___
lldb-dev mailing list
lldb-dev@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev


[lldb-dev] [Bug 28055] New: continue in watchpoint commands disables the watchpoint

2016-06-08 Thread via lldb-dev
https://llvm.org/bugs/show_bug.cgi?id=28055

Bug ID: 28055
   Summary: continue in watchpoint commands disables the
watchpoint
   Product: lldb
   Version: unspecified
  Hardware: All
OS: All
Status: NEW
  Severity: normal
  Priority: P
 Component: All Bugs
  Assignee: lldb-dev@lists.llvm.org
  Reporter: jing...@apple.com
CC: llvm-b...@lists.llvm.org
Classification: Unclassified

If you have a watchpoint set on a variable which will get hit multiple times,
and if you issue SBProcess::Continue after the first hit, the watchpoint won't
get hit again.

I added the test "test_continue_in_watchpoint_command" to
TestWatchpointCommandPython.py to demonstrate this failure.

This used to work, it was broken sometime in the past year.

-- 
You are receiving this mail because:
You are the assignee for the bug.
___
lldb-dev mailing list
lldb-dev@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev


[lldb-dev] LLDB testsuite failing to import lldb python module

2016-06-08 Thread Omair Javaid via lldb-dev
Hi,

I am trying to run lldb testsuite on arm hardware with lldb and
lldbserver binaries cross compiled on x86_64 builder.

I have lldb-server running on my arm hardware. Also i have lldb source
tree checkout and liblldb and lldb binaries places in lib and bin
folders respectively.

I am ablle to connect to my server by manualy running lldb and issuing
a platform connect command. However I am getting a python lldb module
import error like the one given below:

importerror: no module named lldb

I think i have some path issue or i am missing something while copying
lldb stuff from my builder.

Can someone track what I am doing wrong here?


Any help would be much appreciated.

here's how i am runing testsuite:

DOTEST_OPTS="--executable /home/omair/lldb/host/build/host/bin/lldb -A
arm -C gcc -s /home/omair/lldb/host/test/raspberryPi3-xenial
--skip-category lldb-mi -u CXXFLAGS -u CFLAGS --platform-name
remote-linux --platform-url connect://localhost:5432
--platform-working-dir /home/omair/lldb/armhf/tmp --env OS=Linux"
./dotest.py `echo $DOTEST_OPTS`



Thanks!
___
lldb-dev mailing list
lldb-dev@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev