[ghex/gtk4-port: 8/91] Tweak temporary debugging files
- From: Logan Rathbone <larathbone src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [ghex/gtk4-port: 8/91] Tweak temporary debugging files
- Date: Thu, 12 Aug 2021 23:35:09 +0000 (UTC)
commit c0d6d11b0f3624ee5d3c7ac80da51dd1f6bd51c7
Author: Logan Rathbone <poprocks gmail com>
Date: Mon Jan 4 09:13:14 2021 -0500
Tweak temporary debugging files
src/Makefile | 2 +-
src/debug-test.sh | 8 ++++++++
src/gtkhex.c | 4 ++++
3 files changed, 13 insertions(+), 1 deletion(-)
---
diff --git a/src/Makefile b/src/Makefile
index 4d16b2cc..e6244474 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -1,6 +1,6 @@
# TEMPORARY MAKEFILE FOR TESTING PURPOSES ONLY
-DEBUG=-g
+DEBUG=-g -DENABLE_DEBUG
CC=gcc
GTK_CFLAGS=$(shell pkg-config --libs --cflags gtk4)
CFLAGS=-Wall -Wextra -std=c11 -pedantic \
diff --git a/src/debug-test.sh b/src/debug-test.sh
new file mode 100755
index 00000000..e97a0a4e
--- /dev/null
+++ b/src/debug-test.sh
@@ -0,0 +1,8 @@
+#!/bin/sh
+
+TEST_PROG="./STUB"
+
+# GTK_DEBUG=interactive \
+ G_ENABLE_DIAGNOSTIC=1 \
+ G_MESSAGES_DEBUG=all \
+ $TEST_PROG
diff --git a/src/gtkhex.c b/src/gtkhex.c
index 56488173..7307f580 100644
--- a/src/gtkhex.c
+++ b/src/gtkhex.c
@@ -1533,6 +1533,10 @@ static void gtk_hex_real_data_changed(GtkHex *gh, gpointer data) {
gint start_line, end_line;
guint lines;
+#ifdef ENABLE_DEBUG
+ g_debug("%s: start", __func__);
+#endif
+
if(gh->cpl == 0)
return;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]