GDB or Valgrind or other debugger for Puppy 5.2.8? (Solved)

For discussions about programming, programming questions/advice, and projects that don't really have anything to do with Puppy.
Post Reply
Message
Author
CGP
Posts: 100
Joined: Sat 26 Jul 2008, 05:17

GDB or Valgrind or other debugger for Puppy 5.2.8? (Solved)

#1 Post by CGP »

Hi. Is there GDB or Valgrind or some other debugger that runs on puppy 5.2.8? Thanks.
Last edited by CGP on Wed 14 Mar 2018, 16:58, edited 1 time in total.

musher0
Posts: 14629
Joined: Mon 05 Jan 2009, 00:54
Location: Gatineau (Qc), Canada

#2 Post by musher0 »

Hello CGP.

If I may be as bold... What do you mean by "debug"?
-- gather information in connection with bug reports?
OR
-- debug programs while developing?

As a bash scripter I know of two ways:
-- keep a close eye on file /tmp/xerrs.log. Maybe open it in a separate terminal with
parameter -f, like so:

Code: Select all

tail -f /tmp/serrs.log
This way, new error lines will be shown as they happen.

-- while developing a bash script, if you encounter a mysterious bug, put a line with
< set -xe > underneath the crunch-bang line, and a line with < set +xe > at the end.
Then test your script from geany by hitting F5. It slows the script down, but all the
processes are shown, and you can more easily spot the culprit(s) or bottleneck(s).

I only script in Bash, but I have read about the following capacity of geany: it can be
used as an IDE for a wide range of computer languages. Maybe study the geany docs
a bit and set it up accordingly. I suspect that it can show debugging output while
developing an application in various languages.

Finally, have you checked if a version of Valgrind or GDP are available for your Puppy
from its PPM (Puppy Package Manager)?

IHTH. BFN.
musher0
~~~~~~~~~~
"You want it darker? We kill the flame." (L. Cohen)

CGP
Posts: 100
Joined: Sat 26 Jul 2008, 05:17

#3 Post by CGP »

@musher0

Thanks for the nice reply. Actually, I am trying to get wipefreespace (description here: http://wipefreespace.sourceforge.net/) running on Puppy Linux 5.2.8 with the help of the programmer who wrote it. It failed on FAT32 partitions when running from Puppy Linux 5.2.8. He asked me to use a debugger like GDB or VALGRIND to produce output to send him. The code must be written in C but I am dealing only with the executable. One thing he wanted was the 'stack trace', So, actually, I don't really know what kind of debugger I need other than GDB or VALGRIND.

I did find them in Puppy Package Manager when running on Puppy 5.2.8. But when I try to download them, I get the error message that the links are now broken. They seem to have been in puppy-lucid and ubuntu-lucid repositories that you can configure PPM to access and several other ones. Apparently, not one of them works. Are they always like that?

I am wondering if they are maybe available as pets from some repository or somewhere else.

Thanks.

muggins
Posts: 6724
Joined: Fri 20 Jan 2006, 10:44
Location: hobart

#4 Post by muggins »

https://pkgs.org/ is a good place to search for compiled programs. They have plenty of versions of gdb, but I don't know whether they would work with lupu. Usually slackware versions have the least dependencies.

Regarding wipefreespace, you could try downloading & installing this one:

http://ftp.gwdg.de/pub/opensuse/reposit ... 1.i686.rpm

It runs from commandline without errors for me.

musher0
Posts: 14629
Joined: Mon 05 Jan 2009, 00:54
Location: Gatineau (Qc), Canada

#5 Post by musher0 »

Hello CGP.

About the execs not being available, Puppy 5.2.8 is aka Puppy Lucid, aka LuPu, and is 5
years old, you know. Perhaps the Ubuntu Lucid repos have changed URLs.

I'll do a bit of research and see what I can come up with. In the meantime, why not ask
rerwin? Forum member rerwin is the maintainer of the Lucid Puppies. Or maybe search
the existing Lupu threads?

BFN.
musher0
~~~~~~~~~~
"You want it darker? We kill the flame." (L. Cohen)

musher0
Posts: 14629
Joined: Mon 05 Jan 2009, 00:54
Location: Gatineau (Qc), Canada

#6 Post by musher0 »

Hello again CGP.

I tried to locate an old wipefreespace version in Ubuntu's repos for Lucid Lynx and
could not find one.

Along the way, it occurred to me that Puppies have < strace > in their devx*.sfs. With
< strace >, you may not need Valgrind or GDB.

This is what I would suggest:
-- load the devx*.sfs for your Lucid Puppy -- if not already loaded;

-- make sure you have strace loaded by issuing the following command from terminal

Code: Select all

whereis strace
If you get something like < /usr/bin/strace > as a result, you're good to go.

-- Then run

Code: Select all

strace -c -o wipefreespace-trace-columns.rpt wipefreespace
to get a report nicely laid out in columns of wipefreespace's execution;

-- and run

Code: Select all

strace -o wipefreespace-trace-general.rpt wipefreespace
to get a general report of wipefreespace's execution;

-- use < more > to view the reports (to make sure that they do contain information, but
none which a normal human can understand!) ;) ;

-- send both *.rpt reports to the dev. This will quench his thirst, I think!

IHTH. BFN.
musher0
~~~~~~~~~~
"You want it darker? We kill the flame." (L. Cohen)

CGP
Posts: 100
Joined: Sat 26 Jul 2008, 05:17

#7 Post by CGP »

Hi musher0 and mullins,

By the way, the reason I am trying to use puppy linux 5.2.8 even though it is rather old is that I have other programs installed on that version of puppy and doubt that I can get them installed on other versions of puppy. (see below for one reason I doubt that).

@mullins:

Thanks for the suggestions.

I'm very happy that wipefreespace works on puppy. But I tried to install the wipefreespace rpm you linked to on puppy 5.2.8. Just for like almost all rpms I try to install on puppy 5.2.8, I get the error message

"An error occurred opening the RPM file. Suggestion: install unrpm.pup DotPup package, which contains an alternative extraction program, that PupZip will automatically use if present."

I then installed the unrpm.pet package. I got the same error message when I tried to install wipefreespace. So, do you have a suggestion? What version of puppy did you get wipefreespace to work on? Did you have unrpm.pup or unrpm.pet installed? Did you have to install extra libraries like libreiser and libaal? If so, where did you find them? Please let me know. I will definitely try to reproduce your success.

Thanks for the link to https://pkgs.org. Are you saying that that website has many packages that will run on puppy linux? Is the only way to tell if one of those packages will run on puppy linux to try it? My past experience makes me think that the chance one will run on any particular version of puppy is less than 1%. Is there no way to know if one of those many packages will run on any particular version of puppy? And are you saying that those packages in the Slackware category are more likely to run on puppy?

--

@musher0

Thanks for describing strace. (Actually puppy 5.2.8 has 'strace' in /usr/bin, but does not have 'whereis'!). I did run strace against the wipefreespace executable and will send the results to the developer.

I will message rerwin to ask about the links to gdb and vagrind.

Thanks to both of you for your help.

muggins
Posts: 6724
Joined: Fri 20 Jan 2006, 10:44
Location: hobart

#8 Post by muggins »

CGP,

here is rpm repackaged as tar.gz.
Attachments
wipefreespace-2.2-7.1.i686.tar.gz
(79.15 KiB) Downloaded 120 times

muggins
Posts: 6724
Joined: Fri 20 Jan 2006, 10:44
Location: hobart

#9 Post by muggins »

Did you have unrpm.pup or unrpm.pet installed? Did you have to install extra libraries like libreiser and libaal?
No to both. I'm using a version of Peebee's artful pup. All I'm reporting is that I extracted the wipefreespace rpm, and it ran on commandline without
errors.
And are you saying that those packages in the Slackware category are more likely to run on puppy?
Yes, that is my experience. For reasons unknown to me, ubuntu packages seem to be compiled with unneeded dependencies.

CGP
Posts: 100
Joined: Sat 26 Jul 2008, 05:17

#10 Post by CGP »

muggins (woops, I called you mullins above). Thanks very much. The version of wipefreespace you provided in the tar does not need the additional libreiser and libaal libraries which the sourceforge version needs when running on puppy 5.2.8. However, unfortunately wipefreespace did not work on a FAT32 partition. I got the error message

"wipefreespace:/dev/sdb1: error (error -1216211944) during opening '/dev/sdb1', FS='/dev/sdb1"

when running it on a FAT32 USB flash drive which was sdb1. So, I don't want others to think that the executable in the tar works.

musher0 I contacted rerwin and he provided some workarounds to the broken links problem. I will get to them next.

User avatar
rerwin
Posts: 2017
Joined: Wed 24 Aug 2005, 22:50
Location: Maine, USA

#11 Post by rerwin »

The solution for the broken links problem is to replace the ubuntu-compatible repository list with one from lupu 5.2.8.7. A package to do that is here:

http://www.murga-linux.com/puppy/viewto ... 146#985146

The only available repos are now in "old-releases".

The package is for Ubuntu-Lucid-based Pups (other than 5.2.8.7) only.

CGP
Posts: 100
Joined: Sat 26 Jul 2008, 05:17

#12 Post by CGP »

To answer my original question, YES, there are gdb and valgrind for puppy linux 5.2.8. They are available in the Puppy Package Manager (PPM).

But finding and installing them is still a matter of trial and error and guesswork. You also need to modify Puppy Linux as described in the previous post. (Thank you for that replacement file, rerwin).

For the newbie, to find any program in PPM you need to first update the repository databases. It seems that a fresh install of puppy linux has no repository databases. Guesswork. You do that by clicking on the "Configure Package Manager" icon. (I have been using puppy for 9 years but did not know that. When I searched for a program in PPM, no error message told me to first download the repository contents list. Shouldn't the title of the icon be "Download Repository Contents" or something like that?)

Next, there are different 'Repo's listed across the top of PPM as radio button choices. It seems to make no difference which one you choose. (Nowadays there is really only one repository, named "old-releases.ubuntu.com". Why the change? I don't know. Apparently at one time there were 4 different repositories for lucid puppy. Why? I don't know. Their names puppy-lucid, ubuntu-lucid-main, ubuntu-lucid-multiverse, and ubuntu-lucid-universe give no clue as to how they differ or why I would choose one of them instead of another. Guesswork.)

Listed on the left are many radio buttons like Desktop, System, ... Fun. It seems to make no difference which one you choose. (Trial and error. Why are they there? I don't know.)

I hope this helps someone to use puppy linux and to improve future versions of puppy linux.

Post Reply