Hello,
I am using CodeBlocks v20.03
on RedHat 4.8.5-39
GCC is version 4.8.5
For a certain record, the following if statement should evaluate as true.
if (
(tail->i_local_port == Device_Activity_record->i_local_port) && \
(strcmp(tail->c_remote_ip_address,Device_Activity_record->c_remote_ip_address) == 0) && \
(tail->i_remote_port == Device_Activity_record->i_remote_port) && \
(strcmp(tail->c_protocol,Device_Activity_record->c_protocol) == 0) && \
(strcmp(tail->c_type,Device_Activity_record->c_type) == 0) && \
(strcmp(tail->c_content,Device_Activity_record->c_content) == 0)
)
{
//do actions
}
However for some reason this is not happening.
I have placed watch statements on all the variables, and they're identical as expected.
Is there a way using the debugger interactively that I can identify which condition/s are not being evaluated as true, or is my only option to add a bunch of extra debugging code along the lines of
if (tail->i_local_port == Device_Activity_record->i_local_port)
{
printf("Test true\n");
}
else
{
printf("Test false\n");
}
Thanks
VW