aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--content/2019-10-27-kernel-debugging-qemu.md4
-rw-r--r--content/2019-11-18-dynamic-linking-linux-x86_64.md8
-rw-r--r--content/2021-05-15-pthread_cancel-noexcept.md4
-rw-r--r--content/2021-12-02-toying-with-virtio.md2
4 files changed, 9 insertions, 9 deletions
diff --git a/content/2019-10-27-kernel-debugging-qemu.md b/content/2019-10-27-kernel-debugging-qemu.md
index 24cc6ee..518b3d5 100644
--- a/content/2019-10-27-kernel-debugging-qemu.md
+++ b/content/2019-10-27-kernel-debugging-qemu.md
@@ -135,7 +135,7 @@ Breakpoint 1, do_execve (filename=0xffff888000060000, __argv=0xffffffff8181e160
## Appendix: Try to get around `<optimized out>`
When debugging the kernel we often face following situation in gdb:
-```text
+```
(gdb) frame
#0 do_execveat_common (fd=fd@entry=-100, filename=0xffff888000120000, argv=argv@entry=..., envp=envp@entry=..., flags=flags@entry=0) at fs/exec.c
@@ -165,7 +165,7 @@ ccflags-y := -Og
After enabling optimize for debug experience `-Og` we can see the following now
in gdb:
-```txt
+```
(gdb) frame
#0 do_execveat_common (fd=fd@entry=-100, filename=0xffff888000120000, argv=argv@entry=..., envp=envp@entry=..., flags=flags@entry=0) at fs/exec.c
diff --git a/content/2019-11-18-dynamic-linking-linux-x86_64.md b/content/2019-11-18-dynamic-linking-linux-x86_64.md
index bc39e0f..496ec24 100644
--- a/content/2019-11-18-dynamic-linking-linux-x86_64.md
+++ b/content/2019-11-18-dynamic-linking-linux-x86_64.md
@@ -141,7 +141,7 @@ int main(int argc, const char* argv[]) {
}
```
-```console
+```bash
> gcc -o main main.c -no-pie
```
@@ -209,7 +209,7 @@ To understand the `push 0` instruction in the **puts** trampoline we have to
take a look at the third section of interest in the ELF file, the `.rela.plt`
section.
-```console
+```
# -r print relocations
# -D use .dynamic info when displaying info
> readelf -W -r ./main
@@ -250,7 +250,7 @@ The resulting index [2] is the offset into the dynamic symbol table
(`.dynsym`). Dumping the dynamic symbol table with readelf we can see that the
symbol at index [2] is **puts**.
-```console
+```
# -s print symbols
> readelf -W -s ./main
Symbol table '.dynsym' contains 7 entries:
@@ -300,7 +300,7 @@ Following entries are most interesting for dynamic linking:
We can use readelf to dump the `.dynamic` section. In the following snippet I
only kept the relevant entries:
-```console
+```
# -d dump .dynamic section
> readelf -d ./main
diff --git a/content/2021-05-15-pthread_cancel-noexcept.md b/content/2021-05-15-pthread_cancel-noexcept.md
index 4ff0fc2..f09cadc 100644
--- a/content/2021-05-15-pthread_cancel-noexcept.md
+++ b/content/2021-05-15-pthread_cancel-noexcept.md
@@ -8,7 +8,7 @@ tags = ["linux", "threading", "c++"]
Few weeks ago I was debugging a random crash in a legacy code base at work. In
case the crash occurred the following message was printed on `stdout` of the
process:
-```text
+```
terminate called without an active exception
```
@@ -21,7 +21,7 @@ exception, the initial assumption was one of the following:
After receiving a backtrace captured by a customer it wasn't directly obvious
to me why `std::terminate()` was called here. The backtrace received looked
something like the following:
-```text
+```
#0 0x00007fb21df22ef5 in raise () from /usr/lib/libc.so.6
#1 0x00007fb21df0c862 in abort () from /usr/lib/libc.so.6
#2 0x00007fb21e2a886a in __gnu_cxx::__verbose_terminate_handler () at /build/gcc/src/gcc/libstdc++-v3/libsupc++/vterminate.cc:95
diff --git a/content/2021-12-02-toying-with-virtio.md b/content/2021-12-02-toying-with-virtio.md
index 56c34de..7aab8b6 100644
--- a/content/2021-12-02-toying-with-virtio.md
+++ b/content/2021-12-02-toying-with-virtio.md
@@ -199,7 +199,7 @@ set of limitations, for example
With the guest, qemu and the host in the picture this looks something like the
following.
-```text
+```
+--------------------------------------------+
| host |
| +-------------------------+ |