This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[RFA] Rename python files.


Hi,

Eli asked that the source code and testcase files pertaining to python 
scripting support be renamed in order to support the 8.3 limitation in DOS. I
don't like the fnchange.lst solution because it's just one more arcane thing 
we would have to know in order to hack GDB. So I prefer straight renaming of 
the files.

How should said renaming be done, by submitting and committing a patch which 
removes the old file and adds a new one, or by moving things around in CVSROOT?

In any case, this is my suggestion for the source code files:

python/python-cmd.c -> python/py-cmd.c
python/python-frame.c -> python/py-frame.c
python/python-function.c -> python/py-function.c
python/python-prettyprint.c -> python/py-prettyprint.c
python/python-type.c -> python/py-type.c
python/python-utils.c -> python/py-utils.c
python/python-value.c -> python/py-value.c

and the testcase files:

gdb.python/python-cmd.exp -> gdb.python/py-cmd.exp
gdb.python/python-frame.c -> gdb.python/py-frame.c
gdb.python/python-frame.exp -> gdb.python/py-frame.exp
gdb.python/python-function.exp -> gdb.python/py-function.exp
gdb.python/python-mi.exp -> gdb.python/py-mi.exp
gdb.python/python-prettyprint.c -> gdb.python/py-prettyprint.c
gdb.python/python-prettyprint.exp -> gdb.python/py-prettyprint.exp
gdb.python/python-prettyprint.py -> gdb.python/py-prettyprint.py
gdb.python/python-template.cc -> gdb.python/py-template.cc
gdb.python/python-template.exp -> gdb.python/py-template.exp
gdb.python/python-value.c -> gdb.python/py-value.c
gdb.python/python-value.exp -> gdb.python/py-value.exp

I'll write changelogs before committing anything, of course.

I also have the two attached patches to adapt Makefile.in and the various test 
files (for the new test executable names).

Ok?
-- 
[]'s
Thiago Jung Bauermann
diff --git a/gdb/Makefile.in b/gdb/Makefile.in
index ccc4db8..82ffce8 100644
--- a/gdb/Makefile.in
+++ b/gdb/Makefile.in
@@ -264,24 +264,24 @@ SUBDIR_TUI_CFLAGS= \
 #
 SUBDIR_PYTHON_OBS = \
 	python.o \
-	python-cmd.o \
-	python-frame.o \
-	python-function.o \
-	python-objfile.o \
-	python-prettyprint.o \
-	python-type.o \
-	python-utils.o \
-	python-value.o
+	py-cmd.o \
+	py-frame.o \
+	py-function.o \
+	py-objfile.o \
+	py-prettyprint.o \
+	py-type.o \
+	py-utils.o \
+	py-value.o
 SUBDIR_PYTHON_SRCS = \
 	python/python.c \
-	python/python-cmd.c \
-	python/python-frame.c \
-	python/python-function.c \
-	python/python-objfile.c \
-	python/python-prettyprint.c \
-	python/python-type.c \
-	python/python-utils.c \
-	python/python-value.c
+	python/py-cmd.c \
+	python/py-frame.c \
+	python/py-function.c \
+	python/py-objfile.c \
+	python/py-prettyprint.c \
+	python/py-type.c \
+	python/py-utils.c \
+	python/py-value.c
 SUBDIR_PYTHON_DEPS =
 SUBDIR_PYTHON_LDFLAGS=
 SUBDIR_PYTHON_CFLAGS=
@@ -1918,36 +1918,36 @@ python.o: $(srcdir)/python/python.c
 	$(COMPILE) $(PYTHON_CFLAGS) $(srcdir)/python/python.c
 	$(POSTCOMPILE)
 
-python-cmd.o: $(srcdir)/python/python-cmd.c
-	$(COMPILE) $(PYTHON_CFLAGS) $(srcdir)/python/python-cmd.c
+py-cmd.o: $(srcdir)/python/py-cmd.c
+	$(COMPILE) $(PYTHON_CFLAGS) $(srcdir)/python/py-cmd.c
 	$(POSTCOMPILE)
 
-python-frame.o: $(srcdir)/python/python-frame.c
-	$(COMPILE) $(PYTHON_CFLAGS) $(srcdir)/python/python-frame.c
+py-frame.o: $(srcdir)/python/py-frame.c
+	$(COMPILE) $(PYTHON_CFLAGS) $(srcdir)/python/py-frame.c
 	$(POSTCOMPILE)
 
-python-function.o: $(srcdir)/python/python-function.c
-	$(COMPILE) $(PYTHON_CFLAGS) $(srcdir)/python/python-function.c
+py-function.o: $(srcdir)/python/py-function.c
+	$(COMPILE) $(PYTHON_CFLAGS) $(srcdir)/python/py-function.c
 	$(POSTCOMPILE)
 
-python-objfile.o: $(srcdir)/python/python-objfile.c
-	$(COMPILE) $(PYTHON_CFLAGS) $(srcdir)/python/python-objfile.c
+py-objfile.o: $(srcdir)/python/py-objfile.c
+	$(COMPILE) $(PYTHON_CFLAGS) $(srcdir)/python/py-objfile.c
 	$(POSTCOMPILE)
 
-python-prettyprint.o: $(srcdir)/python/python-prettyprint.c
-	$(COMPILE) $(PYTHON_CFLAGS) $(srcdir)/python/python-prettyprint.c
+py-prettyprint.o: $(srcdir)/python/py-prettyprint.c
+	$(COMPILE) $(PYTHON_CFLAGS) $(srcdir)/python/py-prettyprint.c
 	$(POSTCOMPILE)
 
-python-type.o: $(srcdir)/python/python-type.c
-	$(COMPILE) $(PYTHON_CFLAGS) $(srcdir)/python/python-type.c
+py-type.o: $(srcdir)/python/py-type.c
+	$(COMPILE) $(PYTHON_CFLAGS) $(srcdir)/python/py-type.c
 	$(POSTCOMPILE)
 
-python-utils.o: $(srcdir)/python/python-utils.c
-	$(COMPILE) $(PYTHON_CFLAGS) $(srcdir)/python/python-utils.c
+py-utils.o: $(srcdir)/python/py-utils.c
+	$(COMPILE) $(PYTHON_CFLAGS) $(srcdir)/python/py-utils.c
 	$(POSTCOMPILE)
 
-python-value.o: $(srcdir)/python/python-value.c
-	$(COMPILE) $(PYTHON_CFLAGS) $(srcdir)/python/python-value.c
+py-value.o: $(srcdir)/python/py-value.c
+	$(COMPILE) $(PYTHON_CFLAGS) $(srcdir)/python/py-value.c
 	$(POSTCOMPILE)
 
 #
diff --git a/gdb/testsuite/gdb.python/Makefile.in b/gdb/testsuite/gdb.python/Makefile.in
index c49f713..655e604 100644
--- a/gdb/testsuite/gdb.python/Makefile.in
+++ b/gdb/testsuite/gdb.python/Makefile.in
@@ -1,7 +1,7 @@
 VPATH = @srcdir@
 srcdir = @srcdir@
 
-EXECUTABLES = python-value python-prettyprint python-template
+EXECUTABLES = py-value py-prettyprint py-template
 
 all info install-info dvi install uninstall installcheck check:
 	@echo "Nothing to be done for $@..."
diff --git a/gdb/testsuite/gdb.python//py-frame.exp b/gdb/testsuite/gdb.python//py-frame.exp
index 82ae814..13af0ba 100644
--- a/gdb/testsuite/gdb.python//py-frame.exp
+++ b/gdb/testsuite/gdb.python//py-frame.exp
@@ -31,7 +31,7 @@ if ![python_supported] then {
   return -1
 }
 
-set testfile "python-frame"
+set testfile "py-frame"
 set srcfile ${testfile}.c
 set binfile ${objdir}/${subdir}/${testfile}
 
diff --git a/gdb/testsuite/gdb.python//py-mi.exp b/gdb/testsuite/gdb.python//py-mi.exp
index e7bfe54..ee000f1 100644
--- a/gdb/testsuite/gdb.python//py-mi.exp
+++ b/gdb/testsuite/gdb.python//py-mi.exp
@@ -24,7 +24,7 @@ if [mi_gdb_start] {
     continue
 }
 
-set testfile "python-prettyprint"
+set testfile "py-prettyprint"
 set srcfile ${testfile}.c
 set binfile ${objdir}/${subdir}/${testfile}
 if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug additional_flags=-DMI}] != "" } {
diff --git a/gdb/testsuite/gdb.python//py-prettyprint.exp b/gdb/testsuite/gdb.python//py-prettyprint.exp
index b2dc85d..2134ab9 100644
--- a/gdb/testsuite/gdb.python//py-prettyprint.exp
+++ b/gdb/testsuite/gdb.python//py-prettyprint.exp
@@ -20,7 +20,7 @@ if $tracelevel then {
     strace $tracelevel
 }
 
-set testfile "python-prettyprint"
+set testfile "py-prettyprint"
 set srcfile ${testfile}.c
 set binfile ${objdir}/${subdir}/${testfile}
 
diff --git a/gdb/testsuite/gdb.python//py-template.exp b/gdb/testsuite/gdb.python//py-template.exp
index b80f56e..2d76371 100644
--- a/gdb/testsuite/gdb.python//py-template.exp
+++ b/gdb/testsuite/gdb.python//py-template.exp
@@ -31,7 +31,7 @@ if ![python_supported] then {
   return -1
 }
 
-set testfile "python-template"
+set testfile "py-template"
 set srcfile ${testfile}.cc
 set binfile ${objdir}/${subdir}/${testfile}
 if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable \
diff --git a/gdb/testsuite/gdb.python//py-value.exp b/gdb/testsuite/gdb.python//py-value.exp
index ccf438f..a4f58af 100644
--- a/gdb/testsuite/gdb.python//py-value.exp
+++ b/gdb/testsuite/gdb.python//py-value.exp
@@ -220,7 +220,7 @@ proc test_value_in_inferior {} {
 
 # A few objfile tests.
 proc test_objfiles {} {
-    gdb_test "python\nok=False\nfor file in gdb.objfiles():\n  if 'python-value' in file.filename:\n    ok=True\nprint ok\nend" "True"
+    gdb_test "python\nok=False\nfor file in gdb.objfiles():\n  if 'py-value' in file.filename:\n    ok=True\nprint ok\nend" "True"
 
     gdb_test "python print gdb.objfiles()\[0\].pretty_printers" "\\\[\\\]"
 
@@ -275,7 +275,7 @@ if ![python_supported] then {
   return -1
 }
 
-set testfile "python-value"
+set testfile "py-value"
 set srcfile ${testfile}.c
 set binfile ${objdir}/${subdir}/${testfile}
 

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]