Repository: pwndbg/pwndbg
Pull request: Updated version.py for bugreport command to display more information
<!-- Please make sure to read the testing and linting instructions at https://github.com/pwndbg/pwndbg/blob/dev/DEVELOPING.md before creating a PR -->

The Bug Report Command now displays:

- osabi
- architecture
- endian
- charset
- width
- height

Depending on current arch -- note that those are only available if given arch is supported by current GDB, like gdb-multiarch:
- arm
- mips

Fixes #1555 


Problem statement:
bugreport command: show more info
The bugreport command should display more information like:
* show osabi
* show architecture
* show endian

Depending on current arch -- note that those are only available if given arch is supported by current GDB, like `gdb-multiarch`:
* show arm
* show mips

Maybe also:
* show charset
* show width
* show height

Hints from issue discussion:
Hi, how to get involved in pwndbg project as a newcomer ?  
Hi, just [send a pull request with a change that you want implemented](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-a-pull-request).

You can also use `rip grep`/`grep`/git grep` to find files ineository, which may or may not help. See also this: https://github.com/pwndbg/pwndbg/blob/dev/DEVELOPING.md
You can also join our Discord (link in the README) and we can help you with any questions.

Commit message: Update version.py

Patch to review:
diff --git a/pwndbg/commands/version.py b/pwndbg/commands/version.py
index 81997b813df..bbbebc03f66 100644
--- a/pwndbg/commands/version.py
+++ b/pwndbg/commands/version.py
@@ -157,6 +157,40 @@ def bugreport(run_browser=False, use_gh=False):
                 os_info = match.group(1)
 
     current_setup += "OS: %s\n" % os_info
+
+    # 1. showing osabi
+    osabi_info = platform.uname().version
+    current_setup += "OS ABI: %s\n" % osabi_info
+
+    # 2. showing architecture
+    arch_info = platform.machine()
+    current_setup += "Architecture: %s\n" % arch_info
+
+    # 3. showing endian
+    endian_info = sys.byteorder
+    current_setup += "Endian: %s\n" % endian_info
+
+    # 4. Depending on current arch -- note that those are only available if given arch is supported by current GDB, like gdb-multiarch
+    if arch_info in ["armv7l", "aarch64"]:
+        arm_info = gdb.execute("show arm", to_string=True)
+        current_setup += "ARM: %s\n" % arm_info
+
+    if arch_info in ["mips", "mips64"]:
+        mips_info = gdb.execute("show mips", to_string=True)
+        current_setup += "MIPS: %s\n" % mips_info
+
+    # 7. showing charset
+    charset_info = sys.getdefaultencoding()
+    current_setup += "Charset: %s\n" % charset_info
+
+    # 8. showing width
+    width_info = os.get_terminal_size().columns
+    current_setup += "Width: %s\n" % width_info
+
+    # 9. showing height
+    height_info = os.get_terminal_size().lines
+    current_setup += "Height: %s\n" % height_info
+
     current_setup += "\n".join(all_info)
     current_setup += "\n" + "\n".join(gdb_config)
 


Code review comments:
diff_hunk: @@ -157,6 +157,40 @@ def bugreport(run_browser=False, use_gh=False):
                 os_info = match.group(1)
 
     current_setup += "OS: %s\n" % os_info
+
+    # 1. showing osabi
+    osabi_info = platform.uname().version
+    current_setup += "OS ABI: %s\n" % osabi_info
+
+    # 2. showing architecture
+    arch_info = platform.machine()
+    current_setup += "Architecture: %s\n" % arch_info
+
+    # 3. showing endian
+    endian_info = sys.byteorder
+    current_setup += "Endian: %s\n" % endian_info
+
+    # 4. Depending on current arch -- note that those are only available if given arch is supported by current GDB, like gdb-multiarch
+    if arch_info in ["armv7l", "aarch64"]:
+        arm_info = gdb.execute("show arm", to_string=True)
+        current_setup += "ARM: %s\n" % arm_info
+
+    if arch_info in ["mips", "mips64"]:
path: pwndbg/commands/version.py
text: @user1:
```suggestion
    elif arch_info in ["mips", "mips64"]:
```