bug-dejagnu
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug-dejagnu] GDB prompts for input when breakpoint not found


From: Jon Beniston
Subject: [Bug-dejagnu] GDB prompts for input when breakpoint not found
Date: Sun, 18 Dec 2005 20:56:25 -0000

Hi,

It appears there is a slight bug in gdb-comm.exp:gdb_comm_add_breakpoint()
for some versions of GDB.

When GDB returns "Function.*not defined", it appears that in some cases, GDB
prompts for input. E.g:

Function "abort" not defined.
Make breakpoint pending on future shared library load? (y or [n])

This is not handled by gdb_comm_add_breakpoint().

Changing the function to this, might fix it:

proc gdb_comm_add_breakpoint { function } {
    global gdb_prompt

    remote_send host "break $function\n"
    remote_expect host 60 {
        -re "Breakpoint.*$gdb_prompt $" { return "" }
        -re "Function.*not defined.*Make breakpoint pending on future shared
library load.*$" { 
            remote_send host "n\n" 
            remote_expect host 60 {
                -re "*$gdb_prompt $" { return "undef" }
                default { return "untested" }
            }
        }
        -re "Function.*not defined.*$gdb_prompt $" { return "undef" }
        -re "No symbol table.*$gdb_prompt $" { return "undef" }
        default {
            return "untested"
        }
    }
}

Cheers,
Jon





reply via email to

[Prev in Thread] Current Thread [Next in Thread]