Here is a second version of the patch after incorporating the suggestions and adding a test case. I should also explain what the patch is doing: Traditionally gdb only supported using directives only for anonymous name spaces. It did that by adding to the static block (block representing compilation unit scope) a list of using directives which state that namespace x is visible in scope y. This patch make it so that every block not just the static block can own a list of using directives. That list states that namespace x is visible in 'this' block. The patch also initializes this list during the exploration of dies. During the exploration of the die tree, when a new scope is started the context corresponding to the parent still unfinished scope is pushed into a context stack (i.e. local variables and parameters for the outer scope are saved aside until the exploration of the current one is done) once the current scope is finished the information is saved in a block object and the parent context is restored (poped). This patch add initialization of using directives parallel to the pattern described above. this patch can be seen on the branch origin/archer-swagiaal-using-directive git branch archer-swagiaal-using-directive origin/archer-swagiaal-using-directive