Using the ordinary gdb CLI this can only be done with great difficulty. You have to use logging to write the output of "frame" to a file; then do processing on the file to extract the name and turn it into a gdb script; then "source" the resulting script.
If you have a Python-enabled gdb, then it is easy. Use gdb.selected_frame() to get the selected frame. Then the name is in the frame's function symbol:
name = gdb.selected_frame().name()
If need be you can expose this to the CLI in various ways; but the simplest is probably to wrap it in a convenience function. See the docs for information on that.
defineblock. Get something that I can compare to either an address or a name string in the gdb script.