<feed xmlns='http://www.w3.org/2005/Atom'>
<title>llvm-project.git/lldb/examples/python/operating_system.py, branch users/nico/python-1</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.
</subtitle>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/'/>
<entry>
<title>[NFC][Py Reformat] Reformat python files in lldb</title>
<updated>2023-05-25T19:54:09+00:00</updated>
<author>
<name>Jonas Devlieghere</name>
<email>jonas@devlieghere.com</email>
</author>
<published>2023-05-25T15:48:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=2238dcc39358353cac21df75c3c3286ab20b8f53'/>
<id>2238dcc39358353cac21df75c3c3286ab20b8f53</id>
<content type='text'>
This is an ongoing series of commits that are reformatting our Python
code. Reformatting is done with `black` (23.1.0).

If you end up having problems merging this commit because you have made
changes to a python file, the best way to handle that is to run `git
checkout --ours &lt;yourfile&gt;` and then reformat it with black.

RFC: https://discourse.llvm.org/t/rfc-document-and-standardize-python-code-style

Differential revision: https://reviews.llvm.org/D151460
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This is an ongoing series of commits that are reformatting our Python
code. Reformatting is done with `black` (23.1.0).

If you end up having problems merging this commit because you have made
changes to a python file, the best way to handle that is to run `git
checkout --ours &lt;yourfile&gt;` and then reformat it with black.

RFC: https://discourse.llvm.org/t/rfc-document-and-standardize-python-code-style

Differential revision: https://reviews.llvm.org/D151460
</pre>
</div>
</content>
</entry>
<entry>
<title>Harmonize Python shebang</title>
<updated>2020-07-16T19:53:45+00:00</updated>
<author>
<name>serge-sans-paille</name>
<email>sguelton@redhat.com</email>
</author>
<published>2020-07-15T07:31:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=515bc8c1554f03515565878ea3d35cffdc6fd195'/>
<id>515bc8c1554f03515565878ea3d35cffdc6fd195</id>
<content type='text'>
Differential Revision: https://reviews.llvm.org/D83857
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Differential Revision: https://reviews.llvm.org/D83857
</pre>
</div>
</content>
</entry>
<entry>
<title>*** This commit represents a complete reformatting of the LLDB source code</title>
<updated>2016-09-06T20:57:50+00:00</updated>
<author>
<name>Kate Stone</name>
<email>katherine.stone@apple.com</email>
</author>
<published>2016-09-06T20:57:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=b9c1b51e45b845debb76d8658edabca70ca56079'/>
<id>b9c1b51e45b845debb76d8658edabca70ca56079</id>
<content type='text'>
*** to conform to clang-format’s LLVM style.  This kind of mass change has
*** two obvious implications:

Firstly, merging this particular commit into a downstream fork may be a huge
effort.  Alternatively, it may be worth merging all changes up to this commit,
performing the same reformatting operation locally, and then discarding the
merge for this particular commit.  The commands used to accomplish this
reformatting were as follows (with current working directory as the root of
the repository):

    find . \( -iname "*.c" -or -iname "*.cpp" -or -iname "*.h" -or -iname "*.mm" \) -exec clang-format -i {} +
    find . -iname "*.py" -exec autopep8 --in-place --aggressive --aggressive {} + ;

The version of clang-format used was 3.9.0, and autopep8 was 1.2.4.

Secondly, “blame” style tools will generally point to this commit instead of
a meaningful prior commit.  There are alternatives available that will attempt
to look through this change and find the appropriate prior commit.  YMMV.

llvm-svn: 280751
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
*** to conform to clang-format’s LLVM style.  This kind of mass change has
*** two obvious implications:

Firstly, merging this particular commit into a downstream fork may be a huge
effort.  Alternatively, it may be worth merging all changes up to this commit,
performing the same reformatting operation locally, and then discarding the
merge for this particular commit.  The commands used to accomplish this
reformatting were as follows (with current working directory as the root of
the repository):

    find . \( -iname "*.c" -or -iname "*.cpp" -or -iname "*.h" -or -iname "*.mm" \) -exec clang-format -i {} +
    find . -iname "*.py" -exec autopep8 --in-place --aggressive --aggressive {} + ;

The version of clang-format used was 3.9.0, and autopep8 was 1.2.4.

Secondly, “blame” style tools will generally point to this commit instead of
a meaningful prior commit.  There are alternatives available that will attempt
to look through this change and find the appropriate prior commit.  YMMV.

llvm-svn: 280751
</pre>
</div>
</content>
</entry>
<entry>
<title>Remove a print statement that was left in accidentally.</title>
<updated>2013-04-24T22:21:02+00:00</updated>
<author>
<name>Greg Clayton</name>
<email>gclayton@apple.com</email>
</author>
<published>2013-04-24T22:21:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=8d1d25222ec4b1c0d590cd888499d2061eaa67e3'/>
<id>8d1d25222ec4b1c0d590cd888499d2061eaa67e3</id>
<content type='text'>
llvm-svn: 180223
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
llvm-svn: 180223
</pre>
</div>
</content>
</entry>
<entry>
<title>&lt;rdar://problem/13069948&gt;</title>
<updated>2013-01-25T18:06:21+00:00</updated>
<author>
<name>Greg Clayton</name>
<email>gclayton@apple.com</email>
</author>
<published>2013-01-25T18:06:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=c7bece56faa5eef1c3d141d0c0b0b68b28a9aed2'/>
<id>c7bece56faa5eef1c3d141d0c0b0b68b28a9aed2</id>
<content type='text'>
Major fixed to allow reading files that are over 4GB. The main problems were that the DataExtractor was using 32 bit offsets as a data cursor, and since we mmap all of our object files we could run into cases where if we had a very large core file that was over 4GB, we were running into the 4GB boundary.

So I defined a new "lldb::offset_t" which should be used for all file offsets.

After making this change, I enabled warnings for data loss and for enexpected implicit conversions temporarily and found a ton of things that I fixed.

Any functions that take an index internally, should use "size_t" for any indexes and also should return "size_t" for any sizes of collections.

llvm-svn: 173463
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Major fixed to allow reading files that are over 4GB. The main problems were that the DataExtractor was using 32 bit offsets as a data cursor, and since we mmap all of our object files we could run into cases where if we had a very large core file that was over 4GB, we were running into the 4GB boundary.

So I defined a new "lldb::offset_t" which should be used for all file offsets.

After making this change, I enabled warnings for data loss and for enexpected implicit conversions temporarily and found a ton of things that I fixed.

Any functions that take an index internally, should use "size_t" for any indexes and also should return "size_t" for any sizes of collections.

llvm-svn: 173463
</pre>
</div>
</content>
</entry>
<entry>
<title>&lt;rdar://problem/13010007&gt;</title>
<updated>2013-01-18T23:41:08+00:00</updated>
<author>
<name>Greg Clayton</name>
<email>gclayton@apple.com</email>
</author>
<published>2013-01-18T23:41:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=a4d8747d0f52e12b905b1dd61b117605021b14db'/>
<id>a4d8747d0f52e12b905b1dd61b117605021b14db</id>
<content type='text'>
Added the ability for OS plug-ins to lazily populate the thread this. The python OS plug-in classes can now implement the following method:

class OperatingSystemPlugin:
  def create_thread(self, tid, context):
    # Return a dictionary for a new thread to create it on demand

This will add a new thread to the thread list if it doesn't already exist. The example code in lldb/examples/python/operating_system.py has been updated to show how this call us used.

Cleaned up the code in PythonDataObjects.cpp/h:
- renamed all classes that started with PythonData* to be Python*. 
- renamed PythonArray to PythonList. Cleaned up the code to use inheritance where
- Centralized the code that does ref counting in the PythonObject class to a single function.
- Made the "bool PythonObject::Reset(PyObject *)" function be virtual so each subclass can correctly check to ensure a PyObject is of the right type before adopting the object.
- Cleaned up all APIs and added new constructors for the Python* classes to they can all construct form:
	- PyObject *
	- const PythonObject &amp;
	- const lldb::ScriptInterpreterObjectSP &amp;

Cleaned up code in ScriptInterpreterPython:
- Made calling python functions safer by templatizing the production of value formats. Python specifies the value formats based on built in C types (long, long long, etc), and code often uses typedefs for uint32_t, uint64_t, etc when passing arguments down to python. We will now always produce correct value formats as the templatized code will "do the right thing" all the time.
- Fixed issues with the ScriptInterpreterPython::Locker where entering the session and leaving the session had a bunch of issues that could cause the "lldb" module globals lldb.debugger, lldb.target, lldb.process, lldb.thread, and lldb.frame to not be initialized.

llvm-svn: 172873
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Added the ability for OS plug-ins to lazily populate the thread this. The python OS plug-in classes can now implement the following method:

class OperatingSystemPlugin:
  def create_thread(self, tid, context):
    # Return a dictionary for a new thread to create it on demand

This will add a new thread to the thread list if it doesn't already exist. The example code in lldb/examples/python/operating_system.py has been updated to show how this call us used.

Cleaned up the code in PythonDataObjects.cpp/h:
- renamed all classes that started with PythonData* to be Python*. 
- renamed PythonArray to PythonList. Cleaned up the code to use inheritance where
- Centralized the code that does ref counting in the PythonObject class to a single function.
- Made the "bool PythonObject::Reset(PyObject *)" function be virtual so each subclass can correctly check to ensure a PyObject is of the right type before adopting the object.
- Cleaned up all APIs and added new constructors for the Python* classes to they can all construct form:
	- PyObject *
	- const PythonObject &amp;
	- const lldb::ScriptInterpreterObjectSP &amp;

Cleaned up code in ScriptInterpreterPython:
- Made calling python functions safer by templatizing the production of value formats. Python specifies the value formats based on built in C types (long, long long, etc), and code often uses typedefs for uint32_t, uint64_t, etc when passing arguments down to python. We will now always produce correct value formats as the templatized code will "do the right thing" all the time.
- Fixed issues with the ScriptInterpreterPython::Locker where entering the session and leaving the session had a bunch of issues that could cause the "lldb" module globals lldb.debugger, lldb.target, lldb.process, lldb.thread, and lldb.frame to not be initialized.

llvm-svn: 172873
</pre>
</div>
</content>
</entry>
<entry>
<title>Updated documentation on the "register_data_addr" key that can be supplied in the "thread" dictionary return value for the python OS plug-ins.</title>
<updated>2013-01-09T02:05:38+00:00</updated>
<author>
<name>Greg Clayton</name>
<email>gclayton@apple.com</email>
</author>
<published>2013-01-09T02:05:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=89f255e426a790abb95a815a591bf54ca7162bed'/>
<id>89f255e426a790abb95a815a591bf54ca7162bed</id>
<content type='text'>
llvm-svn: 171934
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
llvm-svn: 171934
</pre>
</div>
</content>
</entry>
<entry>
<title>Allow operating system plug-ins to specify the address for registers so we don't have to create data up front.</title>
<updated>2012-10-25T17:56:31+00:00</updated>
<author>
<name>Greg Clayton</name>
<email>gclayton@apple.com</email>
</author>
<published>2012-10-25T17:56:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=ead45e0174579d47baba4e5a8ab0549ffc448f34'/>
<id>ead45e0174579d47baba4e5a8ab0549ffc448f34</id>
<content type='text'>
llvm-svn: 166701
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
llvm-svn: 166701
</pre>
</div>
</content>
</entry>
<entry>
<title>&lt;rdar://problem/12491420&gt;</title>
<updated>2012-10-18T22:40:37+00:00</updated>
<author>
<name>Greg Clayton</name>
<email>gclayton@apple.com</email>
</author>
<published>2012-10-18T22:40:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=c9d645d30619ffad3e256928cb3d8cdc4c541998'/>
<id>c9d645d30619ffad3e256928cb3d8cdc4c541998</id>
<content type='text'>
Added a new setting that allows a python OS plug-in to detect threads and provide registers for memory threads. To enable this you set the setting:

settings set target.process.python-os-plugin-path lldb/examples/python/operating_system.py

Then run your program and see the extra threads. 

llvm-svn: 166244
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Added a new setting that allows a python OS plug-in to detect threads and provide registers for memory threads. To enable this you set the setting:

settings set target.process.python-os-plugin-path lldb/examples/python/operating_system.py

Then run your program and see the extra threads. 

llvm-svn: 166244
</pre>
</div>
</content>
</entry>
<entry>
<title>Added some documentation and an accessor for the target with an explanation of why to not use "lldb.target".</title>
<updated>2012-09-12T00:47:53+00:00</updated>
<author>
<name>Greg Clayton</name>
<email>gclayton@apple.com</email>
</author>
<published>2012-09-12T00:47:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=b28179bb80a93d5276e6d270d0d74c3f2d0e2b20'/>
<id>b28179bb80a93d5276e6d270d0d74c3f2d0e2b20</id>
<content type='text'>
llvm-svn: 163671
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
llvm-svn: 163671
</pre>
</div>
</content>
</entry>
</feed>
