Jichao
Jichao

Reputation: 41825

Which version of m4 does the author of "Debugging with GDB" use?

I am trying to learn how to debug programs with gdb following Debugging with GDB. The first chapter of this book presents a sample session to debug programs. My question is where could I get this buggy version of m4? I want to redo this sample debug session.

Thanks.

Upvotes: 1

Views: 244

Answers (1)

Employed Russian
Employed Russian

Reputation: 213754

The bug was likely injected into m4 on purpose (just to demonstrate GDB). I doubt there was ever an official release of GNU m4 which actually had this bug.

You can download any version of m4, change

len_lquote = strlen(lquote);

to

len_lquote = strlen(rquote);

in set_quotes(), and then redo the sample debugging session.

However, I see very little point in actually doing that. Your time would probably be spent more wisely if instead you select any open-source program you like and use, and try to find/fix a real open bug in it.

P.S. The online docs you referred to have moved here.

Upvotes: 2

Related Questions