Skip to content

Conversation

@reuk
Copy link
Contributor

@reuk reuk commented Mar 16, 2017

With this commit applied, the build succeeds when invoked by make CXXFLAGS=-DDEBUG. This is achieved by deleting anything within a #ifdef DEBUG block which caused build errors. Several files also contained // #define DEBUG lines, which have been removed.

@thk123
Copy link
Contributor

thk123 commented Mar 16, 2017

Could you also add the build to the travis build as part of this PR:

COMMAND="make -C src CXX=$COMPILER CXXFLAGS=\"-Wall -O0 -ggdb3 -Werror -Wno-deprecated-register -pedantic -Wno-sign-compare -DDEBUG\" -j2" &&
eval ${PRE_COMMAND} ${COMMAND} &&

@reuk reuk force-pushed the remove-broken-debug branch from c304ef7 to fbdf29a Compare March 16, 2017 16:23
@peterschrammel
Copy link
Member

There's more stuff that is broken: https://travis-ci.org/diffblue/cbmc/jobs/211814527#L274

@reuk reuk force-pushed the remove-broken-debug branch 4 times, most recently from d8c2558 to 1fbda78 Compare March 17, 2017 09:58
Copy link
Collaborator

@tautschnig tautschnig left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot for this cleanup, and indeed we should be build-testing various #ifdef options. Several debug messages seemed rather useful - I'd ask to fix them rather than removing them.

#ifdef DEBUG
cfg_dominators.output(std::cout);
#endif

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be fixed rather than removed.

std::cout << std::string(__indent, ' ') << "Parser::rDefinition 1 " << t
<< "\n";
#endif

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please fix rather than remove.

std::cout << std::string(__indent, ' ') << "TEMPLATE_TYPE: "
<< template_type << std::endl;
#endif

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please fix rather than remove.

<< "Parser::rIntegralDeclaration 8 "
<< declaration << "\n";
#endif

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please fix rather than remove.

std::cout << std::string(__indent, ' ') << "Parser::rClassBody " << member
<< std::endl;
#endif

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please fix rather than remove.

#ifdef DEBUG
cout << "Finished symex, invoking decision procedure." << endl;
#endif

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please fix rather than remove.

goto_programt::targett l=step.loc;
#ifdef DEBUG
std::cout << ", " << l->location_number << ":" << l->location;
#endif
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please fix rather than remove.

<< " accept states and " << nta.count_transitions()
<< " transitions" << endl;
#endif

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please fix rather than remove.

#ifdef DEBUG
std::cout << "There are " << init_states.size() << " init states" << endl;
#endif

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please fix rather than remove.

<< merge_into.var.start_pc + merge_into.var.length
<< messaget::eom;
#endif

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please fix rather than remove.

@tautschnig tautschnig assigned reuk and unassigned kroening Mar 20, 2017
Copy link
Collaborator

@tautschnig tautschnig left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot for looking at the problems in more detail - I've added a few hints on how to re-add some of the objects to be printed. This should then be ready to go after some merging of commits.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems body and template_type have been dropped here - I think you'll need body.pretty() and template_type.pretty()

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think declaration.pretty() should be re-added here.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

member.pretty() appears to be missing here.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

statement.pretty()

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please add << ':' << l->location.as_string()

Copy link
Collaborator

@tautschnig tautschnig left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems good to go save for squashing of commits (IMHO).

@reuk reuk force-pushed the remove-broken-debug branch from 9c10e5c to 1a5c69d Compare March 21, 2017 10:08
@kroening kroening merged commit cba259c into diffblue:master Apr 3, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants